[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source
Maxim Monastirsky
momonasmon at gmail.com
Tue Jul 15 04:04:57 PDT 2014
sw/source/core/uibase/shells/textsh1.cxx | 34 ++++++++++++++++---------------
1 file changed, 18 insertions(+), 16 deletions(-)
New commits:
commit 3a4e6c4673a4e4dde774d1f6267256d8d8c48e59
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Mon Jul 14 21:03:07 2014 +0300
fdo#81231 Make this macro work again
Change-Id: I829cf5e848eef268d460bc2ee5dd842843eee379
Reviewed-on: https://gerrit.libreoffice.org/10308
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/uibase/shells/textsh1.cxx b/sw/source/core/uibase/shells/textsh1.cxx
index 83b3661..58d996f 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:
More information about the Libreoffice-commits
mailing list