sw/source/uibase/shells/textsh1.cxx |   34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

New commits:
commit cdfd24fe2a45ab41c84f813eb0d6a52a9d731a79
Author: Maxim Monastirsky <momonas...@gmail.com>
Date:   Mon Jul 14 17:22:40 2014 +0300

    fdo#81231 Make this macro work again
    
    Change-Id: If655b5ef94657b2771d4e05dd6a2c494aa0e587d

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 76025c2..66b4f08 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1175,26 +1175,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:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to