summaryrefslogtreecommitdiff
path: root/oox/source/vml/vmlshape.cxx
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2020-05-08 10:32:09 +0200
committerLászló Németh <nemeth@numbertext.org>2020-05-18 10:51:03 +0200
commit52442a4c0192cbedafe7b77459dd2c3d1cf3614b (patch)
tree0cf519c16121ed6d0c7a230b4043e1217f1c7a1f /oox/source/vml/vmlshape.cxx
parenta782cce919952cff41c7cfa7ec3a6a915e1851aa (diff)
tdf#123622 DOCX VML import: fix relative horizontal alignment
Margin (left, right, inner, outer) alignments of VML shapes weren't handled. Co-authored-by: Attila Bakos (NISZ) Change-Id: I5f8ece64707a2d699b71d6151887db05ac39c4f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93723 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source/vml/vmlshape.cxx')
-rw-r--r--oox/source/vml/vmlshape.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index a6687ab65100..55eb9020ae11 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -632,10 +632,16 @@ static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rType
if ( rTypeModel.maPositionHorizontalRelative == "page" )
rPropSet.setAnyProperty(PROP_HoriOrientRelation, makeAny(text::RelOrientation::PAGE_FRAME));
- else if ( rTypeModel.maPositionVerticalRelative == "margin" )
- rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_PRINT_AREA);
- else if ( rTypeModel.maPositionVerticalRelative == "text" )
- rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::FRAME);
+ else if ( rTypeModel.maPositionHorizontalRelative == "margin" )
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::PAGE_PRINT_AREA);
+ else if (rTypeModel.maPositionHorizontalRelative == "right-margin-area" ||
+ rTypeModel.maPositionHorizontalRelative == "inner-margin-area")
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::PAGE_RIGHT);
+ else if (rTypeModel.maPositionHorizontalRelative == "left-margin-area" ||
+ rTypeModel.maPositionHorizontalRelative == "outer-margin-area")
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::PAGE_LEFT);
+ else if ( rTypeModel.maPositionHorizontalRelative == "text" )
+ rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::FRAME);
if ( rTypeModel.maPositionVertical == "center" )
rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::CENTER));