summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-06-12 15:13:32 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-06-13 11:03:41 +0200
commit837ccd73e23f31f1fe2da1972a9f41b60373f8e5 (patch)
tree6a93a503dfdfe5a99e227eef4bbbfdbcaa10e6ff /sw/qa
parent348c7ca4b7676b10864bade1d5a16761b7927418 (diff)
DOCX: don't export auto color as page background
That auto here would mean black, potentially rendering the whole document unreadable. Change-Id: Ie17a6a9b00c9ab24204291d09175a3fba69cd4ea
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/page-graphic-background.odtbin0 -> 32296 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/page-graphic-background.odt b/sw/qa/extras/ooxmlexport/data/page-graphic-background.odt
new file mode 100644
index 000000000000..15050e630737
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/page-graphic-background.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 8b4308e856c4..494076c0cb50 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -72,6 +72,7 @@ public:
void testI120928();
void testFdo64826();
void testPageBackground();
+ void testPageGraphicBackground();
void testFdo65265();
void testFdo65655();
@@ -123,6 +124,7 @@ void Test::run()
{"i120928.docx", &Test::testI120928},
{"fdo64826.docx", &Test::testFdo64826},
{"page-background.docx", &Test::testPageBackground},
+ {"page-graphic-background.odt", &Test::testPageGraphicBackground},
{"fdo65265.docx", &Test::testFdo65265},
{"fdo65655.docx", &Test::testFdo65655},
};
@@ -692,6 +694,15 @@ void Test::testPageBackground()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getProperty<sal_Int32>(xPageStyle, "BackColor"));
}
+void Test::testPageGraphicBackground()
+{
+ // No idea how the graphic background should be exported (seems there is no
+ // way to do a non-tiling export to OOXML), but at least the background
+ // color shouldn't be black.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xPageStyle, "BackColor"));
+}
+
void Test::testFdo65265()
{
// Redline (tracked changes) of text formatting were not exported