sd/qa/unit/data/pptx/tdf103477.pptx |binary sd/qa/unit/import-tests.cxx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+)
New commits: commit 6e5e55c29eee285e56fe7f9708e9faf3ad62eec2 Author: Muthu Subramanian <[email protected]> Date: Sun Oct 30 23:49:51 2016 +0530 tdf#103477 Add unit test Change-Id: Ic960da6a479523a9255357d5f4cede212ff9c6a2 Reviewed-on: https://gerrit.libreoffice.org/30404 Tested-by: Jenkins <[email protected]> Reviewed-by: jan iversen <[email protected]> diff --git a/sd/qa/unit/data/pptx/tdf103477.pptx b/sd/qa/unit/data/pptx/tdf103477.pptx new file mode 100644 index 0000000..0ee9646 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf103477.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 22bb3b7..fd58d72 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -131,6 +131,7 @@ public: void testTdf103876(); void testTdf104015(); void testTdf104201(); + void testTdf103477(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -187,6 +188,7 @@ public: CPPUNIT_TEST(testTdf103876); CPPUNIT_TEST(testTdf104015); CPPUNIT_TEST(testTdf104201); + CPPUNIT_TEST(testTdf103477); CPPUNIT_TEST_SUITE_END(); }; @@ -1617,6 +1619,21 @@ void SdImportTest::testTdf104201() pObj->GetMergedItem(XATTR_FILLCOLOR)); CPPUNIT_ASSERT_EQUAL(ColorData(0x00FF00), rColorItem.GetColorValue().GetColor()); } +} + +void SdImportTest::testTdf103477() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103477.pptx"), PPTX); + + const SdrPage *pPage = GetPage( 1, xDocShRef ); + + SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(6) ); + CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr ); + + const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); + const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>( aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET) ); + CPPUNIT_ASSERT(pNumFmt); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", sal_uInt32(0x000000), pNumFmt->GetNumRule()->GetLevel(1).GetBulletColor().GetColor()); xDocShRef->DoClose(); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
