[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 17 14:29:48 UTC 2019


 sw/source/filter/ww8/ww8atr.cxx |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

New commits:
commit f70c4fe32136fdab2fc9309b4f40d9a954c56dd8
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Wed Nov 28 15:44:27 2018 +0300
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 17 15:29:22 2019 +0100

    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 at sil.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit 1a6367269df971dd6764db419162896170b4b21d)
    Reviewed-on: https://gerrit.libreoffice.org/66463
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index c8a3e0ab1d66..86b2b56f4889 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4217,8 +4217,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*/ )


More information about the Libreoffice-commits mailing list