From 9125a4f3f63a7f49fd307908c181e999120063e0 Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Thu, 13 Oct 2016 10:20:31 +0300 Subject: Use FeatureStateEvent directly for status updates ... for SfxPopupWindow and SvxColorToolBoxControl (the latter shares BorderColorStatus with SvxColorWindow_Impl, so it was easier to convert it too). Change-Id: Ifcb23fe5809e467322d1cf4d790420886ac79b47 --- svx/source/tbxctrls/lboxctrl.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'svx/source/tbxctrls/lboxctrl.cxx') diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index cb81b3d342e8..1aab1bfd8fd3 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -50,8 +50,6 @@ class SvxPopupWindowListBox; class SvxPopupWindowListBox: public SfxPopupWindow { - using FloatingWindow::StateChanged; - VclPtr m_pListBox; ToolBox & rToolBox; bool bUserSel; @@ -64,8 +62,7 @@ public: // SfxPopupWindow virtual void PopupModeEnd() override; - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) override; + virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override; inline ListBox & GetListBox() { return *m_pListBox; } @@ -118,11 +115,10 @@ void SvxPopupWindowListBox::PopupModeEnd() } -void SvxPopupWindowListBox::StateChanged( - sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SvxPopupWindowListBox::statusChanged( const css::frame::FeatureStateEvent& rEvent ) { - rToolBox.EnableItem( nTbxId, ( SfxToolBoxControl::GetItemState( pState ) != SfxItemState::DISABLED) ); - SfxPopupWindow::StateChanged( nSID, eState, pState ); + rToolBox.EnableItem( nTbxId, rEvent.IsEnabled ); + SfxPopupWindow::statusChanged( rEvent ); } SvxListBoxControl::SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) -- cgit