diff options
Diffstat (limited to 'sd/qa/unit')
-rw-r--r-- | sd/qa/unit/data/odp/tdf80224.odp | bin | 0 -> 23894 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf80224.odp b/sd/qa/unit/data/odp/tdf80224.odp Binary files differnew file mode 100644 index 000000000000..5712c1a7d7a9 --- /dev/null +++ b/sd/qa/unit/data/odp/tdf80224.odp diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 0a8a34267e8c..a90a3de70a89 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -129,6 +129,7 @@ public: #if !defined WNT void testBnc822341(); #endif + void testTdf80224(); CPPUNIT_TEST_SUITE(SdExportTest); CPPUNIT_TEST(testFdo90607); @@ -166,6 +167,7 @@ public: #if !defined WNT CPPUNIT_TEST(testBnc822341); #endif + CPPUNIT_TEST(testTdf80224); CPPUNIT_TEST_SUITE_END(); }; @@ -1240,6 +1242,25 @@ void SdExportTest::testTableCellBorder() xDocShRef->DoClose(); } +void SdExportTest::testTdf80224() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/odp/tdf80224.odp"), ODP); + 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 ); + uno::Reference< drawing::XShape > xShape(xPage->getByIndex(0), uno::UNO_QUERY); + uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText(); + uno::Reference<container::XEnumerationAccess> paraEnumAccess; + paraEnumAccess.set(xText, uno::UNO_QUERY); + uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration(); + uno::Reference<text::XTextRange> const xParagraph(paraEnum->nextElement(), uno::UNO_QUERY_THROW); + uno::Reference< beans::XPropertySet > xPropSet( xParagraph->getStart(), uno::UNO_QUERY_THROW ); + sal_Int32 nCharColor; + xPropSet->getPropertyValue("CharColor") >>= nCharColor; + CPPUNIT_ASSERT_EQUAL(sal_Int32(6644396), nCharColor); + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |