diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-18 09:50:41 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-18 09:57:11 +0200 |
commit | f9610ed634318c27382d79089d022fb8175eb90a (patch) | |
tree | 4692d79d85835614d64470e972c9a39d04fc841f /sw | |
parent | 122db845e057cfd83bb2b5fde442200bc742eb8d (diff) |
added unit test for n#820504
Change-Id: I804e081a564d24d3896160f817051b19da884c34
Diffstat (limited to 'sw')
-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 c0987d16c7d7..676fbbbf8d2d 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -118,6 +118,7 @@ public: void testN816593(); void testN820509(); void testN820788(); + void testN820504(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -203,6 +204,7 @@ void Test::run() {"n816593.docx", &Test::testN816593}, {"n820509.docx", &Test::testN820509}, {"n820788.docx", &Test::testN820788}, + {"n820504.docx", &Test::testN820504}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1437,6 +1439,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(); |