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

Jan Holesovsky kendy at collabora.com
Fri Sep 1 12:32:12 UTC 2017


 sd/qa/unit/data/pptx/tdf111884.pptx |binary
 sd/qa/unit/export-tests-ooxml1.cxx  |   17 +++++++++++++++++
 2 files changed, 17 insertions(+)

New commits:
commit a00ad98e421ca7110c58c66fb7bd04cc2306bb59
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Aug 31 18:50:16 2017 +0200

    tdf#111884: Unit test.
    
    Change-Id: I2ab432d4a2a64d88493e8f37b4a36934800fbf30
    Reviewed-on: https://gerrit.libreoffice.org/41767
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sd/qa/unit/data/pptx/tdf111884.pptx b/sd/qa/unit/data/pptx/tdf111884.pptx
new file mode 100644
index 000000000000..9d08b668defa
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf111884.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index ef3186660f92..e2fb52e53a06 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -99,6 +99,7 @@ public:
     void testBulletCharAndFont();
     void testBulletMarginAndIndentation();
     void testParaMarginAndindentation();
+    void testTdf111884();
 
     CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);
 
@@ -126,6 +127,7 @@ public:
     CPPUNIT_TEST(testBulletCharAndFont);
     CPPUNIT_TEST(testBulletMarginAndIndentation);
     CPPUNIT_TEST(testParaMarginAndindentation);
+    CPPUNIT_TEST(testTdf111884);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -784,6 +786,21 @@ void SdOOXMLExportTest1::testTableCellBorder()
     xDocShRef->DoClose();
 }
 
+void SdOOXMLExportTest1::testTdf111884()
+{
+    ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf111884.pptx"), PPTX);
+    xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
+
+    const SdrPage *pPage = GetPage(1, xDocShRef);
+    SdrObject const* pShape = pPage->GetObj(2);
+    CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr);
+
+    // must be a group shape
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_GRUP), pShape->GetObjIdentifier());
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list