From 584b415924bba22db23a4258062e54973de0ed7c Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Sun, 11 May 2014 02:21:23 +0300 Subject: Keep only one class for toolbox color controls instead of 5 (mostly identical) classes. Also the following bugs were fixed: * All pickers now use split buttons. (fdo#45671) * Color palette now indicates the current color. (fdo#73891) (Previous changes related to that bug are reverted as part of this commit.) * Selecting a color from a float panel now updates the button. (fdo#77683) * For Font color/background color in Writer, the color that is shown on the button, is always the one that's actually used. (Can be a different color after hiding the toolbar.) * For Font color/background color in Writer, the button now indicates when we're in the format paintbrush mode. (Removed in 085e8a07e61ef2d3a82e11094d8773ab17cfdb3c for some reason.) Change-Id: Idb4829552240c52fb0882aca627c8177bbe2f839 --- reportdesign/source/ui/misc/toolboxcontroller.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'reportdesign/source') diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index ae10756972c5..492f64717580 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -179,7 +179,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments { m_aStates.insert(TCommandState::value_type(OUString(".uno:FontColor"),sal_True)); m_aStates.insert(TCommandState::value_type(OUString(".uno:Color"),sal_True)); - m_pToolbarController = TToolbarHelper::createFromQuery(new SvxColorExtToolBoxControl(m_nSlotId = SID_ATTR_CHAR_COLOR2,m_nToolBoxId,*pToolBox)); + m_pToolbarController = TToolbarHelper::createFromQuery(new SvxColorToolBoxControl(m_nSlotId = SID_ATTR_CHAR_COLOR2,m_nToolBoxId,*pToolBox)); } else { @@ -248,10 +248,7 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event util::Color nColor(COL_TRANSPARENT); Event.State >>= nColor; SvxColorItem aColorItem(::Color(nColor), 1); - if ( SID_ATTR_CHAR_COLOR2 == m_nSlotId ) - static_cast(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_SET : SFX_ITEM_DISABLED,&aColorItem); - else - static_cast(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_SET : SFX_ITEM_DISABLED,&aColorItem); + static_cast(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_SET : SFX_ITEM_DISABLED,&aColorItem); } break; case SID_ATTR_CHAR_FONT: -- cgit