summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-07-09 11:08:38 +0200
committerLászló Németh <nemeth@numbertext.org>2020-07-15 18:01:31 +0200
commit9eb614f8d2d9cc983c51bcdde211ee0c59c3a96c (patch)
tree58286b2c0c7a6c9d1d2ad439efd75535d458c567 /sw/qa/extras/layout
parent6d1e9482cf1519e5b4d73331a5bcdfbbc9a15776 (diff)
tdf#134659 chart2: use centered label alignment at text break
instead of left for axis labels broken into several lines. Change-Id: Iaf516055748189fa50165f0e954dfe0db15bbfb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98413 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r--sw/qa/extras/layout/data/tdf134659.docxbin0 -> 25623 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx19
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf134659.docx b/sw/qa/extras/layout/data/tdf134659.docx
new file mode 100644
index 000000000000..7fb0bed23d7f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf134659.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index e9d850bdcf2d..f342c2c94f5b 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2824,6 +2824,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf132956)
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122014)
+
{
SwDoc* pDoc = createDoc("tdf122014.docx");
SwDocShell* pShell = pDoc->GetDocShell();
@@ -2840,6 +2841,24 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122014)
CPPUNIT_ASSERT_GREATER(nX1 + 100, nX2);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134659)
+
+{
+ SwDoc* pDoc = createDoc("tdf134659.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 axis label is aligned to left.
+ sal_Int32 nX1 = getXPath(pXmlDoc, "//textarray[1]", "x").toInt32();
+ sal_Int32 nX2 = getXPath(pXmlDoc, "//textarray[2]", "x").toInt32();
+ CPPUNIT_ASSERT_GREATER(nX1 + 250, nX2);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134235)
{
SwDoc* pDoc = createDoc("tdf134235.docx");