diff options
author | Winfried Donkers <osc@dci-electronics.nl> | 2012-03-05 17:24:40 +0100 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-03-06 09:50:18 +0200 |
commit | 4236f5e19c5d3f3a5007c7a596868d09a7e39bee (patch) | |
tree | 36b686691cd58691beed6ab7db3679d69dc32bfb /svx | |
parent | b9046068b187f52c2b64be694b9f6cf7e8602246 (diff) |
fdo#45688: Split button for Calc cell font color
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/tbcontrl.hxx | 3 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 15 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 1 |
3 files changed, 17 insertions, 2 deletions
diff --git a/svx/inc/svx/tbcontrl.hxx b/svx/inc/svx/tbcontrl.hxx index 3f2bd3967f4d..8fb558eadb70 100644 --- a/svx/inc/svx/tbcontrl.hxx +++ b/svx/inc/svx/tbcontrl.hxx @@ -74,6 +74,9 @@ Execute-Id SID_ATTR_CHAR_COLOR2 and SID_ATTR_CHAR_COLOR_EXT + for cell color (calc) + Execute-Id SID_ATTR_CHAR_COLOR + for character background color (writer) Execute-Id SID_ATTR_CHAR_COLOR_BACKGROUND and SID_ATTR_CHAR_COLOR_BACKGROUND_EXT diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index e3669520f2a8..2a20d4a33660 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2325,6 +2325,7 @@ void SvxColorExtToolBoxControl::StateChanged( bChoiceFromPalette = sal_False; switch( nSID ) { + case SID_ATTR_CHAR_COLOR : case SID_ATTR_CHAR_COLOR2 : case SID_ATTR_CHAR_COLOR_BACKGROUND : case SID_BACKGROUND_COLOR : @@ -2347,21 +2348,28 @@ void SvxColorExtToolBoxControl::Select( sal_Bool ) { OUString aCommand; OUString aParamName; + sal_Bool bNoArgs = sal_False; switch( GetSlotId() ) { case SID_ATTR_CHAR_COLOR2 : - case SID_ATTR_CHAR_COLOR : + bNoArgs = sal_True; aCommand = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharColorExt" )); aParamName = OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColorExt" )); break; + case SID_ATTR_CHAR_COLOR : + aCommand = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Color" )); + aParamName = OUString( RTL_CONSTASCII_USTRINGPARAM( "Color" )); + break; + case SID_BACKGROUND_COLOR : aCommand = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:BackgroundColor" )); aParamName = OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" )); break; case SID_ATTR_CHAR_COLOR_BACKGROUND : + bNoArgs = sal_True; aCommand = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharBackgroundExt" )); aParamName = OUString( RTL_CONSTASCII_USTRINGPARAM( "CharBackgroundExt" )); break; @@ -2369,7 +2377,10 @@ void SvxColorExtToolBoxControl::Select( sal_Bool ) Sequence< PropertyValue > aArgs( 1 ); aArgs[0].Name = aParamName; - aArgs[0].Value = makeAny( (sal_uInt32)( mLastColor.GetColor() )); + if ( bNoArgs ) + aArgs[0].Value = makeAny( GetToolBox().IsItemChecked( GetId() )); + else + aArgs[0].Value = makeAny( (sal_uInt32)( mLastColor.GetColor() )); Dispatch( aCommand, aArgs ); } diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 5c3453a2d619..1b567d44212b 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -62,6 +62,7 @@ namespace svx mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : sal_False; switch( mnSlotId ) { + case SID_ATTR_CHAR_COLOR : case SID_ATTR_CHAR_COLOR2 : Update( COL_BLACK ); break; |