summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-05-12 15:36:06 +0200
committerLászló Németh <nemeth@numbertext.org>2020-05-21 12:06:33 +0200
commitcf46500243c51071227e08c5067041e414180ebc (patch)
tree8907dfc49d47a01f20cd3e70838166cdacbf1ac2 /sw/qa/extras
parent45fe51bca2ab534cfe1139b734d839728225d6d9 (diff)
tdf#132956 Chart view: fix missing plot area
Do not reduce the inside area of the chart depending on the size of the legend. Use the default legend size. Regression from commit: 739ed2c29f49ea5e83bcd1352b2644c2e2d09f7b (tdf#115630 tdf#88922 Chart: fix custom legend position and size) Change-Id: Ic191229d7ceab1f2689ab07424353108f8cb2b95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94059 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Tünde Tóth <tundeth@gmail.com> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/layout/data/tdf132956.docxbin0 -> 25937 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx20
2 files changed, 18 insertions, 2 deletions
diff --git a/sw/qa/extras/layout/data/tdf132956.docx b/sw/qa/extras/layout/data/tdf132956.docx
new file mode 100644
index 000000000000..6e3852b38c5c
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf132956.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index e98b7f0ebded..853d6b997381 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2369,7 +2369,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf115630)
"/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/push[3]/polyline[1]/point[2]",
"x")
.toInt32();
- CPPUNIT_ASSERT_DOUBLES_EQUAL(2886, nXRight - nXLeft, 2);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2895, nXRight - nXLeft, 50);
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf108021)
@@ -2695,7 +2695,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf129095)
xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
CPPUNIT_ASSERT(pXmlDoc);
- // check the inner chart area visibility with testing the X axis label
+ // check the inner chart area (relative size) visibility with testing the X axis label
+ assertXPathContent(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray/text",
+ "Category 1");
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf132956)
+{
+ SwDoc* pDoc = createDoc("tdf132956.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);
+
+ // check the inner chart area (default size) visibility with testing the X axis label
assertXPathContent(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray/text",
"Category 1");
}