summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-07-14 21:03:07 +0300
committerCaolán McNamara <caolanm@redhat.com>2014-07-15 11:04:29 +0000
commit3a4e6c4673a4e4dde774d1f6267256d8d8c48e59 (patch)
tree60c2bd1f11baa9feb4cda61f92b3d7508780020a
parentcd6f03d6f9ceea88e486788b09606c1efcaa4f1f (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.cxx34
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: