summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2020-06-25 10:43:58 +0200
committerLászló Németh <nemeth@numbertext.org>2020-06-29 12:52:44 +0200
commit17f131fcb3f534792a3b2ec6048d03fb54b55eb1 (patch)
treefba5ac3d4f57c353fe89f157133e1da12a1cae9d /sw/qa/extras/layout
parent51a4c85bf9228a3750b61cb54e64c8134314a35e (diff)
tdf#134235 Chart OOXML import: fix long chart title
Workaround to handle long (sub)titles which resulted broken charts. See commit 96a29c12a9d8734c9d2a812f38fc6654b5df9c48 (tdf#101322 Chart OOXML Export: fix missing subtitle). Change-Id: I22bb4699bdda8dea5f31c715cc1f439085a0718f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97092 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/tdf134235.docxbin0 -> 27348 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf134235.docx b/sw/qa/extras/layout/data/tdf134235.docx
new file mode 100644
index 000000000000..af0cb0d3de43
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf134235.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index a44d0396cf3d..e5c2784c17cb 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2776,6 +2776,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf132956)
"Category 1");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134235)
+{
+ SwDoc* pDoc = createDoc("tdf134235.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);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 14
+ // - Actual : 13
+ // i.e. the chart title flowed out of chart area.
+ assertXPath(pXmlDoc, "//textarray", 14);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116925)
{
SwDoc* pDoc = createDoc("tdf116925.docx");