diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-07-07 10:50:24 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-07-14 21:52:45 +0200 |
commit | 944892091ad30c5da192b20d189c7a4388b0c91d (patch) | |
tree | 543d2b32a64e61072317be383a19363ac52bda3a /sw | |
parent | 8901f44746f3df147d327e95125cbd4a08049843 (diff) |
tdf#122014 Chart OOXML import: set chart title alignment to center
Regression from commit: d4190685ac208677bc77f66976287dda0360c42d
(tdf#114836, only set changed SfxItemSet properties)
Change-Id: If33fa39019bbd36632d15eb3cc0606727e58b111
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98241
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit f6fc6ab2a2792c22a3e74cce83ac7d19c820c9b4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98753
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/data/tdf122014.docx | bin | 0 -> 27324 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf122014.docx b/sw/qa/extras/layout/data/tdf122014.docx Binary files differnew file mode 100644 index 000000000000..400939495984 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf122014.docx diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 0a84d6ab69f6..652b8c9aed3a 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2824,6 +2824,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf132956) "Category 1"); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122014) +{ + SwDoc* pDoc = createDoc("tdf122014.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 chart title is aligned to left. + sal_Int32 nX1 = getXPath(pXmlDoc, "//textarray[13]", "x").toInt32(); + sal_Int32 nX2 = getXPath(pXmlDoc, "//textarray[14]", "x").toInt32(); + CPPUNIT_ASSERT_GREATER(nX1 + 100, nX2); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134235) { SwDoc* pDoc = createDoc("tdf134235.docx"); |