diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2019-04-25 15:00:55 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-04-26 08:50:10 +0200 |
commit | 2ec293ab590c440fe7e36f5b7fcbef4cbfe5133c (patch) | |
tree | 333b6a0ec2ed003a1758113a642a591fa181e246 /sw | |
parent | 92d7f55c1688295677519163cc8f94c6af52dc8e (diff) |
tdf#124796 Fix chart primary Y axis scaling
Re-scale the primary Y axis if the secondary axis
is deleted and the dataseries still attached to the
secondary axis.
Change-Id: I6e7958766d23a74569ce8529ddf1bdafa89f1870
Reviewed-on: https://gerrit.libreoffice.org/71302
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/data/tdf124796.odt | bin | 0 -> 14342 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 24 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf124796.odt b/sw/qa/extras/layout/data/tdf124796.odt Binary files differnew file mode 100644 index 000000000000..2a8d2c816ad1 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf124796.odt diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 91705c8e18d9..c17adf1bba92 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2340,6 +2340,30 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122800) // This failed, if the textarray length of the first axis label not 22. } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf124796) +{ + SwDoc* pDoc = createDoc("tdf124796.odt"); + 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 -10. + assertXPathContent( + pXmlDoc, + "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[5]/text", + "-10"); + + // This failed, if the maximum value of Y axis is not 15. + assertXPathContent( + pXmlDoc, + "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[10]/text", + "15"); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116925) { SwDoc* pDoc = createDoc("tdf116925.docx"); |