[Libreoffice-commits] core.git: sd/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 22 13:29:07 UTC 2020


 sd/qa/unit/export-tests-ooxml2.cxx |   27 +++++++++++++++++++++++++++
 sd/qa/unit/import-tests.cxx        |   26 --------------------------
 2 files changed, 27 insertions(+), 26 deletions(-)

New commits:
commit 6ca5d784e2212a91b70a6eb3e343bcaa2db8e99c
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Sep 22 12:46:14 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 22 15:28:24 2020 +0200

    this is an export test, move it to the right file
    
    Change-Id: Idfdcc81d1a7ddb4ac78c68b9b0c07bd6b5fb5d31
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103160
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 20016799091a..1213936f42c7 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -92,6 +92,7 @@ public:
     void testTdf119015();
     void testTdf123090();
     void testTdf126324();
+    void testTdf119187();
     void testTdf80224();
     void testExportTransitionsPPTX();
     void testPresetShapesExport();
@@ -212,6 +213,7 @@ public:
     CPPUNIT_TEST(testTdf119015);
     CPPUNIT_TEST(testTdf123090);
     CPPUNIT_TEST(testTdf126324);
+    CPPUNIT_TEST(testTdf119187);
     CPPUNIT_TEST(testTdf80224);
     CPPUNIT_TEST(testExportTransitionsPPTX);
     CPPUNIT_TEST(testPresetShapesExport);
@@ -577,6 +579,31 @@ void SdOOXMLExportTest2::testTdf126324()
     xDocShRef->DoClose();
 }
 
+void SdOOXMLExportTest2::testTdf119187()
+{
+    std::vector< sd::DrawDocShellRef > xDocShRef;
+    // load document
+    xDocShRef.push_back(loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf119187.pptx"), PPTX));
+    // load resaved document
+    xDocShRef.push_back(saveAndReload( xDocShRef.at(0).get(), PPTX ));
+
+    // check documents
+    for (const sd::DrawDocShellRef& xDoc : xDocShRef)
+    {
+        // get shape properties
+        const SdrPage* pPage = GetPage(1, xDoc);
+        CPPUNIT_ASSERT(pPage);
+        SdrObject* pObj = pPage->GetObj(0);
+        CPPUNIT_ASSERT(pObj);
+        const sdr::properties::BaseProperties & rProperties = pObj->GetProperties();
+
+        // check text vertical alignment
+        const SdrTextVertAdjustItem& rSdrTextVertAdjustItem = rProperties.GetItem(SDRATTR_TEXT_VERTADJUST);
+        const SdrTextVertAdjust eTVA = rSdrTextVertAdjustItem.GetValue();
+        CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_TOP, eTVA);
+    }
+}
+
 void SdOOXMLExportTest2::testTdf80224()
 {
     ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf80224.odp"), ODP);
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 70f1ceb38e4b..97b82150cdee 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -212,7 +212,6 @@ public:
     void testTdf77747();
     void testTdf116266();
     void testTdf128684();
-    void testTdf119187();
     void testShapeGlowEffectPPTXImpoer();
     void testShapeBlurPPTXImport();
 
@@ -337,7 +336,6 @@ public:
     CPPUNIT_TEST(testTdf106638);
     CPPUNIT_TEST(testTdf128684);
     CPPUNIT_TEST(testTdf113198);
-    CPPUNIT_TEST(testTdf119187);
     CPPUNIT_TEST(testTdf49856);
     CPPUNIT_TEST(testShapeGlowEffectPPTXImpoer);
     CPPUNIT_TEST(testShapeBlurPPTXImport);
@@ -3147,30 +3145,6 @@ void SdImportTest::testTdf113198()
     CPPUNIT_ASSERT_EQUAL(drawing::TextHorizontalAdjust_CENTER, eAdjust);
 }
 
-void SdImportTest::testTdf119187()
-{
-    std::vector< sd::DrawDocShellRef > xDocShRef;
-    // load document
-    xDocShRef.push_back(loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf119187.pptx"), PPTX));
-    // load resaved document
-    xDocShRef.push_back(saveAndReload( xDocShRef.at(0).get(), PPTX ));
-
-    // check documents
-    for (const sd::DrawDocShellRef& xDoc : xDocShRef)
-    {
-        // get shape properties
-        const SdrPage* pPage = GetPage(1, xDoc);
-        CPPUNIT_ASSERT(pPage);
-        SdrObject* pObj = pPage->GetObj(0);
-        CPPUNIT_ASSERT(pObj);
-        const sdr::properties::BaseProperties & rProperties = pObj->GetProperties();
-
-        // check text vertical alignment
-        const SdrTextVertAdjustItem& rSdrTextVertAdjustItem = rProperties.GetItem(SDRATTR_TEXT_VERTADJUST);
-        const SdrTextVertAdjust eTVA = rSdrTextVertAdjustItem.GetValue();
-        CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_TOP, eTVA);
-    }
-}
 
 void SdImportTest::testTdf49856()
 {


More information about the Libreoffice-commits mailing list