You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by js...@apache.org on 2014/03/19 13:47:53 UTC

svn commit: r1579217 - in /openoffice/trunk/main/oox/source/ppt: presentationfragmenthandler.cxx slidefragmenthandler.cxx

Author: jsc
Date: Wed Mar 19 12:47:53 2014
New Revision: 1579217

URL: http://svn.apache.org/r1579217
Log:
#124456# merge from aoo410 branch, add null pointer check to avoid usage of not initialzed theme, add comment for missing theme support in notes page

Modified:
    openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx
    openoffice/trunk/main/oox/source/ppt/slidefragmenthandler.cxx

Modified: openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx?rev=1579217&r1=1579216&r2=1579217&view=diff
==============================================================================
--- openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx (original)
+++ openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx Wed Mar 19 12:47:53 2014
@@ -273,6 +273,9 @@ void PresentationFragmentHandler::endDoc
 							SlidePersistPtr pNotesMasterPersistPtr( new SlidePersist( rFilter, sal_True/*sal_False*/, sal_True, xNotesPage,
 								ShapePtr( new PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
 							FragmentHandlerRef xNotesMasterFragmentHandler( new SlideFragmentHandler( getFilter(), aNotesMasterFragmentPath, pNotesMasterPersistPtr, Slide ) );
+
+                            // TODO: Theme support is missing, theme pointer in SlidePersist is null and used later
+                            
 							importSlide( xNotesMasterFragmentHandler, pNotesMasterPersistPtr );
 							pNotesMasterPersistPtr->createXShapes( rFilter );
 							pNotesPersistPtr->setMasterPersist(pNotesMasterPersistPtr);

Modified: openoffice/trunk/main/oox/source/ppt/slidefragmenthandler.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/oox/source/ppt/slidefragmenthandler.cxx?rev=1579217&r1=1579216&r2=1579217&view=diff
==============================================================================
--- openoffice/trunk/main/oox/source/ppt/slidefragmenthandler.cxx (original)
+++ openoffice/trunk/main/oox/source/ppt/slidefragmenthandler.cxx Wed Mar 19 12:47:53 2014
@@ -141,10 +141,15 @@ Reference< XFastContextHandler > SlideFr
 
 	case PPT_TOKEN( bgRef ):			// a:CT_StyleMatrixReference
 		{
-			FillPropertiesPtr pFillPropertiesPtr( new FillProperties(
-				*mpSlidePersistPtr->getTheme()->getFillStyle( xAttribs->getOptionalValue( XML_idx ).toInt32() ) ) );
-			xRet.set( new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() ) );
-			mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
+            oox::drawingml::ThemePtr pTheme = mpSlidePersistPtr->getTheme();
+            if (pTheme)
+            {
+                FillPropertiesPtr pFillPropertiesPtr( new FillProperties(
+				    *pTheme->getFillStyle( xAttribs->getOptionalValue( XML_idx ).toInt32() ) ) );
+                mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
+            }
+            xRet.set( new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() ) );
+                
 		}
 		break;