sd/qa/unit/import-tests.cxx | 27 +-------------------------- sd/qa/unit/layout-tests.cxx | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-)
New commits: commit 0ec81837cba7be61b41fd475e14172bc813a7046 Author: Xisco Fauli <[email protected]> AuthorDate: Mon Jan 17 18:41:00 2022 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Jan 17 20:01:32 2022 +0100 sd: this is actually a layout test, move it to the right file Partially revert fa5ab8aa5d88e7128015127af75980a65f945cbb < tdf#135843 Fix the missing border handling > Change-Id: Ib80530c9e46e029c910843beac0d55dbd393af3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128512 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 5035fa6cedb8..303ab76bed7b 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -101,7 +101,6 @@ #include <vcl/dibtools.hxx> #include <svx/svdograf.hxx> #include <vcl/filter/PDFiumLibrary.hxx> -#include <vcl/gdimtf.hxx> using namespace ::com::sun::star; @@ -118,7 +117,7 @@ static std::ostream& operator<<(std::ostream& rStrm, const uno::Reference<T>& xR /// Impress import filters tests. -class SdImportTest : public SdModelTestBaseXML +class SdImportTest : public SdModelTestBase { public: virtual void setUp() override; @@ -188,7 +187,6 @@ public: void testTdf93124(); void testTdf99729(); void testTdf89927(); - void testTdf135843(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -257,7 +255,6 @@ public: CPPUNIT_TEST(testTdf93124); CPPUNIT_TEST(testTdf99729); CPPUNIT_TEST(testTdf89927); - CPPUNIT_TEST(testTdf135843); CPPUNIT_TEST_SUITE_END(); }; @@ -1961,28 +1958,6 @@ void SdImportTest::testTdf89927() xDocShRef->DoClose(); } -void SdImportTest::testTdf135843() -{ - sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf135843.pptx"), PPTX ); - - std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile(); - MetafileXmlDump dumper; - - xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile); - CPPUNIT_ASSERT(pXmlDoc); - - // Without the fix, the test fails with: - // - Expected: 21165 - // - Actual : 4218 - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[1]", "x", "21165"); - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[1]", "y", "3866"); - - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[2]", "x", "21165"); - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[2]", "y", "5956"); - - xDocShRef->DoClose(); -} - CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx index e4dfe0e3d47c..102c6a8153b0 100644 --- a/sd/qa/unit/layout-tests.cxx +++ b/sd/qa/unit/layout-tests.cxx @@ -12,6 +12,7 @@ class SdLayoutTest : public SdModelTestBaseXML { public: void testTdf104722(); + void testTdf135843(); void testTdf136949(); void testTdf128212(); void testColumnsLayout(); @@ -20,6 +21,7 @@ public: CPPUNIT_TEST_SUITE(SdLayoutTest); CPPUNIT_TEST(testTdf104722); + CPPUNIT_TEST(testTdf135843); CPPUNIT_TEST(testTdf136949); CPPUNIT_TEST(testTdf128212); CPPUNIT_TEST(testColumnsLayout); @@ -49,6 +51,29 @@ void SdLayoutTest::testTdf104722() xDocShRef->DoClose(); } +void SdLayoutTest::testTdf135843() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf135843.pptx"), PPTX); + + std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile(); + MetafileXmlDump dumper; + + xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile); + CPPUNIT_ASSERT(pXmlDoc); + + // Without the fix, the test fails with: + // - Expected: 21165 + // - Actual : 4218 + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[1]", "x", "21165"); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[1]", "y", "3866"); + + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[2]", "x", "21165"); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[5]/polyline[1]/point[2]", "y", "5956"); + + xDocShRef->DoClose(); +} + void SdLayoutTest::testTdf136949() { sd::DrawDocShellRef xDocShRef
