summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorPriyankaGaikwad <priyanka.gaikwad@synerzip.com>2015-03-27 16:18:28 +0530
committerDavid Tardon <dtardon@redhat.com>2015-04-13 08:18:22 +0000
commit3618909684a892d912482844b81606bca4e0c29c (patch)
treed483baf82ea45e55cadfa21c7d3f2f546af77b37 /sd
parent593515e529d75f08f4d3766dac78b1792aea4be4 (diff)
tdf#90255 FILESAVE:PPTX 'startAt' tag for bullet numbering is not exported
Problem Description : XML Difference Original : <a:buAutoNum type="arabicPeriod" startAt="3"/> Roundtrip : <a:buAutoNum type="arabicPeriod"/> Solution : Added export support for 'startAt' tag of <a:buAutoNum> for pptx. Change-Id: If86bce98e222795d851d4a5b3cbb65da5cee85fc Reviewed-on: https://gerrit.libreoffice.org/15028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/n90255.pptxbin0 -> 32622 bytes
-rw-r--r--sd/qa/unit/export-tests.cxx26
2 files changed, 26 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/n90255.pptx b/sd/qa/unit/data/pptx/n90255.pptx
new file mode 100644
index 000000000000..2263d89bb156
--- /dev/null
+++ b/sd/qa/unit/data/pptx/n90255.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index d6645dd809e1..e0878a713855 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -84,6 +84,7 @@ public:
void testLinkedGraphicRT();
void testImageWithSpecialID();
void testTableCellFillProperties();
+ void testBulletStartNumber();
#if !defined WNT
void testBnc822341();
#endif
@@ -107,6 +108,7 @@ public:
CPPUNIT_TEST(testLinkedGraphicRT);
CPPUNIT_TEST(testImageWithSpecialID);
CPPUNIT_TEST(testTableCellFillProperties);
+ CPPUNIT_TEST(testBulletStartNumber);
#if !defined WNT
CPPUNIT_TEST(testBnc822341);
#endif
@@ -781,6 +783,30 @@ void SdExportTest::testTableCellFillProperties()
xDocShRef->DoClose();
}
+void SdExportTest::testBulletStartNumber()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n90255.pptx"), PPTX );
+ xDocShRef = saveAndReload( xDocShRef, 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 );
+
+ 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(0).GetItem(EE_PARA_NUMBULLET));
+ CPPUNIT_ASSERT(pNumFmt);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's start number is wrong!", sal_Int16(pNumFmt->GetNumRule()->GetLevel(0).GetStart()), sal_Int16(3) );
+ xDocShRef->DoClose();
+}
+
#if !defined WNT
void SdExportTest::testBnc822341()