diff options
Diffstat (limited to 'xmloff/source/draw/ximpshap.cxx')
| -rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index c68be43fc9c9..21339eb6bbcf 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -696,6 +696,15 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) } } + // Writer shapes: if this one has a TextBox, set it here. We need to do it before + // pDocStyle->FillPropertySet, because setting some properties depend on the format + // having RES_CNTNT attribute (e.g., UNO_NAME_TEXT_(LEFT|RIGHT|UPPER|LOWER)DIST; see + // SwTextBoxHelper::syncProperty, which indirectly calls SwTextBoxHelper::isTextBox) + uno::Reference<beans::XPropertySetInfo> xPropertySetInfo + = xPropSet->getPropertySetInfo(); + if (xPropertySetInfo->hasPropertyByName("TextBox")) + xPropSet->setPropertyValue("TextBox", uno::makeAny(mbTextBox)); + // if this is an auto style, set its properties if(bAutoStyle && pDocStyle) { @@ -703,11 +712,6 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) pDocStyle->FillPropertySet(xPropSet); } - // Writer shapes: if this one has a TextBox, set it here. - uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropSet->getPropertySetInfo(); - if (xPropertySetInfo->hasPropertyByName("TextBox")) - xPropSet->setPropertyValue("TextBox", uno::makeAny(mbTextBox)); - } while(false); // try to set text auto style |
