summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomofumi Yagi <yagit@mknada.sakura.ne.jp>2014-04-20 16:27:10 +0900
committerKohei Yoshida <libreoffice@kohei.us>2014-04-25 14:50:58 +0000
commitf5dc536eae7dc28e09112ab9dd69e55fae015ee8 (patch)
tree642f49e0d66d0ce9ea0f06fb0183b212c420b86b
parent356fa61f40d954e0210c79c7154482c3693603af (diff)
fdo#77683 the color in the toolbar buttons doesn't change.
The color in the toolbar buttons doesn't change when we use the Floating Font/Background/Highlight Color Toolbar. This problem seems happen sometimes,not always. This patch modifies that SvxColorExtToolBoxControl::StateChanged() in /svx/source/tbxctrls/tbcontrol.cxx handles SFX_ITEM_DEFAULT message always. Change-Id: If7410297db768c161287b75396186fbec3605f63 Reviewed-on: https://gerrit.libreoffice.org/9107 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-rw-r--r--include/svx/tbcontrl.hxx1
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx9
2 files changed, 2 insertions, 8 deletions
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index 94868eaae8a3..22c1c5ecf432 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -269,7 +269,6 @@ class SVX_DLLPUBLIC SvxColorExtToolBoxControl : public SfxToolBoxControl
::svx::ToolboxButtonColorUpdater* pBtnUpdater;
Color mLastColor;
- bool bChoiceFromPalette;
public:
SFX_DECL_TOOLBOX_CONTROL();
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 2c222941f25f..2d1e733b9ac8 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2482,7 +2482,6 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl(
mLastColor( COL_AUTO )
{
rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
- bChoiceFromPalette = false;
// The following commands are available at the various modules
switch( nSlotId )
@@ -2559,7 +2558,6 @@ SfxPopupWindow* SvxColorExtToolBoxControl::CreatePopupWindow()
FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pColorWin->StartSelection();
SetPopupWindow( pColorWin );
- bChoiceFromPalette = true;
return pColorWin;
}
@@ -2577,13 +2575,10 @@ void SvxColorExtToolBoxControl::StateChanged(
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
- if (bChoiceFromPalette)
+ if ( SFX_ITEM_DEFAULT == eState )
{
- bChoiceFromPalette = false;
-
const SvxColorItem* pItem = 0;
- if ( SFX_ITEM_DONTCARE != eState )
- pItem = PTR_CAST( SvxColorItem, pState );
+ pItem = PTR_CAST( SvxColorItem, pState );
if ( pItem )
{