diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-03-18 10:31:11 +0100 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-03-21 16:19:09 +0100 |
commit | 8519d51b3a06a84d0d6418651e66e9bb534f1788 (patch) | |
tree | bba32ae5e640194ee0e2fd86e0c0a7ef16f42dbd /sw | |
parent | 89399a6ba7c1817dfdc7676603f3fa1106d398c5 (diff) |
Char highlight: export character background to MSO formats based on settings
Change-Id: Iaaf9e7ee5e61cfabb0d675b83fa71776dece87e2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/globalfilter/globalfilter.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/attributeoutputbase.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 16 |
3 files changed, 20 insertions, 1 deletions
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 71d2adaa5aa7..a74103765447 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 5b8d268503c9..58a226a7202c 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 c52e9c352063..1bd05c8854b2 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: */ |