diff options
-rw-r--r-- | oox/inc/oox/ppt/pptshape.hxx | 5 | ||||
-rw-r--r-- | oox/source/ppt/pptshape.cxx | 12 | ||||
-rw-r--r-- | oox/source/ppt/pptshapecontext.cxx | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/oox/inc/oox/ppt/pptshape.hxx b/oox/inc/oox/ppt/pptshape.hxx index 3376e5bb1ace..1fb1e8070f4f 100644 --- a/oox/inc/oox/ppt/pptshape.hxx +++ b/oox/inc/oox/ppt/pptshape.hxx @@ -61,10 +61,15 @@ public: ShapeLocation getShapeLocation() const { return meShapeLocation; }; sal_Bool isReferenced() const { return mbReferenced; }; void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; }; + void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; } static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ); static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes ); static oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ); + +protected: + + oox::drawingml::ShapePtr mpPlaceholder; }; } } diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 44290e3eaf4f..c4e579e8c551 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -189,6 +189,18 @@ void PPTShape::addShape( // use style from master slide for placeholders only, otherwise use slide's style, which might be the default style from presentation if ( !aMasterTextListStyle.get() ) aMasterTextListStyle = ( mnSubType && rSlidePersist.getMasterPersist().get() ) ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getOtherTextStyle(); + + if( aMasterTextListStyle.get() && getTextBody().get() ) { + TextListStylePtr aCombinedTextListStyle (new TextListStyle()); + + aCombinedTextListStyle->apply( *aMasterTextListStyle.get() ); + + if( mpPlaceholder.get() && mpPlaceholder->getTextBody().get() ) + aCombinedTextListStyle->apply( mpPlaceholder->getTextBody()->getTextListStyle() ); + aCombinedTextListStyle->apply( getTextBody()->getTextListStyle() ); + + setMasterTextListStyle( aCombinedTextListStyle ); + } else setMasterTextListStyle( aMasterTextListStyle ); Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, bClearText ) ); diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index c59638553018..460a18d3c951 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -180,6 +180,7 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() ); if ( pPPTShape ) pPPTShape->setReferenced( sal_True ); + pPPTShapePtr->setPlaceholder( pPlaceholder ); } } } |