diff options
author | Szabolcs Toth <szabolcs450@gmail.com> | 2020-03-17 11:39:33 +0100 |
---|---|---|
committer | Balazs Varga <balazs.varga991@gmail.com> | 2020-03-31 10:09:13 +0200 |
commit | cb441c4d0adf698e6af9073c6c3285a66b76871e (patch) | |
tree | 27031285c8443ea52f41c3a466d584b6c5a97683 /oox | |
parent | 41dbdc1499f4512941a38e5972d03d26a2397a89 (diff) |
tdf#100751 DOCX VML shape import: fix arrow direction
Flips along both the y- and x-axis weren't imported,
resulting wrong direction of arrow and other shapes.
Co-Author: Balázs Regényi
Change-Id: Iac222ac2a6a6110289969c32b40828b83da0aefd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90646
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga991@gmail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 1c53a87b463e..bdd9ac593dd6 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -660,11 +660,11 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes oRotation = ConversionHelper::decodeRotation(maTypeModel.maRotation); if (!maTypeModel.maFlip.isEmpty()) { - if (maTypeModel.maFlip == "x") + if (maTypeModel.maFlip.startsWith("x")) { bFlipX = true; } - else if (maTypeModel.maFlip == "y") + if (maTypeModel.maFlip.endsWith("y")) { bFlipY = true; } @@ -820,17 +820,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes // When flip has 'x' or 'y', the associated ShapeRect will be changed but direction change doesn't occur. // It might occur internally in SdrObject of "sw" module, not here. // The associated properties "PROP_MirroredX" and "PROP_MirroredY" have to be set here so that direction change will occur internally. - if (bFlipX || bFlipY) - { - assert(!(bFlipX && bFlipY)); - css::beans::PropertyValue aProp; - if (bFlipX) - aProp.Name = "MirroredX"; - else - aProp.Name = "MirroredY"; - aProp.Value <<= true; - aPropVec.push_back(aProp); - } + if (bFlipX) + aPropVec.push_back(comphelper::makePropertyValue("MirroredX", true)); + if (bFlipY) + aPropVec.push_back(comphelper::makePropertyValue("MirroredY", true)); if (!maTypeModel.maAdjustments.isEmpty()) { |