diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-07-01 15:48:19 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-07-07 10:13:38 +0200 |
commit | 23b73bc02536455df75438e19b5c70bacc9aa700 (patch) | |
tree | f061a5cf7ed60fb75b9c1977abd01f2e1bdf987e /sw | |
parent | 9a28558a222db9b066283ff78e71d1e5910f2569 (diff) |
tdf#134146 Chart OOXML import: break long horizontal Y axis title
Workaround to handle long (near) horizontal Y axis titles,
like MSO does.
See commit 17f131fcb3f534792a3b2ec6048d03fb54b55eb1
(tdf#134235 Chart OOXML import: fix long chart title).
Change-Id: I215aaa8e2ca18920e2b7ca5761c5bed7e8d19663
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97631
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/data/tdf134146.docx | bin | 0 -> 27259 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf134146.docx b/sw/qa/extras/layout/data/tdf134146.docx Binary files differnew file mode 100644 index 000000000000..9fe1bc06196f --- /dev/null +++ b/sw/qa/extras/layout/data/tdf134146.docx diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index a4c46a3d69de..94cd82d26782 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2840,6 +2840,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134235) assertXPath(pXmlDoc, "//textarray", 14); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134146) +{ + SwDoc* pDoc = createDoc("tdf134146.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 Y axis title didn't break to multilple lines. + assertXPath(pXmlDoc, "//textarray", 14); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116925) { SwDoc* pDoc = createDoc("tdf116925.docx"); |