summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-09-10 17:07:47 +0300
committerAndras Timar <andras.timar@collabora.com>2018-09-11 18:37:29 +0200
commitc20276eb5c80114cf23a6950d836e722103c0f30 (patch)
treee3aaf3bf82671a76486ff1338a610e5f29c0bda4 /xmloff
parentff1500df0ff350caa091d042a9db4ab8696d4918 (diff)
tdf#109229: Set "TextBox" prop before filling textbox-related props
Otherwise those properties aren't set, and defaults are used Change-Id: Ib6671c019ff652ec5b59d9cbbf02a4e536a17817 Reviewed-on: https://gerrit.libreoffice.org/60267 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit c3422cd205d8da852f5c310b5f08028d6c4c5eb4) Reviewed-on: https://gerrit.libreoffice.org/60297 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/ximpshap.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 2f4f873a9cf4..5cf305acbe0c 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -690,6 +690,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)
{
@@ -697,11 +706,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