diff options
author | Muthu Subramanian <sumuthu@suse.com> | 2012-05-08 13:03:38 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@suse.com> | 2012-05-08 13:03:38 +0530 |
commit | 90352e5f1e50291960c944f9a1f44ab3e91d6503 (patch) | |
tree | c9568fb5ed2a71921750b3fca376011da4800a75 /oox | |
parent | 3a35fd8f1c6b176e675b998a82526636aad5a00b (diff) |
n759212: Text over images.
Default text may not make sense to be copied from the
master slide to the slides when there is an image.
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/drawingml/shape.hxx | 2 | ||||
-rw-r--r-- | oox/inc/oox/ppt/pptshape.hxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 4 | ||||
-rw-r--r-- | oox/source/ppt/pptgraphicshapecontext.cxx | 8 | ||||
-rw-r--r-- | oox/source/ppt/pptshape.cxx | 6 |
5 files changed, 13 insertions, 9 deletions
diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx index 6989edeb95be..f2553fb0eef4 100644 --- a/oox/inc/oox/drawingml/shape.hxx +++ b/oox/inc/oox/drawingml/shape.hxx @@ -174,7 +174,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & getXShape() const { return mxShape; } - virtual void applyShapeReference( const Shape& rReferencedShape ); + virtual void applyShapeReference( const Shape& rReferencedShape, bool bUseText = true ); const ::std::vector<rtl::OUString>& getExtDrawings() { return maExtDrawings; } void addExtDrawingRelId( const ::rtl::OUString &rRelId ) { maExtDrawings.push_back( rRelId ); } diff --git a/oox/inc/oox/ppt/pptshape.hxx b/oox/inc/oox/ppt/pptshape.hxx index 07ab72373b47..e171f24fd6a8 100644 --- a/oox/inc/oox/ppt/pptshape.hxx +++ b/oox/inc/oox/ppt/pptshape.hxx @@ -57,7 +57,7 @@ public: const com::sun::star::awt::Rectangle* pShapeRect = 0, ::oox::drawingml::ShapeIdMap* pShapeMap = 0 ); - virtual void applyShapeReference( const oox::drawingml::Shape& rReferencedShape ); + virtual void applyShapeReference( const oox::drawingml::Shape& rReferencedShape, bool bUseText = true ); void setShapeLocation( const oox::ppt::ShapeLocation eShapeLocation ) { meShapeLocation = eShapeLocation; }; ShapeLocation getShapeLocation() const { return meShapeLocation; }; diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 0019195b14d9..9bdb962787a9 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -230,11 +230,11 @@ void Shape::addShape( } } -void Shape::applyShapeReference( const Shape& rReferencedShape ) +void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText ) { SAL_INFO("oox", "apply shape reference: " << rReferencedShape.msId << " to shape id: " << msId); - if ( rReferencedShape.mpTextBody.get() ) + if ( rReferencedShape.mpTextBody.get() && bUseText ) mpTextBody = TextBodyPtr( new TextBody( *rReferencedShape.mpTextBody.get() ) ); else mpTextBody.reset(); diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx index 70fa5dd5ab20..e174b3f29fde 100644 --- a/oox/source/ppt/pptgraphicshapecontext.cxx +++ b/oox/source/ppt/pptgraphicshapecontext.cxx @@ -158,10 +158,14 @@ Reference< XFastContextHandler > PPTGraphicShapeContext::createFastChildContext( } if ( pPlaceholder.get() ) { - mpShapePtr->applyShapeReference( *pPlaceholder.get() ); + bool bUseText = true; + // TODO: Check if pPlaceholder->getSubType is none (i.e. none explicitly specified) + if( pPlaceholder->getSubType() == XML_obj ) + bUseText = false; + mpShapePtr->applyShapeReference( *pPlaceholder.get(), bUseText ); PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() ); if ( pPPTShape ) - pPPTShape->setReferenced( sal_True ); + pPPTShape->setReferenced( sal_True ); pPPTShapePtr->setPlaceholder( pPlaceholder ); } } diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 2e2f4f47cbd9..d7fba77af322 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -331,7 +331,7 @@ void PPTShape::addShape( aCombinedTextListStyle->apply( *aMasterTextListStyle.get() ); if( mpPlaceholder.get() && mpPlaceholder->getTextBody().get() ) - aCombinedTextListStyle->apply( mpPlaceholder->getTextBody()->getTextListStyle() ); + aCombinedTextListStyle->apply( mpPlaceholder->getTextBody()->getTextListStyle() ); aCombinedTextListStyle->apply( getTextBody()->getTextListStyle() ); setMasterTextListStyle( aCombinedTextListStyle ); @@ -374,9 +374,9 @@ void PPTShape::addShape( } } -void PPTShape::applyShapeReference( const oox::drawingml::Shape& rReferencedShape ) +void PPTShape::applyShapeReference( const oox::drawingml::Shape& rReferencedShape, bool bUseText ) { - Shape::applyShapeReference( rReferencedShape ); + Shape::applyShapeReference( rReferencedShape, bUseText ); } oox::drawingml::ShapePtr PPTShape::findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ) |