[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source

Michael Stahl mst at kemper.freedesktop.org
Mon May 7 05:30:58 PDT 2012


 oox/source/ppt/slidefragmenthandler.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 009776a16410024a9437847af065d2160b434f30
Author: Muthu Subramanian <sumuthu at suse.com>
Date:   Sat May 5 12:48:57 2012 +0530

    fdo#48778: PPTX import crashes.
    
    This probably occurs when the document has wrong idx (?)
    (cherry picked from commit 11713989b1580799635fff997b920d9bd4bf619f)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 4652690..59844ef 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -140,8 +140,8 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 
     case PPT_TOKEN( bgRef ):            // a:CT_StyleMatrixReference
         {
-            FillPropertiesPtr pFillPropertiesPtr( new FillProperties(
-                *mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) ) ) );
+            const FillProperties *pFillProperties = mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) );
+            FillPropertiesPtr pFillPropertiesPtr( pFillProperties ? new FillProperties( *pFillProperties ) : new FillProperties() );
             ContextHandlerRef ret = new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() );
             mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
             return ret;


More information about the Libreoffice-commits mailing list