summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorSzabolcs Toth <toth.szabolcs@nisz.hu>2020-09-14 17:16:51 +0200
committerLászló Németh <nemeth@numbertext.org>2020-09-22 09:48:30 +0200
commitd3094b98231730b8e6d863c6a2fc0dd62f3e991a (patch)
tree152fc0d86df8cf024a570cf7dd2076dca2c684ad /sw/qa
parent446de9cbea55af65b5f1a274f1ac4b88a6be9ae6 (diff)
tdf#123610 DOCX shape import: keep text upright
Grab-bag attribute upright to keep text upright regardless of shape rotation, fixing the text direction in MSO after a round-trip. Co-authored-by: Balázs Regényi Change-Id: If18a12c7728317a7af093048b07bc392d2964389 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102690 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docxbin0 -> 14711 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docx b/sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docx
new file mode 100644
index 000000000000..d7dc1978a067
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 76ccf318e8c9..0085734450c0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1142,6 +1142,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testRelativeAnchorWidthFromInsideOutsideMarg
assertXPath(pXmlDoc, "(//SwAnchoredDrawObject)[4]/bounds", "width", "1440");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBodyPrUpright, "tdf123610_handle_upright.docx")
+{
+ // tdf#123610: Check grab-bag attribute upright to keep text upright regardless of shape rotation.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp/wps:bodyPr", "upright", "1");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */