summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2021-01-05 09:19:40 +0100
committerLászló Németh <nemeth@numbertext.org>2021-01-08 13:53:42 +0100
commit2752fd1b665694a4db3a4e34c7fdc8780a86492e (patch)
tree09f775eb31b3c06c918f6b9c1332b5e7ce02aa3c /sw/qa/extras/layout
parent87f0786156105ef721af069c636b7814a7a39abc (diff)
tdf138773 Chart OOXML import: set text overlap to false
of category axis label, if the rotation is undefined in xml, to avoid e.g. missing rotation of them. Regression from commit: 21620f9d2f50e66dffc45a5afb539edb8d54434c (tdf#138194 Chart OOXML import: set text break to true) Change-Id: I5b03614eca547a206afc0d8118e3f6c055ed5348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108792 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r--sw/qa/extras/layout/data/tdf138773.docxbin0 -> 26209 bytes
-rw-r--r--sw/qa/extras/layout/layout2.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf138773.docx b/sw/qa/extras/layout/data/tdf138773.docx
new file mode 100644
index 000000000000..656c596bc458
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf138773.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 4ce216cf112e..bcb1f4c0f074 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -733,6 +733,24 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf138194)
assertXPath(pXmlDoc, "//textarray", 8);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf138773)
+{
+ SwDoc* pDoc = createDoc("tdf138773.docx");
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // Dump the rendering of the first page as an XML file.
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ const sal_Int32 nFirstLabelLines
+ = getXPathContent(pXmlDoc, "count(//text[contains(text(),\"2000-01\")])").toInt32();
+
+ // This failed, if the first X axis label broke to multiple lines.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nFirstLabelLines);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf124796)
{
SwDoc* pDoc = createDoc("tdf124796.odt");