summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinfried Donkers <osc@dci-electronics.nl>2012-03-05 17:24:40 +0100
committerTor Lillqvist <tml@iki.fi>2012-03-06 09:50:18 +0200
commit4236f5e19c5d3f3a5007c7a596868d09a7e39bee (patch)
tree36b686691cd58691beed6ab7db3679d69dc32bfb
parentb9046068b187f52c2b64be694b9f6cf7e8602246 (diff)
fdo#45688: Split button for Calc cell font color
-rw-r--r--sc/source/ui/app/scdll.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--svx/inc/svx/tbcontrl.hxx3
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx15
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx1
5 files changed, 19 insertions, 4 deletions
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index cb98122dc903..ece5a1f08c9a 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -203,7 +203,7 @@ void ScDLL::Init()
SvxStyleToolBoxControl ::RegisterControl(SID_STYLE_APPLY, pMod);
SvxFontNameToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONT, pMod);
// SvxFontHeightToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod);
- SvxFontColorToolBoxControl ::RegisterControl(SID_ATTR_CHAR_COLOR, pMod);
+ SvxColorExtToolBoxControl ::RegisterControl(SID_ATTR_CHAR_COLOR, pMod);
SvxColorExtToolBoxControl ::RegisterControl(SID_BACKGROUND_COLOR, pMod);
SvxFrameToolBoxControl ::RegisterControl(SID_ATTR_BORDER, pMod);
SvxFrameLineStyleToolBoxControl ::RegisterControl(SID_FRAME_LINESTYLE, pMod);
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index bc72117915ae..61522d6757dc 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1425,11 +1425,11 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
sal_uInt16 nSlot = rReq.GetSlot();
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
-
if ( !pNewAttrs )
{
switch ( nSlot )
{
+ case SID_ATTR_CHAR_COLOR:
case SID_ATTR_CHAR_FONT:
case SID_ATTR_CHAR_FONTHEIGHT:
pTabViewShell->ExecuteCellFormatDlg( rReq, TP_FONT ); // wenn ToolBar vertikal
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;