diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-05-11 02:21:23 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-05-14 12:39:42 +0300 |
commit | 584b415924bba22db23a4258062e54973de0ed7c (patch) | |
tree | 6c1ee8bbbca7f20c61193710a99a6d4399d26d90 /reportdesign | |
parent | 2a98a03904895b6dce7ec53042b0204dbb379d5b (diff) |
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
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/misc/toolboxcontroller.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
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<SvxColorExtToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_SET : SFX_ITEM_DISABLED,&aColorItem); - else - static_cast<SvxColorToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_SET : SFX_ITEM_DISABLED,&aColorItem); + static_cast<SvxColorToolBoxControl*>(m_pToolbarController.get())->StateChanged(m_nSlotId,Event.IsEnabled ? SFX_ITEM_SET : SFX_ITEM_DISABLED,&aColorItem); } break; case SID_ATTR_CHAR_FONT: |