diff options
author | Adam Co <rattles2013@gmail.com> | 2013-06-23 10:49:28 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-06-25 10:04:01 +0200 |
commit | 26d40686128e70916a636e20f5ccc5763bbb6cc8 (patch) | |
tree | bf4fa4f957f84482b66fe0bac2197e43ada91a70 /sw/qa | |
parent | b3962c92bfb8d14d908bfeb9142548e9686ee105 (diff) |
fdo65400: fix for Character Shading being lost
This bug fixes the DOCX import and export filters, adds a new property
to the document model and updates the UNO API.
There is no need to add layout \ UI updates, because in Word
the only way to turn this on\off is using a simple button,
and there is no way to control the shading color itself.
However, ODF import \ export filters should be updated in a future
commit.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Change-Id: I1d34cec79289e38c08e42a4c6265d998e1edfdef
Reviewed-on: https://gerrit.libreoffice.org/4452
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo65400.docx | bin | 0 -> 16108 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65400.docx b/sw/qa/extras/ooxmlexport/data/fdo65400.docx Binary files differnew file mode 100644 index 000000000000..c247e9fff8f2 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo65400.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index b4d855a4c347..db12382b32e2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -84,6 +84,7 @@ public: void testFdo64238_a(); void testFdo64238_b(); void testFdo56679(); + void testFdo65400(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -142,6 +143,7 @@ void Test::run() {"fdo64238_a.docx", &Test::testFdo64238_a}, {"fdo64238_b.docx", &Test::testFdo64238_b}, {"fdo56679.docx", &Test::testFdo56679}, + {"fdo65400.docx", &Test::testFdo65400}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -865,6 +867,17 @@ void Test::testFdo56679() CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFF0000), getProperty<sal_Int32>(xText, "CharUnderlineColor")); } +void Test::testFdo65400() +{ + // The problem was that if in Word you choose 'Character Shading' - then the text portion + // is marked with 'w:shd val=pct15'. LO did not store this value and so when importing and exporting + // this value was lost (and so Word did not show 'Character Shading' was on) + uno::Reference< text::XTextRange > paragraph1 = getParagraph( 1 ); + uno::Reference< text::XTextRange > shaded = getRun( paragraph1, 2, "normal" ); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 0x0026 ), getProperty< sal_Int32 >( shaded, "CharShadingValue" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 0xd8d8d8 ), getProperty< sal_Int32 >( shaded, "CharBackColor" )); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |