summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
authorMuthu Subramanian <muthusuba@gmail.com>2016-10-30 23:49:51 +0530
committerjan iversen <jani@documentfoundation.org>2016-12-01 08:46:01 +0000
commit6e5e55c29eee285e56fe7f9708e9faf3ad62eec2 (patch)
tree69e4c5c8be6026eaf6790433700b84c9bd9bcc67 /sd/qa/unit
parent98419425080f58880f2d0d85749a4a55e8abb40b (diff)
tdf#103477 Add unit test
Change-Id: Ic960da6a479523a9255357d5f4cede212ff9c6a2 Reviewed-on: https://gerrit.libreoffice.org/30404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/data/pptx/tdf103477.pptxbin0 -> 64312 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf103477.pptx b/sd/qa/unit/data/pptx/tdf103477.pptx
new file mode 100644
index 000000000000..0ee96462c2c9
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf103477.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 22bb3b78969b..fd58d72b5588 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();
}