diff --git a/sd/qa/unit/data/pptx/n862510_3.pptx b/sd/qa/unit/data/pptx/n862510_3.pptx new file mode 100644 index 000000000000..cf0b7b5efa60 Binary files /dev/null and b/sd/qa/unit/data/pptx/n862510_3.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 30e591021840..382fe693220c 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -64,6 +65,7 @@ public: void testStrictOOXML(); void testN862510_1(); void testN862510_2(); + void testN862510_3(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -83,6 +85,7 @@ public: CPPUNIT_TEST(testStrictOOXML); CPPUNIT_TEST(testN862510_1); CPPUNIT_TEST(testN862510_2); + CPPUNIT_TEST(testN862510_3); CPPUNIT_TEST_SUITE_END(); }; @@ -284,6 +287,25 @@ void SdFiltersTest::testN862510_2() } } +void SdFiltersTest::testN862510_3() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n862510_3.pptx") ); + CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() ); + CPPUNIT_ASSERT_MESSAGE( "in destruction", !xDocShRef->IsInDestruction() ); + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage( 1 ); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + { + SdrObjGroup *pGrpObj = dynamic_cast( pPage->GetObj( 1 ) ); + CPPUNIT_ASSERT( pGrpObj ); + SdrObjCustomShape *pObj = dynamic_cast( pGrpObj->GetSubList()->GetObj( 0 ) ); + CPPUNIT_ASSERT( pObj ); + CPPUNIT_ASSERT_MESSAGE( "Left Spacing is wrong! check attribute anchorCtr", pObj->GetTextLeftDistance() < 30); + } +} + void SdFiltersTest::testN828390() { bool bPassed = false;