summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/drawingml/shapecontext.cxx2
-rw-r--r--oox/source/ppt/pptshape.cxx4
3 files changed, 8 insertions, 0 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 0fca9c0e1ac3..78a20b46861b 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -150,6 +150,7 @@ Shape::Shape( const char* pServiceName, bool bDefaultHeight )
, mbWps( false )
, mbTextBox( false )
, mbHasLinkedTxbx( false )
+, mbHasCustomPrompt( false )
, maDiagramDoms( 0 )
, mpDiagramHelper( nullptr )
{
@@ -194,6 +195,7 @@ Shape::Shape( const ShapePtr& pSourceShape )
, mbWps( pSourceShape->mbWps )
, mbTextBox( pSourceShape->mbTextBox )
, mbHasLinkedTxbx(false)
+, mbHasCustomPrompt( pSourceShape->mbHasCustomPrompt )
, maDiagramDoms( pSourceShape->maDiagramDoms )
, mnZOrder(pSourceShape->mnZOrder)
, mnZOrderOff(pSourceShape->mnZOrderOff)
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index 73fdab79508e..6407fb58a1f3 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -89,6 +89,8 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const
mpShapePtr->setSubType( rAttribs.getToken( XML_type, XML_obj ) );
if( rAttribs.hasAttribute( XML_idx ) )
mpShapePtr->setSubTypeIndex( rAttribs.getInteger( XML_idx, 0 ) );
+ if( rAttribs.hasAttribute( XML_hasCustomPrompt ) )
+ mpShapePtr->setHasCustomPrompt( rAttribs.getBool( XML_hasCustomPrompt, false ) );
break;
// nvSpPr CT_ShapeNonVisual end
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index b6dd0f1c4603..a68ad18cf5b2 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -455,6 +455,10 @@ void PPTShape::addShape(
Reference < XText > xText(mxShape, UNO_QUERY);
if (xText.is())
{
+ if (mpPlaceholder && mpPlaceholder->getTextBody() && !mpPlaceholder->getTextBody()->isEmpty()
+ && mpPlaceholder->hasCustomPrompt())
+ xText->setString(mpPlaceholder->getTextBody()->toString());
+
TextCharacterProperties aCharStyleProperties;
getTextBody()->ApplyStyleEmpty(rFilterBase, xText, aCharStyleProperties, mpMasterTextListStyle);
}