[Libreoffice-commits] core.git: sd/qa

Heena Gupta heena.h.gupta at ericsson.com
Thu Sep 25 08:38:16 PDT 2014


 sd/qa/unit/data/pptx/fdo83751.pptx |binary
 sd/qa/unit/export-tests.cxx        |   19 +++++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 13f4581c8db921f93f3a278f212f859a7158c482
Author: Heena Gupta <heena.h.gupta at ericsson.com>
Date:   Fri Sep 12 17:27:16 2014 +0530

    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 at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sd/qa/unit/data/pptx/fdo83751.pptx b/sd/qa/unit/data/pptx/fdo83751.pptx
new file mode 100644
index 0000000..be0dfe4
Binary files /dev/null and b/sd/qa/unit/data/pptx/fdo83751.pptx differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 0c856fd..7aa1e26 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();


More information about the Libreoffice-commits mailing list