diff options
author | Matus Uzak <matus.uzak@gmail.com> | 2016-04-09 00:43:56 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-04-29 11:59:11 +0000 |
commit | 554158f7d33742284905ed4953dd09041ea04a5d (patch) | |
tree | 08d2cbe7ffe4a6e4336df20f39fd3e0048a6d121 /sd | |
parent | aafe8426051eff4394d9421a0f4c83bf9b7c5fdf (diff) |
tdf#99030: PPTX import: Fixed lost slide background color
Regression from commit f3d1ac7
Change-Id: I5cb9fe1bb6c753c34b49e72194a9fbe4c10c1654
Reviewed-on: https://gerrit.libreoffice.org/23930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf99030.pptx | bin | 0 -> 59514 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf99030.pptx b/sd/qa/unit/data/pptx/tdf99030.pptx Binary files differnew file mode 100644 index 000000000000..38448f93fefa --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf99030.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index a9b7f0df067c..3ebd1116b957 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> +#include <com/sun/star/drawing/XMasterPagesSupplier.hpp> #include <com/sun/star/animations/XAnimationNodeSupplier.hpp> #include <com/sun/star/animations/XAnimationNode.hpp> #include <com/sun/star/animations/XAnimate.hpp> @@ -114,6 +115,7 @@ public: void testTdf89927(); void testTdf93868(); void testTdf95932(); + void testTdf99030(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -161,6 +163,7 @@ public: CPPUNIT_TEST(testTdf89927); CPPUNIT_TEST(testTdf93868); CPPUNIT_TEST(testTdf95932); + CPPUNIT_TEST(testTdf99030); CPPUNIT_TEST_SUITE_END(); }; @@ -1301,6 +1304,29 @@ void SdImportTest::testTdf95932() xDocShRef->DoClose(); } +void SdImportTest::testTdf99030() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf99030.pptx"), PPTX); + + uno::Reference< drawing::XMasterPagesSupplier > xDoc( + xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XDrawPage > xPage( + xDoc->getMasterPages()->getByIndex( 0 ), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xPropSet( xPage, uno::UNO_QUERY ); + + sal_Int32 nFillColor(0); + uno::Any aAny = xPropSet->getPropertyValue( "Background" ); + if (aAny.hasValue()) + { + uno::Reference< beans::XPropertySet > xBackgroundPropSet; + aAny >>= xBackgroundPropSet; + xBackgroundPropSet->getPropertyValue( "FillColor" ) >>= nFillColor; + } + CPPUNIT_ASSERT_EQUAL( sal_Int32(0x676A55), nFillColor ); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |