diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 12 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index d6a3244e6cfb..b750152735ae 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2327,16 +2327,6 @@ void SvxColorExtToolBoxControl::StateChanged( bChoiceFromPalette = sal_False; switch( nSID ) { - case SID_ATTR_CHAR_COLOR_EXT : - case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT : - if ( SFX_ITEM_DONTCARE != eState ) - { - const SfxBoolItem* pBool = PTR_CAST( SfxBoolItem, pState ); - rTbx.CheckItem( nId, pBool && pBool->GetValue()); - } - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - break; - case SID_ATTR_CHAR_COLOR2 : case SID_ATTR_CHAR_COLOR_BACKGROUND : case SID_BACKGROUND_COLOR : @@ -2381,7 +2371,7 @@ void SvxColorExtToolBoxControl::Select( sal_Bool ) Sequence< PropertyValue > aArgs( 1 ); aArgs[0].Name = aParamName; - aArgs[0].Value = makeAny( GetToolBox().IsItemChecked( GetId() )); + 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 f453619994b5..5c3453a2d619 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -60,7 +60,17 @@ namespace svx mnDrawMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW; DBG_ASSERT( ptrTbx, "ToolBox not found :-(" ); mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : sal_False; - Update(mnSlotId == SID_ATTR_CHAR_COLOR2 ? COL_BLACK : COL_GRAY); + switch( mnSlotId ) + { + case SID_ATTR_CHAR_COLOR2 : + Update( COL_BLACK ); + break; + case SID_ATTR_CHAR_COLOR_BACKGROUND : + Update( COL_YELLOW ); + break; + default : + Update( COL_GRAY ); + } } // ----------------------------------------------------------------------- |