summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-29 16:25:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-29 16:31:32 +0100
commit5aa360cae0383f270c12708e7e94179a7fde6711 (patch)
tree015c2238e2e2860790fb335207f0e45de89a009c /sw/qa
parent8dd2a4f0c80db25f744147206ff1e69cf976f73f (diff)
Resolves: fdo#80468 and fdo#81223 image/frame backgrounds wrong
writer has code to fill in missing new properties from the old properties if they exist. But xmloff is stripping them out before they get there. Don't strip them out, and add in a missing check for one of the archaic bg colors and add a regression test for fdo#81223 Change-Id: I9a541a9bee0a01c90f2c33383f1144ecd8b0bfff
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/odfimport/data/fdo81223.odtbin0 -> 9428 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/fdo81223.odt b/sw/qa/extras/odfimport/data/fdo81223.odt
new file mode 100644
index 000000000000..21343d3dd91d
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo81223.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 8cd4b09b1064..76f00bb96cd4 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -478,6 +478,16 @@ DECLARE_ODFIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.odt")
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(xParagraph, 2), "CharWeight"));
}
+DECLARE_ODFIMPORT_TEST(fdo81223, "fdo81223.odt")
+{
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ sal_Int32 nValue(0);
+ xFrame->getPropertyValue("BackColor") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0xfeffffff), nValue);
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();