diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-07-14 21:03:07 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-15 11:04:29 +0000 |
commit | 3a4e6c4673a4e4dde774d1f6267256d8d8c48e59 (patch) | |
tree | 60c2bd1f11baa9feb4cda61f92b3d7508780020a | |
parent | cd6f03d6f9ceea88e486788b09606c1efcaa4f1f (diff) |
fdo#81231 Make this macro work again
Change-Id: I829cf5e848eef268d460bc2ee5dd842843eee379
Reviewed-on: https://gerrit.libreoffice.org/10308
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/uibase/shells/textsh1.cxx | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/sw/source/core/uibase/shells/textsh1.cxx b/sw/source/core/uibase/shells/textsh1.cxx index 83b36619cf03..58d996f1f698 100644 --- a/sw/source/core/uibase/shells/textsh1.cxx +++ b/sw/source/core/uibase/shells/textsh1.cxx @@ -1161,26 +1161,28 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case SID_ATTR_CHAR_COLOR_BACKGROUND: { + Color aSet; if(pItem) - { - Color aSet = ((const SvxColorItem*)pItem)->GetValue(); - SwEditWin& rEdtWin = GetView().GetEditWin(); - rEdtWin.SetTextBackColor(aSet); - SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); + aSet = ((const SvxColorItem*)pItem)->GetValue(); + else + aSet = COL_TRANSPARENT; - if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI())) - { - SvxBrushItem aBrushItem(RES_CHRATR_BACKGROUND); - aBrushItem.SetColor(aSet); - rWrtSh.SetAttrItem( aBrushItem ); - } - else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT) - { - GetView().GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_BACKGROUND_EXT); - } + SwEditWin& rEdtWin = GetView().GetEditWin(); + rEdtWin.SetTextBackColor(aSet); + SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); - rReq.Done(); + if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI())) + { + SvxBrushItem aBrushItem(RES_CHRATR_BACKGROUND); + aBrushItem.SetColor(aSet); + rWrtSh.SetAttrItem( aBrushItem ); } + else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT) + { + GetView().GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_BACKGROUND_EXT); + } + + rReq.Done(); } break; case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT: |