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

Varun varun.dhall at studentpartner.com
Tue Jul 7 13:45:27 PDT 2015


 sd/qa/unit/data/odp/tdf80020.odp |binary
 sd/qa/unit/export-tests.cxx      |   23 ++++++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit 91949b62505b4159ad930dca89d2cc9eba082807
Author: Varun <varun.dhall at studentpartner.com>
Date:   Wed Jul 8 01:05:48 2015 +0530

    Added Test for tdf#80020 Impress style inheritance
    
    Change-Id: I001dff1ba3774b811721709b0910a6fb711cca1f
    Reviewed-on: https://gerrit.libreoffice.org/16833
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sd/qa/unit/data/odp/tdf80020.odp b/sd/qa/unit/data/odp/tdf80020.odp
new file mode 100644
index 0000000..dade8d6
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf80020.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 3c72207..51a5e51 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -59,7 +59,8 @@
 #include <com/sun/star/graphic/XGraphic.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/drawing/FillStyle.hpp>
- #include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
 #include <com/sun/star/table/BorderLine2.hpp>
 #include <com/sun/star/table/XTable.hpp>
 #include <com/sun/star/table/XMergeableCell.hpp>
@@ -108,6 +109,7 @@ public:
     void testFdo83751();
     void testFdo79731();
     void testSwappedOutImageExport();
+    void testTdf80020();
     void testLinkedGraphicRT();
     void testImageWithSpecialID();
     void testTableCellFillProperties();
@@ -144,6 +146,7 @@ public:
     CPPUNIT_TEST(testFdo83751);
     CPPUNIT_TEST(testFdo79731);
     CPPUNIT_TEST(testSwappedOutImageExport);
+    CPPUNIT_TEST(testTdf80020);
     CPPUNIT_TEST(testLinkedGraphicRT);
     CPPUNIT_TEST(testImageWithSpecialID);
     CPPUNIT_TEST(testTableCellFillProperties);
@@ -674,6 +677,24 @@ void SdExportTest::testSwappedOutImageExport()
     }
 }
 
+void SdExportTest::testTdf80020()
+{
+    ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/odp/tdf80020.odp"), ODP);
+    {
+        uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
+        uno::Reference<container::XNameAccess> xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
+        uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
+        uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY);
+        CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
+    }
+    xDocShRef = saveAndReload( xDocShRef, ODP );
+    uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
+    uno::Reference<container::XNameAccess> xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
+    uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
+    uno::Reference<style::XStyle> xStyle(xStyleFamily->getByName("Test Style"), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
+}
+
 void SdExportTest::testLinkedGraphicRT()
 {
     // Problem was with linked images


More information about the Libreoffice-commits mailing list