summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-11-28 15:44:27 +0300
committerJustin Luth <justin_luth@sil.org>2019-01-14 20:32:04 +0100
commit1a6367269df971dd6764db419162896170b4b21d (patch)
tree0057365012e91094ea0e793f02b23303390426d1 /sw
parent97be67bbd6bd72fb510814e1fbb9dfc65d190f78 (diff)
tdf#121111 ww8export: fillstyle_NONE needs a nil background
Without this, there is no way to cancel out an inherited background color. tdf#116071's unit test depends on this fix in order to round-trip. Change-Id: I99ad28ee87a6bea040e0ef3c712c1c911be70004 Reviewed-on: https://gerrit.libreoffice.org/64185 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 5120aa5f9094..44b3321fe3a2 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4216,8 +4216,26 @@ void WW8AttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
}
-void WW8AttributeOutput::FormatFillStyle( const XFillStyleItem& /*rFillStyle*/ )
+void WW8AttributeOutput::FormatFillStyle( const XFillStyleItem& rFillStyle )
{
+ // WW cannot have background in a section
+ if ( !m_rWW8Export.m_bOutPageDescs )
+ {
+ // see MSWordExportBase::OutputItemSet for how _SOLID is handled
+ if ( rFillStyle.GetValue() == drawing::FillStyle_NONE )
+ {
+ //Shd80Nil
+ m_rWW8Export.InsUInt16( NS_sprm::sprmPShd80 );
+ m_rWW8Export.InsUInt16( 0xffff );
+
+ //cvAuto
+ m_rWW8Export.InsUInt16( NS_sprm::sprmPShd );
+ m_rWW8Export.pO->push_back( 10 );
+ m_rWW8Export.InsUInt32( 0xFF000000 );
+ m_rWW8Export.InsUInt32( 0xFF000000 );
+ m_rWW8Export.InsUInt16( 0x0000 );
+ }
+ }
}
void WW8AttributeOutput::FormatFillGradient( const XFillGradientItem& /*rFillGradient*/ )