Author: jsc
Date: Wed Mar 19 12:45:05 2014
New Revision: 1579216

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

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

Modified: 
openoffice/branches/AOO410/main/oox/source/ppt/presentationfragmenthandler.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/oox/source/ppt/presentationfragmenthandler.cxx?rev=1579216&r1=1579215&r2=1579216&view=diff
==============================================================================
--- 
openoffice/branches/AOO410/main/oox/source/ppt/presentationfragmenthandler.cxx 
(original)
+++ 
openoffice/branches/AOO410/main/oox/source/ppt/presentationfragmenthandler.cxx 
Wed Mar 19 12:45:05 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/branches/AOO410/main/oox/source/ppt/slidefragmenthandler.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/oox/source/ppt/slidefragmenthandler.cxx?rev=1579216&r1=1579215&r2=1579216&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/oox/source/ppt/slidefragmenthandler.cxx 
(original)
+++ openoffice/branches/AOO410/main/oox/source/ppt/slidefragmenthandler.cxx Wed 
Mar 19 12:45:05 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;
 


Reply via email to