diff options
author | Heena Gupta <heena.h.gupta@ericsson.com> | 2014-09-12 17:27:16 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-09-25 15:37:45 +0000 |
commit | 13f4581c8db921f93f3a278f212f859a7158c482 (patch) | |
tree | 6115e37b8b4cf5f79d8a5871c2313d4eddb80ca0 /sd | |
parent | e8bdd38882522591723097c028ca7a6927ee70c4 (diff) |
fdo#83751- Add test case for custom properties in pptx
Change-Id: I83fb0462c662e0da1f1c5c6dfec4bd8d94d97b87
Reviewed-on: https://gerrit.libreoffice.org/11420
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/fdo83751.pptx | bin | 0 -> 33818 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/fdo83751.pptx b/sd/qa/unit/data/pptx/fdo83751.pptx Binary files differnew file mode 100644 index 000000000000..be0dfe43ddca --- /dev/null +++ b/sd/qa/unit/data/pptx/fdo83751.pptx diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 0c856fd06d19..7aa1e265ef60 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -52,6 +52,7 @@ #include <com/sun/star/chart2/data/XNumericalDataSequence.hpp> #include <config_features.h> +#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> using namespace ::com::sun::star; @@ -69,6 +70,7 @@ public: void testBnc880763(); void testBnc862510_5(); void testBnc822347_EmptyBullet(); + void testFdo83751(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testN821567); @@ -82,6 +84,7 @@ public: CPPUNIT_TEST(testBnc880763); CPPUNIT_TEST(testBnc862510_5); CPPUNIT_TEST(testBnc822347_EmptyBullet); + CPPUNIT_TEST(testFdo83751); CPPUNIT_TEST_SUITE_END(); }; @@ -457,6 +460,22 @@ void SdFiltersTest::testBnc822347_EmptyBullet() xDocShRef->DoClose(); } +void SdFiltersTest::testFdo83751() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/fdo83751.pptx"), PPTX); + xDocShRef = saveAndReload( xDocShRef, PPTX ); + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + + uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier( xDocShRef->GetModel(), uno::UNO_QUERY ); + uno::Reference<document::XDocumentProperties> xProps( xDocumentPropertiesSupplier->getDocumentProperties(), uno::UNO_QUERY ); + uno::Reference<beans::XPropertySet> xUDProps( xProps->getUserDefinedProperties(), uno::UNO_QUERY ); + OUString propValue; + xUDProps->getPropertyValue(OUString("Testing")) >>= propValue; + CPPUNIT_ASSERT_EQUAL(OUString("Document"), propValue); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest); CPPUNIT_PLUGIN_IMPLEMENT(); |