diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-05-27 17:09:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-27 17:49:12 +0200 |
commit | 992da0d5cf04497bad55637f6a6ebfcdaec03e16 (patch) | |
tree | cd39a899d29a0b9bfe719165c000ec63494d9dae /sw | |
parent | a0f85534a71e5b04a8ca21c12ab3f04335f34344 (diff) |
bnc#817956 DOCX import of document background color
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to
every page style.
Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237
Diffstat (limited to 'sw')
-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(); |