diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-03-24 14:13:48 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-04-01 11:19:59 +0200 |
commit | 61aa663d9b1d75d1bb0cfc7c4c9e4cb17d8dd00a (patch) | |
tree | 249d530f38f637c08d3623a9cdbd77974707dbf0 /sw | |
parent | f370aa88faf3c0ef7138b87d2bcf89f5eb8541c1 (diff) |
tdf#130969 Chart view: fix incorrect precision of axis labels
Use UNLIMITED_PRECISION in case of GENERAL number format of labels
in embedded charts, just like we do in Calc.
Regression from commit: 7f373a4c88961348f35e4f990182628488878efe
(tdf#48041 Chart: do not duplicate major value)
Change-Id: I298353d748f34e23bc642b3b0c365df6e73c23aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90984
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/data/tdf130969.docx | bin | 0 -> 26299 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf130969.docx b/sw/qa/extras/layout/data/tdf130969.docx Binary files differnew file mode 100644 index 000000000000..446dc16e7dd8 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf130969.docx diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index b6295cab0ef5..2a24e68ccd35 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2547,6 +2547,22 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf124796) "15"); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf130969) +{ + SwDoc* pDoc = createDoc("tdf130969.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; + xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile); + CPPUNIT_ASSERT(pXmlDoc); + + // This failed, if the minimum value of Y axis is not 0.35781 + assertXPathContent( + pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray[5]/text", "0.35781"); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf129054) { SwDoc* pDoc = createDoc("tdf129054.docx"); |