summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2020-09-13 17:41:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-14 10:09:47 +0200
commitf580114e9da5b96a2ba61bbf527e33ab127b2a8d (patch)
tree2280f68f9a8d6a2b35278d4f7a87f07636230d1e
parentf52932218c5365cbe1635f88d310d9e1189ed182 (diff)
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 <caolanm@redhat.com>
-rw-r--r--sd/qa/unit/data/ppt/tdf49856.pptbin0 -> 125440 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx18
2 files changed, 18 insertions, 0 deletions
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
--- /dev/null
+++ b/sd/qa/unit/data/ppt/tdf49856.ppt
Binary files 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