diff options
author | Mark Hung <marklh9@gmail.com> | 2015-08-02 14:40:18 +0800 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-08-25 11:55:05 +0000 |
commit | 43679f94b45f4d9e120c64a3fb5cc3ee77f12b11 (patch) | |
tree | 400bd571b72053f05ff51af05508ce799b87ca1c /sd/qa/unit | |
parent | 3ac03b3f2747e723efc93a5a4ca82d72445eecf0 (diff) |
Fix tdf#80224 Custom text color changed to black on .PPTX export
1) Indirect property values were ignored, now they are used.
2) Write endParaRPr so that PowerPoint display them.
3) Automatic colors are written as white or black based on
whether background is dark.
Change-Id: I255c16f35149b738be2daf2800b1c90389f2c7cf
Reviewed-on: https://gerrit.libreoffice.org/17472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
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(); |