diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-07-24 18:00:58 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-07-24 18:08:20 +0200 |
commit | 94b3ec0597ee21b933d02496402ff0f3a416e6a3 (patch) | |
tree | c010e0fa5becd355bd015228f4f6ad8610229670 | |
parent | 0ffed545adbb8a27a024d4d6a74dcaa8a87ba66a (diff) |
fdo#60990 testcase
Change-Id: I35dcb21e55e262db274d7e811d79f9fafc6d6c25
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo60990.odt | bin | 0 -> 10945 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo60990.odt b/sw/qa/extras/ooxmlexport/data/fdo60990.odt Binary files differnew file mode 100644 index 000000000000..c855f327a90c --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo60990.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 8c51f3a26f96..6fb397f96cf5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -100,6 +100,7 @@ public: void testPageBorderSpacingExportCase2(); void testGrabBag(); void testFdo66781(); + void testFdo60990(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -178,6 +179,7 @@ void Test::run() {"page-borders-export-case-2.docx", &Test::testPageBorderSpacingExportCase2}, {"grabbag.docx", &Test::testGrabBag}, {"fdo66781.docx", &Test::testFdo66781}, + {"fdo60990.odt", &Test::testFdo60990}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -1048,6 +1050,19 @@ void Test::testFdo66781() CPPUNIT_FAIL("Did not find bullet with level 0"); } +void Test::testFdo60990() +{ + // The shape had no background, no paragraph adjust and no font color. + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xShape(xDraws->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00CFE7F5), getProperty<sal_Int32>(xShape, "BackColor")); + uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY)->getText(); + uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText); + CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xParagraph, "ParaAdjust"))); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00FF00), getProperty<sal_Int32>(getRun(xParagraph, 1), "CharColor")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |