diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-03-16 21:18:25 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-03-17 09:00:24 +0100 |
commit | 4ee7ee1c4a515479bc174543af4dbc400035c0ba (patch) | |
tree | 548db586919077b149169c02b638f68ad4927b08 /oox/source/vml | |
parent | 69b0d194d83aa29008eaffe65f1784d60f57e63c (diff) |
tdf#131118 VML import: fix size of non-autosize shapes containing text
Regression from commit b92293b3943423324064a8513c2e114d18817179
(tdf#103983 VML import: handle <v:textbox
style="mso-fit-shape-to-text:t">, 2020-01-20), the problem was that in
case we disable autosize too late, then the size will be already set
during adding text to the shape.
Do it before adding text, this way adding text won't change the shape
size, so it'll be correct at the end of the import.
Change-Id: I9410fc695c3edfa5089d845864bf237e71c533c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90592
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox/source/vml')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 3444c1cd2743..0e9770a6cdbb 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -783,6 +783,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes eTextVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM; PropertySet(xShape).setAnyProperty(PROP_TextVerticalAdjust, makeAny(eTextVerticalAdjust)); + PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight, + makeAny(maTypeModel.mbAutoHeight)); + if (getTextBox()) { getTextBox()->convert(xShape); @@ -796,9 +799,6 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes xShape->setSize(aSize); } } - - PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight, - makeAny(maTypeModel.mbAutoHeight)); } // Import Legacy Fragments (if any) |