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

Michael Stahl mstahl at redhat.com
Fri Nov 28 08:46:06 PST 2014


 sd/qa/unit/data/fdo84043.odp |binary
 sd/qa/unit/export-tests.cxx  |   16 ++++++++++++++++
 2 files changed, 16 insertions(+)

New commits:
commit 12ab10e5824bb5efff27123aecfdefa1a16d5223
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 28 17:37:01 2014 +0100

    fdo#84043: add a test for the bug
    
    Change-Id: Ic9ad86bfc2d4d6b02afe99a34ded27fe94f54fab

diff --git a/sd/qa/unit/data/fdo84043.odp b/sd/qa/unit/data/fdo84043.odp
new file mode 100644
index 0000000..eed9e79
Binary files /dev/null and b/sd/qa/unit/data/fdo84043.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index dfa2edc..189dbf2 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -71,6 +71,7 @@ public:
     void testN828390_5();
     void testMediaEmbedding();
     void testFdo71961();
+    void testFdo84043();
     void testN828390();
     void testBnc880763();
     void testBnc862510_5();
@@ -87,6 +88,7 @@ public:
     CPPUNIT_TEST(testN828390_5);
     CPPUNIT_TEST(testMediaEmbedding);
     CPPUNIT_TEST(testFdo71961);
+    CPPUNIT_TEST(testFdo84043);
     CPPUNIT_TEST(testN828390);
     CPPUNIT_TEST(testBnc880763);
     CPPUNIT_TEST(testBnc862510_5);
@@ -325,6 +327,20 @@ void SdExportTest::testMediaEmbedding()
     xDocShRef->DoClose();
 }
 
+void SdExportTest::testFdo84043()
+{
+    ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo84043.odp"), ODP);
+    xDocShRef = saveAndReload( xDocShRef, ODP );
+
+    // the bug was duplicate attributes, causing crash in a build with asserts
+    SdDrawDocument const* pDoc = xDocShRef->GetDoc();
+    CPPUNIT_ASSERT_MESSAGE("no document", pDoc != nullptr);
+    SdrPage const* pPage = pDoc->GetPage(1);
+    CPPUNIT_ASSERT_MESSAGE("no page", pPage != nullptr);
+    SdrObject const* pShape = pPage->GetObj(1);
+    CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr);
+}
+
 void SdExportTest::testFdo71961()
 {
     ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo71961.odp"), ODP);


More information about the Libreoffice-commits mailing list