summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-11-28 17:37:01 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-01 23:28:12 +0100
commit17d4a05bb8757da6384d0df8385deb86b8080856 (patch)
treef64f4ca746806e672402936d9a57bd3d735fb9cc
parent584ef6f317c0ce5156975ed5d564bd5bbb376949 (diff)
fdo#84043: add a test for the bug
Change-Id: Ic9ad86bfc2d4d6b02afe99a34ded27fe94f54fab (cherry picked from commit 12ab10e5824bb5efff27123aecfdefa1a16d5223)
-rw-r--r--sd/qa/unit/data/fdo84043.odpbin0 -> 7718 bytes
-rw-r--r--sd/qa/unit/export-tests.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/data/fdo84043.odp b/sd/qa/unit/data/fdo84043.odp
new file mode 100644
index 000000000000..eed9e79ef885
--- /dev/null
+++ b/sd/qa/unit/data/fdo84043.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index dfa2edc03755..189dbf2ea7de 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);