summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/formatsh.cxx
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 /sc/source/ui/view/formatsh.cxx
parent54442c917d7bb6b2e955c8c8315e0352dc6d2281 (diff)
fdo#45671 calc cell background color simplified code for split button
Diffstat (limited to 'sc/source/ui/view/formatsh.cxx')
-rw-r--r--sc/source/ui/view/formatsh.cxx22
1 files changed, 2 insertions, 20 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 8a91f36ed35a..5ef7d4f727be 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1421,13 +1421,12 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SfxBindings& rBindings = pViewData->GetBindings();
const SfxItemSet* pNewAttrs = rReq.GetArgs();
+ sal_uInt16 nSlot = rReq.GetSlot();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
if ( !pNewAttrs )
{
- sal_uInt16 nSlot = rReq.GetSlot();
-
switch ( nSlot )
{
case SID_ATTR_CHAR_FONT:
@@ -1449,25 +1448,10 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
rBindings.Invalidate( nSlot );
}
break;
-
- case SID_BACKGROUND_COLOR:
- {
- // SID_BACKGROUND_COLOR without arguments -> set background to last used color
-
- SvxBrushItem aBrushItem( (const SvxBrushItem&)
- pTabViewShell->GetSelectionPattern()->
- GetItem( ATTR_BACKGROUND ) );
- aBrushItem.SetColor( pTabViewShell->GetBackgroundColor() );
-
- pTabViewShell->ApplyAttr( aBrushItem );
- }
- break;
}
}
else
{
- sal_uInt16 nSlot = rReq.GetSlot();
-
switch ( nSlot )
{
case SID_ATTR_CHAR_OVERLINE:
@@ -1642,9 +1626,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
pTabViewShell->GetSelectionPattern()->
GetItem( ATTR_BACKGROUND ) );
- Color aSet = rNewColorItem.GetValue();
- pTabViewShell->SetBackgroundColor( aSet );
- aBrushItem.SetColor( aSet );
+ aBrushItem.SetColor( rNewColorItem.GetValue() );
pTabViewShell->ApplyAttr( aBrushItem );
}