diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-18 09:50:41 +0200 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-06-18 14:03:46 +0000 |
commit | 60443905cdc004397322b5beef0e2bd8594a8ebf (patch) | |
tree | 51a78cdf5a0a176bad88f3e721f9e8dfaeac51e3 /sw/qa/extras | |
parent | 97a46454b39fa54c4110b2e24cfec1f18b32e596 (diff) |
added unit test for n#820504
Change-Id: I804e081a564d24d3896160f817051b19da884c34
(cherry picked from commit f9610ed634318c27382d79089d022fb8175eb90a)
Reviewed-on: https://gerrit.libreoffice.org/4330
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/n820504.docx | bin | 0 -> 19810 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n820504.docx b/sw/qa/extras/ooxmlimport/data/n820504.docx Binary files differnew file mode 100644 index 000000000000..36279a99dc20 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/n820504.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index ce66980beb62..c895db206558 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -119,6 +119,7 @@ public: void testPageBorderShadow(); void testN820509(); void testN820788(); + void testN820504(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -205,6 +206,7 @@ void Test::run() {"page-border-shadow.docx", &Test::testPageBorderShadow}, {"n820509.docx", &Test::testN820509}, {"n820788.docx", &Test::testN820788}, + {"n820504.docx", &Test::testN820504}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1457,6 +1459,16 @@ void Test::testN820788() CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty<sal_Int16>(xFrame, "SizeType")); } +void Test::testN820504() +{ + uno::Reference<style::XStyleFamiliesSupplier> xFamiliesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XNameAccess> xFamiliesAccess(xFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY); + uno::Reference<container::XNameAccess> xStylesAccess(xFamiliesAccess->getByName("ParagraphStyles"), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xStyle(xStylesAccess->getByName("Default Style"), uno::UNO_QUERY); + // The problem was that the CharColor was set to AUTO (-1) even if we have some default char color set + CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getProperty<sal_Int32>(xStyle, "CharColor")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |