sd/qa/unit/data/ppt/tdf49856.ppt |binary sd/qa/unit/import-tests.cxx | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+)
New commits: commit f580114e9da5b96a2ba61bbf527e33ab127b2a8d Author: Dr. David Alan Gilbert <[email protected]> AuthorDate: Sun Sep 13 17:41:23 2020 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Sep 14 10:09:47 2020 +0200 tdf#49856 Add a test Check that we get the right bullet character. Change-Id: I2e6af6940606d3bacc71bcdf485f7c3b6fa7602b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sd/qa/unit/data/ppt/tdf49856.ppt b/sd/qa/unit/data/ppt/tdf49856.ppt new file mode 100644 index 000000000000..3e6053d4584a Binary files /dev/null and b/sd/qa/unit/data/ppt/tdf49856.ppt differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 3d3032e2e3bd..a6aa1c134738 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -228,6 +228,7 @@ public: void testTdf127964(); void testTdf106638(); void testTdf113198(); + void testTdf49856(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -335,6 +336,7 @@ public: CPPUNIT_TEST(testTdf128684); CPPUNIT_TEST(testTdf113198); CPPUNIT_TEST(testTdf119187); + CPPUNIT_TEST(testTdf49856); CPPUNIT_TEST(testShapeGlowEffectPPTXImpoer); CPPUNIT_TEST(testShapeBlurPPTXImport); @@ -3172,6 +3174,22 @@ void SdImportTest::testTdf119187() } } +void SdImportTest::testTdf49856() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf49856.ppt"), PPT); + const SdrPage *pPage = GetPage(1, xDocShRef); + SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(pPage->GetObj(1)); + CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr); + const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); + const SvxNumBulletItem *pNumFmt = aEdit.GetParaAttribs(2).GetItem(EE_PARA_NUMBULLET); + CPPUNIT_ASSERT(pNumFmt); + const sal_Unicode aBullet = pNumFmt->GetNumRule()->GetLevel(0).GetBulletChar(); + CPPUNIT_ASSERT_EQUAL(OUString("More level 2"), aEdit.GetText(2)); + CPPUNIT_ASSERT_EQUAL(u'\x2022', aBullet); + + xDocShRef->DoClose(); +} + void SdImportTest::testShapeGlowEffectPPTXImpoer() { sd::DrawDocShellRef xDocShRef _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
