summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx2
-rw-r--r--sd/qa/unit/data/pptx/n83889.pptxbin0 -> 33401 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx25
3 files changed, 27 insertions, 0 deletions
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 06c6625bd178..a79cfe0287b2 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -225,7 +225,9 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
}
case A_TOKEN( buChar ): // CT_TextCharBullet
try {
+
mrBulletList.setBulletChar( rAttribs.getString( XML_char ).get() );
+ mrBulletList.setSuffixNone();
}
catch(SAXException& /* e */)
{
diff --git a/sd/qa/unit/data/pptx/n83889.pptx b/sd/qa/unit/data/pptx/n83889.pptx
new file mode 100644
index 000000000000..e2f0b1386bfb
--- /dev/null
+++ b/sd/qa/unit/data/pptx/n83889.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 972f8bc14b64..5d6885920193 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -96,6 +96,7 @@ public:
void testBnc862510_7();
void testPDFImport();
void testPDFImportSkipImages();
+ void testBulletSuffix();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -130,6 +131,7 @@ public:
CPPUNIT_TEST(testBnc862510_7);
CPPUNIT_TEST(testPDFImport);
CPPUNIT_TEST(testPDFImportSkipImages);
+ CPPUNIT_TEST(testBulletSuffix);
CPPUNIT_TEST_SUITE_END();
};
@@ -1112,6 +1114,29 @@ void SdImportTest::testPDFImportSkipImages()
xDocShRef->DoClose();
}
+void SdImportTest::testBulletSuffix()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n83889.pptx"), PPTX );
+
+ uno::Reference< drawing::XDrawPagesSupplier > xDoc(
+ xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+
+ uno::Reference< drawing::XDrawPage > xPage(
+ xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+
+ // check suffix of the char bullet
+ const SdrPage *pPage = pDoc->GetPage(1);
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(0) );
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
+ const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(1).GetItem(EE_PARA_NUMBULLET));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's suffix is wrong!", OUString(pNumFmt->GetNumRule()->GetLevel(0).GetSuffix()), OUString("") );
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();