[Libreoffice-commits] .: oox/inc oox/source

Radek Doulík rodo at kemper.freedesktop.org
Thu Aug 11 09:17:03 PDT 2011


 oox/inc/oox/drawingml/shape.hxx          |    2 ++
 oox/inc/oox/ppt/slidepersist.hxx         |    1 +
 oox/source/ppt/layoutfragmenthandler.cxx |    7 +++++++
 3 files changed, 10 insertions(+)

New commits:
commit 2155c4c0af4d4eb228a0644f423aa3d9b5e8a2fb
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Aug 11 18:07:59 2011 +0200

    added support for showMasterSp attribute in sldLayout

diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx
index 83e7243..486b8ef 100644
--- a/oox/inc/oox/drawingml/shape.hxx
+++ b/oox/inc/oox/drawingml/shape.hxx
@@ -147,6 +147,8 @@ public:
                             const ::com::sun::star::awt::Rectangle* pShapeRect = 0,
                             ShapeIdMap* pShapeMap = 0 );
 
+    void                dropChildren() { maChildren.clear(); }
+
     void                setXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rXShape )
                             { mxShape = rXShape; };
     const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > &
diff --git a/oox/inc/oox/ppt/slidepersist.hxx b/oox/inc/oox/ppt/slidepersist.hxx
index e489186..619d9ab 100644
--- a/oox/inc/oox/ppt/slidepersist.hxx
+++ b/oox/inc/oox/ppt/slidepersist.hxx
@@ -111,6 +111,7 @@ public:
     oox::drawingml::TextListStylePtr getOtherTextStyle() const { return maOtherTextStylePtr; }
 
     oox::drawingml::ShapePtr getShapes() { return maShapesPtr; }
+    void dropShapes() { maShapesPtr->dropChildren(); }
     ::std::list< boost::shared_ptr< TimeNode > >& getTimeNodeList() { return maTimeNodeList; }
     oox::ppt::HeaderFooter& getHeaderFooter(){ return maHeaderFooter; };
 
diff --git a/oox/source/ppt/layoutfragmenthandler.cxx b/oox/source/ppt/layoutfragmenthandler.cxx
index 6697f81..a28f4b2 100644
--- a/oox/source/ppt/layoutfragmenthandler.cxx
+++ b/oox/source/ppt/layoutfragmenthandler.cxx
@@ -65,8 +65,15 @@ ContextHandlerRef LayoutFragmentHandler::onCreateContext( sal_Int32 aElementToke
     switch( aElementToken )
     {
         case PPT_TOKEN( sldLayout ):        // CT_SlideLayout
+        {
             mpSlidePersistPtr->setLayoutValueToken( rAttribs.getToken( XML_type, 0 ) ); // CT_SlideLayoutType
+
+            OptValue< bool > aShowMasterShapes = rAttribs.getBool( XML_showMasterSp );
+            if( aShowMasterShapes.has() && !aShowMasterShapes.get() ) {
+                mpSlidePersistPtr->dropShapes();
+            }
         break;
+        }
         case PPT_TOKEN( hf ):               // CT_HeaderFooter
             return new HeaderFooterContext( *this, rAttribs, mpSlidePersistPtr->getHeaderFooter() );
         break;


More information about the Libreoffice-commits mailing list