summaryrefslogtreecommitdiff
path: root/oox/source/vml
diff options
context:
space:
mode:
authorDaniel Arato (NISZ) <arato.daniel@nisz.hu>2020-09-07 11:50:53 +0200
committerLászló Németh <nemeth@numbertext.org>2020-09-11 10:19:18 +0200
commit8ee88230c110ae90b439a52bc2906d6c5383967f (patch)
treea4ab2cc478e9efe6c41373fe8fdd327401192227 /oox/source/vml
parent46187510e383d62ee7bae8f8332322d7c3b0c61e (diff)
tdf#135660 DOCX import: fix OLE icon wrap distance
The text wrap distance (also sometimes called "margin") of OLE VML icons used to be thrown away when a .docx file is opened. Change-Id: I79837421470dde5e68e916f87924b170ebf1d734 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102159 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source/vml')
-rw-r--r--oox/source/vml/vmlshape.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index f8a4c9000e66..905548bafb9e 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -911,6 +911,15 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >&
const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
lcl_SetAnchorType(aPropSet, maTypeModel, rGraphicHelper);
+ const sal_Int32 nWrapDistanceLeft = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceLeft, 0, true, true);
+ const sal_Int32 nWrapDistanceRight = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceRight, 0, true, true);
+ const sal_Int32 nWrapDistanceTop = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceTop, 0, false, true);
+ const sal_Int32 nWrapDistanceBottom = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceBottom, 0, false, true);
+ aPropSet.setProperty(PROP_LeftMargin, uno::makeAny(nWrapDistanceLeft));
+ aPropSet.setProperty(PROP_RightMargin, uno::makeAny(nWrapDistanceRight));
+ aPropSet.setProperty(PROP_TopMargin, uno::makeAny(nWrapDistanceTop));
+ aPropSet.setProperty(PROP_BottomMargin, uno::makeAny(nWrapDistanceBottom));
+
if (maTypeModel.moCropBottom.has() || maTypeModel.moCropLeft.has() || maTypeModel.moCropRight.has() || maTypeModel.moCropTop.has())
{
text::GraphicCrop aGraphicCrop;