merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0345-oox-pptx-import-fix-layout.diff
blob900c57220001e270d0500a866e071a765c571dc6
1 diff -rup ../../build-orig/ooo310-m10/oox/inc/oox/ppt/pptshape.hxx oox/inc/oox/ppt/pptshape.hxx
2 --- ../../build-orig/ooo310-m10/oox/inc/oox/ppt/pptshape.hxx 2008-04-10 16:45:28.000000000 +0200
3 +++ oox/inc/oox/ppt/pptshape.hxx 2009-04-24 12:33:35.000000000 +0200
4 @@ -64,9 +64,11 @@ public:
5 ShapeLocation getShapeLocation() const { return meShapeLocation; };
6 sal_Bool isReferenced() const { return mbReferenced; };
7 void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; };
8 + void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
10 protected:
12 + oox::drawingml::ShapePtr mpPlaceholder;
15 } }
16 diff -rup ../../build-orig/ooo310-m10/oox/source/ppt/pptshapecontext.cxx oox/source/ppt/pptshapecontext.cxx
17 --- ../../build-orig/ooo310-m10/oox/source/ppt/pptshapecontext.cxx 2009-04-24 13:53:44.000000000 +0200
18 +++ oox/source/ppt/pptshapecontext.cxx 2009-04-24 12:37:44.000000000 +0200
19 @@ -203,6 +203,7 @@ Reference< XFastContextHandler > PPTShap
20 PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
21 if ( pPPTShape )
22 pPPTShape->setReferenced( sal_True );
23 + pPPTShapePtr->setPlaceholder( pPlaceholder );
27 diff -rup ../../build-orig/ooo310-m10/oox/source/ppt/pptshape.cxx oox/source/ppt/pptshape.cxx
28 --- ../../build-orig/ooo310-m10/oox/source/ppt/pptshape.cxx 2009-04-24 13:53:45.000000000 +0200
29 +++ oox/source/ppt/pptshape.cxx 2009-04-24 12:38:41.000000000 +0200
30 @@ -31,6 +31,7 @@
31 #include "oox/ppt/pptshape.hxx"
32 #include "oox/core/namespaces.hxx"
33 #include "oox/core/xmlfilterbase.hxx"
34 +#include "oox/drawingml/textbody.hxx"
35 #include "tokens.hxx"
37 #include <com/sun/star/container/XNamed.hpp>
38 @@ -43,6 +44,7 @@
40 using rtl::OUString;
41 using namespace ::oox::core;
42 +using namespace ::oox::drawingml;
43 using namespace ::com::sun::star;
44 using namespace ::com::sun::star::awt;
45 using namespace ::com::sun::star::uno;
46 @@ -158,7 +160,19 @@ void PPTShape::addShape(
47 // use style from master slide for placeholders only, otherwise use slide's style, which might be the default style from presentation
48 if ( !aMasterTextListStyle.get() )
49 aMasterTextListStyle = ( mnSubType && rSlidePersist.getMasterPersist().get() ) ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getOtherTextStyle();
50 - setMasterTextListStyle( aMasterTextListStyle );
52 + if( aMasterTextListStyle.get() && getTextBody().get() ) {
53 + TextListStylePtr aCombinedTextListStyle (new TextListStyle());
55 + aCombinedTextListStyle->apply( *aMasterTextListStyle.get() );
57 + if( mpPlaceholder.get() && mpPlaceholder->getTextBody().get() )
58 + aCombinedTextListStyle->apply( mpPlaceholder->getTextBody()->getTextListStyle() );
59 + aCombinedTextListStyle->apply( getTextBody()->getTextListStyle() );
61 + setMasterTextListStyle( aCombinedTextListStyle );
62 + } else
63 + setMasterTextListStyle( aMasterTextListStyle );
65 Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, rxTheme, rxShapes, pShapeRect ) );