[Libreoffice-commits] .: sc/source svx/inc svx/source
Tor Lillqvist
tml at kemper.freedesktop.org
Mon Mar 5 23:50:30 PST 2012
sc/source/ui/app/scdll.cxx | 2 +-
sc/source/ui/view/formatsh.cxx | 2 +-
svx/inc/svx/tbcontrl.hxx | 3 +++
svx/source/tbxctrls/tbcontrl.cxx | 15 +++++++++++++--
svx/source/tbxctrls/tbxcolorupdate.cxx | 1 +
5 files changed, 19 insertions(+), 4 deletions(-)
New commits:
commit 4236f5e19c5d3f3a5007c7a596868d09a7e39bee
Author: Winfried Donkers <osc at dci-electronics.nl>
Date: Mon Mar 5 17:24:40 2012 +0100
fdo#45688: Split button for Calc cell font color
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index cb98122..ece5a1f 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 bc72117..61522d6 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 3f2bd39..8fb558e 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 e366952..2a20d4a 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 5c3453a..1b567d4 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;
More information about the Libreoffice-commits
mailing list