diff options
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf112618_textbox_no_bg.doc | bin | 0 -> 27136 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 8 |
3 files changed, 14 insertions, 1 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf112618_textbox_no_bg.doc b/sw/qa/extras/ww8export/data/tdf112618_textbox_no_bg.doc Binary files differnew file mode 100644 index 000000000000..c7d9823b0db9 --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf112618_textbox_no_bg.doc diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 339ebd17e440..fcf5fc44379f 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -179,6 +179,13 @@ DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.doc CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xText, "FillStyle")); } +DECLARE_WW8EXPORT_TEST(testTdf112618_textbox_no_bg, "tdf112618_textbox_no_bg.doc") +{ + sal_uInt16 nTransparence = getProperty<sal_Int16>(getShape(2), "FillTransparence"); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(100), nTransparence); + CPPUNIT_ASSERT_EQUAL(nTransparence, getProperty<sal_uInt16>(getShape(2), "BackColorTransparency")); +} + DECLARE_WW8EXPORT_TEST(testTdf101826_xattrTextBoxFill, "tdf101826_xattrTextBoxFill.doc") { //Basic 1 Color Fill: gradient from yellow(FFFF00) to brown(767600) currently saves as mid-color diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index f64577ae64f9..3beb1e2f6181 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1715,7 +1715,13 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj, { rFlySet.Put( *pPoolItem ); if ( i == XATTR_FILLSTYLE ) - bSkipResBackground = true; + { + const drawing::FillStyle eFill = static_cast<const XFillStyleItem*>(pPoolItem)->GetValue(); + // Transparency forced in certain situations when fillstyle is none - use old logic for that case still + // which is especially needed for export purposes (tdf112618). + if ( eFill != drawing::FillStyle_NONE ) + bSkipResBackground = true; + } } } } |