summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbcontrl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/tbxctrls/tbcontrl.cxx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx15
1 files changed, 13 insertions, 2 deletions
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 );
}