summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorWinfried Donkers <osc@dci-electronics.nl>2012-03-01 13:41:14 +0100
committerTor Lillqvist <tlillqvist@suse.com>2012-03-01 16:57:34 +0200
commit085e8a07e61ef2d3a82e11094d8773ab17cfdb3c (patch)
tree01256813b384c338882f0386ff9fc46644d99d5d /svx
parent54442c917d7bb6b2e955c8c8315e0352dc6d2281 (diff)
fdo#45671 calc cell background color simplified code for split button
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx12
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx12
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 );
+ }
}
// -----------------------------------------------------------------------