diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-05-27 17:09:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-27 21:40:15 +0200 |
commit | 62c705c106bd3c2b87462f30732f162fcb0bde87 (patch) | |
tree | c780d225aaf3612a9a164f5b66b8763e97b09789 /sw/qa/extras | |
parent | dda9d7d0de386f355bfcf16a83746257de1e5990 (diff) |
bnc#817956 DOCX import of document background color
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to
every page style.
Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237
(cherry picked from commit 992da0d5cf04497bad55637f6a6ebfcdaec03e16)
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/page-background.docx | bin | 0 -> 10041 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/page-background.docx b/sw/qa/extras/ooxmlimport/data/page-background.docx Binary files differnew file mode 100644 index 000000000000..8c1f2ebdb239 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/page-background.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index e9f4839f85c4..adbe8723740c 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -113,6 +113,7 @@ public: void testN592908_Picture(); void testN779630(); void testIndentation(); + void testPageBackground(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -194,6 +195,7 @@ void Test::run() {"n592908-picture.docx", &Test::testN592908_Picture}, {"n779630.docx", &Test::testN779630}, {"indentation.docx", &Test::testIndentation}, + {"page-background.docx", &Test::testPageBackground}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1379,6 +1381,13 @@ void Test::testIndentation() CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>(xPropertySet, "WritingMode")); } +void Test::testPageBackground() +{ + // The problem was that <w:background w:color="92D050"/> was ignored. + uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getProperty<sal_Int32>(xPageStyle, "BackColor")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |