diff options
author | Winfried Donkers <osc@dci-electronics.nl> | 2012-03-11 09:05:02 +0100 |
---|---|---|
committer | Stefan Knorr (astron) <heinzlesspam@gmail.com> | 2012-03-21 11:44:36 +0100 |
commit | ae7c80640df922630060b82ffa91fd7db2e4d6d7 (patch) | |
tree | c8b35e0f80866df461b0f919480b381ffc48b03f | |
parent | 4c40593e3e936e6a966410ab807df4b775fc2464 (diff) |
fdo#45671 set initial color for split buttons
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 12 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 8 |
3 files changed, 34 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 0ecf87d08e63..cb56facafa6a 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 1b567d44212b..c62ce1bcfafe 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 bb2dabad32ae..5aabb0843b5e 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 |