diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-17 09:15:07 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-17 12:58:50 +0000 |
commit | 38a1e19ae49ac30757e4020b60adee7c30f3deb9 (patch) | |
tree | cbd3c59ebe6734f99620b1ade0c1075c32d626ff /sw | |
parent | 4fe8a05027ffa664380c2ae42a4a0e2a3bc966c5 (diff) |
tdf#104150 DOCX import: handle <w:displayBackgroundShape/>
Regression from commit 992da0d5cf04497bad55637f6a6ebfcdaec03e16
(bnc#817956 DOCX import of document background color, 2013-05-27),
<w:background> should be ignored when <w:displayBackgroundShape/> is
missing from settings.xml, it turns out.
This also requires generating the
ooxml:CT_Settings_displayBackgroundShape token from the RTF tokenizer.
Change-Id: I6d7986904cedb952998a87e7648919ae34adc360
Reviewed-on: https://gerrit.libreoffice.org/33207
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf104150.docx | bin | 0 -> 12621 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104150.docx b/sw/qa/extras/ooxmlexport/data/tdf104150.docx Binary files differnew file mode 100644 index 000000000000..989884642660 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf104150.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 002d0641c54e..89bc9d9429fb 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -197,6 +197,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104162, "tdf104162.docx") CPPUNIT_ASSERT(xTextFields->hasElements()); } +DECLARE_OOXMLEXPORT_TEST(testTdf104150, "tdf104150.docx") +{ + uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); + // This was 0xff0000, i.e. red: background shape wasn't ignored. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), getProperty<sal_Int32>(xPageStyle, "BackColor")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |