diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-08-29 13:44:37 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-09-02 09:41:32 +0200 |
commit | 0d2340998415fb4b2f794054c62ef61c83e32155 (patch) | |
tree | 8061d63de276c27cc75f961742033b31105beb8d /sw | |
parent | 7541fac2c0d5341f4d362779594ae236f05ff9a6 (diff) |
tdf#136061 Chart ODF/OOXML: fix missing custom labels
by UNO extensions ShowCustomLabel in DataPointLabel.idl and
CUSTOM in ChartDataCaption.idl, fixing OOXML/ODF import/export.
We should display custom data label even if DataPointLabel is
disabled (e.g. category name and/or value fields are not displayed).
Note: import of the embedded chart of the DOCX unit test
document uses also ODF format in the background, testing
also the extension of the native file format.
Change-Id: I73e21f1e69fddec9f3b4163c46b6582cd1c74b5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101640
Tested-by: Jenkins
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/tdf136061.docx | bin | 0 -> 25928 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf136061.docx b/sw/qa/extras/layout/data/tdf136061.docx Binary files differnew file mode 100644 index 000000000000..c91e3438ffbf --- /dev/null +++ b/sw/qa/extras/layout/data/tdf136061.docx diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 5e8f2d89eed4..008419887c75 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -3068,6 +3068,20 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134146) assertXPath(pXmlDoc, "//textarray", 14); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf136061) +{ + SwDoc* pDoc = createDoc("tdf136061.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); + // This failed, if the custom text of data label is missing. + assertXPathContent(pXmlDoc, "//textarray[16]/text", "Customlabel"); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116925) { SwDoc* pDoc = createDoc("tdf116925.docx"); |