summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2010-10-08 13:54:35 +0200
committerRadek Doulik <rodo@novell.com>2010-10-08 13:54:35 +0200
commite4b13897f5bd03a1782654d32951b0fbd5ad216e (patch)
tree425b4c3b974928e546a12f2d853c2ef190c06b06 /oox
parent69a1226fc68c3e837ad57500fcb629daaa9f6f2d (diff)
oox-pptx-import-fix-layout.diff: fix list styles applying.
n#480223
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/ppt/pptshape.hxx5
-rw-r--r--oox/source/ppt/pptshape.cxx12
-rw-r--r--oox/source/ppt/pptshapecontext.cxx1
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 );
}
}
}