Kaydet (Commit) 90352e5f authored tarafından Muthu Subramanian's avatar Muthu Subramanian

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.
üst 3a35fd8f
......@@ -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 ); }
......
......@@ -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; };
......
......@@ -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();
......
......@@ -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 );
}
}
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment