[Libreoffice-commits] core.git: oox/source sw/qa
Regényi Balázs (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 31 14:04:39 UTC 2020
oox/source/vml/vmlshape.cxx | 4 +++
sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 13 ++++++++++
3 files changed, 17 insertions(+)
New commits:
commit 0d773f0b07798a59f7cf31207813aaf6bc9bb922
Author: Regényi Balázs <regenyi.balazsmiklos at nisz.hu>
AuthorDate: Sat Aug 29 09:11:46 2020 +0200
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Mon Aug 31 16:04:01 2020 +0200
tdf#97618 DOCX import: VML shape: fix missing square wrap
Co-authored-by: Szabolcs Tóth
Change-Id: Ib9db4b0270ed7d4b3d47406f2384276cafdd7249
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101632
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 362f02c7cabf..85ad112bcfae 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -791,6 +791,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
eTextVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
PropertySet(xShape).setAnyProperty(PROP_TextVerticalAdjust, makeAny(eTextVerticalAdjust));
+ // tdf#97618
+ if(!maTypeModel.maWrapStyle.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_TextWordWrap, makeAny(maTypeModel.maWrapStyle == "square"));
+
PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight,
makeAny(maTypeModel.mbAutoHeight));
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docx b/sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docx
new file mode 100644
index 000000000000..eb31a1244c01
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index e68dde7499e7..30a27a22e1ce 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -1264,6 +1264,19 @@ DECLARE_OOXMLEXPORT_TEST(testRelativeAnchorHeightFromTopMarginNoHeader,
assertXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "height", "2551");
}
+DECLARE_OOXMLEXPORT_TEST(testVmlShapeTextWordWrap, "tdf97618_testVmlShapeTextWordWrap.docx")
+{
+ // tdf#97618 The text wraping of a shape was not handled in a canvas.
+ // TODO: fix export too
+ if (mbExported)
+ return;
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ if (!pXmlDoc)
+ return;
+ // The bound rect of shape will be wider if wrap does not work (the wrong value is 3167).
+ assertXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "width", "2500");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list