Attached the next button with simplified code.
More to follow.

Winfried
From 00e3a1eed09c3fce9143dd17fe72d20b626ceef6 Mon Sep 17 00:00:00 2001
From: Winfried Donkers <o...@dci-electronics.nl>
Date: Sat, 3 Mar 2012 09:55:11 +0100
Subject: [PATCH] fdo#45671 writer par. bg color simplified code

---
 sw/source/ui/inc/basesh.hxx    |    3 ---
 sw/source/ui/shells/basesh.cxx |   10 ----------
 2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx
index d544922..93ef626 100644
--- a/sw/source/ui/inc/basesh.hxx
+++ b/sw/source/ui/inc/basesh.hxx
@@ -50,7 +50,6 @@ struct DBTextStruct_Impl;
 class SwBaseShell: public SfxShell
 {
     SwView      &rView;
-    static Color        mBackgroundColor;
 
     // DragMode
     static FlyMode eFrameMode;
@@ -121,8 +120,6 @@ public:
     static void    SetFrmMode( FlyMode eMode, SwWrtShell *pShell );  // with update!
     static void   _SetFrmMode( FlyMode eMode )   { eFrameMode = eMode; }
     static FlyMode  GetFrmMode()                 { return eFrameMode;  }
-    Color       GetBackgroundColor()                   { return  mBackgroundColor; }
-    void        SetBackgroundColor( const Color& clr ) { mBackgroundColor = clr;   }
 };
 
 
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index f8369bf..b700bf7 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -1927,9 +1927,6 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
 /*--------------------------------------------------------------------
     Beschreibung:   Ctor
  --------------------------------------------------------------------*/
-// STATIC DATA -----------------------------------------------------------
-Color  SwBaseShell::mBackgroundColor = COL_TRANSPARENT;
-//             -----------------------------------------------------------
 
 SwBaseShell::SwBaseShell(SwView& rVw) :
     SfxShell( &rVw ),
@@ -2264,15 +2261,8 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
                                             pArgs->Get(SID_BACKGROUND_COLOR);
                     const Color& rNewColor = rNewColorItem.GetValue();
                     aBrushItem.SetColor( rNewColor );
-                    SetBackgroundColor( rNewColor );
                     GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem);
                 }
-                else
-                {
-                    // call without arguments, use last used background color
-                    aBrushItem.SetColor( GetBackgroundColor() );
-                    rReq.AppendItem( SvxColorItem( GetBackgroundColor(), nSlot ) );
-                 }
             }
             break;
 
-- 
1.7.7

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to