[Libreoffice-commits] .: svx/source sw/source

Stefan Knorr astron at kemper.freedesktop.org
Wed Mar 21 03:45:42 PDT 2012


 svx/source/tbxctrls/tbcontrl.cxx       |   12 ++++++++++++
 svx/source/tbxctrls/tbxcolorupdate.cxx |   16 ++++++++++++++--
 sw/source/ui/docvw/edtwin.cxx          |    8 ++++++++
 3 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit ae7c80640df922630060b82ffa91fd7db2e4d6d7
Author: Winfried Donkers <osc at dci-electronics.nl>
Date:   Sun Mar 11 09:05:02 2012 +0100

    fdo#45671 set initial color for split buttons

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 0ecf87d..cb56fac 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2231,6 +2231,14 @@ void SvxColorToolBoxControl::StateChanged(
 //========================================================================
 // class SvxColorExtToolBoxControl ----------------------------------------
 //========================================================================
+/* Note:
+   The initial color shown on the button is set in /core/svx/source/tbxctrls/tbxcolorupdate.cxx
+   (ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) .
+   The initial color used by the button is set in /core/svx/source/tbxcntrls/tbcontrl.cxx
+   (SvxColorExtToolBoxControl::SvxColorExtToolBoxControl())
+   and in case of writer for text(background)color also in /core/sw/source/ui/docvw/edtwin.cxx
+   (SwEditWin::aTextBackColor and SwEditWin::aTextBackColor)
+ */
 
 SvxColorExtToolBoxControl::SvxColorExtToolBoxControl(
     sal_uInt16 nSlotId,
@@ -2252,11 +2260,13 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl(
         case SID_ATTR_CHAR_COLOR:
             addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Color" )));
             nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
+            mLastColor = COL_RED;
             break;
 
         case SID_ATTR_CHAR_COLOR2:
             addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharColorExt" )));
             nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
+            mLastColor = COL_RED;
             break;
 
         case SID_BACKGROUND_COLOR:
@@ -2264,11 +2274,13 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl(
         default:
             addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharBackgroundExt" )));
             nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
+            mLastColor = COL_YELLOW;
             break;
 
         case SID_FRAME_LINECOLOR:
             addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FrameLineColor" )));
             nMode = 0;
+            mLastColor = COL_BLUE;
             break;
     }
 
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 1b567d4..c62ce1b 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -44,6 +44,14 @@ namespace svx
     //====================================================================
     //= ToolboxButtonColorUpdater
     //====================================================================
+    /* Note:
+       The initial color shown on the button is set in /core/svx/source/tbxctrls/tbxcolorupdate.cxx
+       (ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) .
+       The initial color used by the button is set in /core/svx/source/tbxcntrls/tbcontrl.cxx
+       (SvxColorExtToolBoxControl::SvxColorExtToolBoxControl())
+       and in case of writer for text(background)color also in /core/sw/source/ui/docvw/edtwin.cxx
+       (SwEditWin::aTextBackColor and SwEditWin::aTextBackColor)
+     */
 
     ToolboxButtonColorUpdater::ToolboxButtonColorUpdater(
         sal_uInt16 nId,
@@ -64,13 +72,17 @@ namespace svx
         {
             case SID_ATTR_CHAR_COLOR  :
             case SID_ATTR_CHAR_COLOR2 :
-                Update( COL_BLACK );
+                Update( COL_RED );
+                break;
+            case SID_FRAME_LINECOLOR  :
+                Update( COL_BLUE );
                 break;
             case SID_ATTR_CHAR_COLOR_BACKGROUND :
+            case SID_BACKGROUND_COLOR :
                 Update( COL_YELLOW );
                 break;
             default :
-                Update( COL_GRAY );
+                Update( COL_TRANSPARENT );
         }
     }
 
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index bb2daba..5aabb08 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -176,6 +176,14 @@ QuickHelpData* SwEditWin::pQuickHlpData = 0;
 
 long    SwEditWin::nDDStartPosY = 0;
 long    SwEditWin::nDDStartPosX = 0;
+/* Note:
+   The initial color shown on the button is set in /core/svx/source/tbxctrls/tbxcolorupdate.cxx
+   (ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) .
+   The initial color used by the button is set in /core/svx/source/tbxcntrls/tbcontrl.cxx
+   (SvxColorExtToolBoxControl::SvxColorExtToolBoxControl())
+   and in case of writer for text(background)color also in /core/sw/source/ui/docvw/edtwin.cxx
+   (SwEditWin::aTextBackColor and SwEditWin::aTextBackColor)
+ */
 Color   SwEditWin::aTextBackColor(COL_YELLOW);
 Color   SwEditWin::aTextColor(COL_RED);
 sal_Bool SwEditWin::bTransparentBackColor = sal_False; // background not transparent


More information about the Libreoffice-commits mailing list