diff options
author | Varun <varun.dhall@studentpartner.com> | 2015-07-08 01:05:48 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-07 20:44:56 +0000 |
commit | 91949b62505b4159ad930dca89d2cc9eba082807 (patch) | |
tree | a44e9893c01bef57ae8193e936365f0bc339daf0 /sd | |
parent | 2d06773762cae7d1cc98c723815a65b457a642c8 (diff) |
Added Test for tdf#80020 Impress style inheritance
Change-Id: I001dff1ba3774b811721709b0910a6fb711cca1f
Reviewed-on: https://gerrit.libreoffice.org/16833
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/odp/tdf80020.odp | bin | 0 -> 13068 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 23 |
2 files changed, 22 insertions, 1 deletions
diff --git a/sd/qa/unit/data/odp/tdf80020.odp b/sd/qa/unit/data/odp/tdf80020.odp Binary files differnew file mode 100644 index 000000000000..dade8d659697 --- /dev/null +++ b/sd/qa/unit/data/odp/tdf80020.odp diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 3c72207e499f..51a5e51c9ebd 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 |