Char highlight: export character background to MSO formats based on settings
Change-Id: Iaaf9e7ee5e61cfabb0d675b83fa71776dece87e2
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 71d2ada..a741037 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -18,6 +18,7 @@
#include <doc.hxx>
#include <ndgrf.hxx>
#include <drawdoc.hxx>
#include <unotools/fltrcfg.hxx>
class Test : public SwModelTestBase
{
@@ -364,6 +365,9 @@ void Test::testCharHighlight()
"Office Open XML Text",
};
SvtFilterOptions& rOpt = SvtFilterOptions::Get();
rOpt.SetCharBackground2Shading();
for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter )
{
if (mxComponent.is())
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 5b8d268..58a226a 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -414,6 +414,7 @@ protected:
virtual void CharAnimatedText( const SvxBlinkItem& ) = 0;
/// Sfx item RES_CHRATR_BACKGROUND
void CharBackgroundBase( const SvxBrushItem& );
virtual void CharBackground( const SvxBrushItem& ) = 0;
/// Sfx item RES_CHRATR_CJK_FONT
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index c52e9c3..1bd05c8 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -134,6 +134,7 @@
#include "fields.hxx"
#include <vcl/outdev.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <unotools/fltrcfg.hxx>
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
@@ -5310,7 +5311,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
CharAnimatedText( static_cast< const SvxBlinkItem& >( rHt ) );
break;
case RES_CHRATR_BACKGROUND:
CharBackground( static_cast< const SvxBrushItem& >( rHt ) );
CharBackgroundBase( static_cast< const SvxBrushItem& >( rHt ) );
break;
case RES_CHRATR_CJK_FONT:
@@ -5633,4 +5634,17 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTxt
return NULL;
}
void AttributeOutputBase::CharBackgroundBase( const SvxBrushItem& rBrush )
{
const SvtFilterOptions& rOpt = SvtFilterOptions::Get();
if( rOpt.IsCharBackground2Highlighting() )
{
CharHighlight(rBrush);
}
else
{
CharBackground(rBrush);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */