summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <armin.le.grand@me.com>2021-06-17 10:17:25 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2021-06-18 11:10:56 +0200
commit04cd6749177f886f382e8bcd026f95112ee22473 (patch)
treeb74693c1a738add2df00cedc85397720598f3021 /sfx2
parent6317f8cc83ec92b8700785ab67c4c66ed1aa8fb2 (diff)
tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWN
Rename ::StateChanged methods using SfxItemState to allow better analysis of SfxItemState/SfxPoolItem usage(s), discussion see tdf#130428 comment 30 Change-Id: I736be0160ad7a9b7882c1c8a4cc05d9396ee3305 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117366 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/inettbc.hxx2
-rw-r--r--sfx2/inc/unoctitm.hxx2
-rw-r--r--sfx2/source/control/ctrlitem.cxx6
-rw-r--r--sfx2/source/control/sfxstatuslistener.cxx4
-rw-r--r--sfx2/source/control/statcach.cxx10
-rw-r--r--sfx2/source/control/unoctitm.cxx4
-rw-r--r--sfx2/source/dialog/tplcitem.cxx2
-rw-r--r--sfx2/source/inc/tplcitem.hxx2
-rw-r--r--sfx2/source/inet/inettbc.cxx2
-rw-r--r--sfx2/source/sidebar/ControllerItem.cxx2
-rw-r--r--sfx2/source/statbar/stbitem.cxx4
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
13 files changed, 23 insertions, 23 deletions
diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
index 0eb4feecbe44..1e695a9e47b4 100644
--- a/sfx2/inc/inettbc.hxx
+++ b/sfx2/inc/inettbc.hxx
@@ -56,7 +56,7 @@ public:
virtual ~SfxURLToolBoxControl_Impl() override;
virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
};
#endif
diff --git a/sfx2/inc/unoctitm.hxx b/sfx2/inc/unoctitm.hxx
index c180150325cc..8259329e9e18 100644
--- a/sfx2/inc/unoctitm.hxx
+++ b/sfx2/inc/unoctitm.hxx
@@ -129,7 +129,7 @@ public:
static OUString getSlaveCommand( const css::util::URL& rURL );
void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer const * pServ );
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
void setMasterSlaveCommand( bool bSet );
/// @throws css::uno::RuntimeException
void dispatch( const css::util::URL& aURL,
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 308706f95b8c..b55ceda7d349 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -199,7 +199,7 @@ void SfxControllerItem::dispose()
UnBind();
}
-void SfxControllerItem::StateChanged
+void SfxControllerItem::StateChangedAtToolBoxControl
(
sal_uInt16, // <SID> of the triggering slot
SfxItemState, // <SfxItemState> of 'pState'
@@ -234,7 +234,7 @@ void SfxControllerItem::GetControlState
{
}
-void SfxStatusForwarder::StateChanged
+void SfxStatusForwarder::StateChangedAtToolBoxControl
(
sal_uInt16 nSID, // <SID> of the triggering slot
SfxItemState eState, // <SfxItemState> of 'pState'
@@ -242,7 +242,7 @@ void SfxStatusForwarder::StateChanged
)
{
- pMaster->StateChanged( nSID, eState, pState );
+ pMaster->StateChangedAtToolBoxControl( nSID, eState, pState );
}
diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx
index 9452d9e7ad91..ff436cbd52a0 100644
--- a/sfx2/source/control/sfxstatuslistener.cxx
+++ b/sfx2/source/control/sfxstatuslistener.cxx
@@ -62,7 +62,7 @@ SfxStatusListener::~SfxStatusListener()
}
// old sfx controller item C++ API
-void SfxStatusListener::StateChanged( SfxItemState, const SfxPoolItem* )
+void SfxStatusListener::StateChangedAtStatusListener( SfxItemState, const SfxPoolItem* )
{
// must be implemented by sub class
}
@@ -220,7 +220,7 @@ void SAL_CALL SfxStatusListener::statusChanged( const FeatureStateEvent& rEvent)
}
}
- StateChanged( eState, pItem.get() );
+ StateChangedAtStatusListener( eState, pItem.get() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 6942818096ea..79d4a1eaf6b6 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -136,7 +136,7 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const css::frame::FeatureStateE
for ( SfxControllerItem *pCtrl = pCache->GetItemLink();
pCtrl;
pCtrl = pCtrl->GetItemLink() )
- pCtrl->StateChanged( nId, eState, pItem.get() );
+ pCtrl->StateChangedAtToolBoxControl( nId, eState, pItem.get() );
}
}
@@ -372,11 +372,11 @@ void SfxStateCache::SetVisibleState( bool bShow )
for ( SfxControllerItem *pCtrl = pController;
pCtrl;
pCtrl = pCtrl->GetItemLink() )
- pCtrl->StateChanged( nId, eState, pState );
+ pCtrl->StateChangedAtToolBoxControl( nId, eState, pState );
}
if ( pInternalController )
- pInternalController->StateChanged( nId, eState, pState );
+ pInternalController->StateChangedAtToolBoxControl( nId, eState, pState );
if ( bDeleteItem )
delete pState;
@@ -420,7 +420,7 @@ void SfxStateCache::SetState_Impl
for ( SfxControllerItem *pCtrl = pController;
pCtrl;
pCtrl = pCtrl->GetItemLink() )
- pCtrl->StateChanged( nId, eState, pState );
+ pCtrl->StateChangedAtToolBoxControl( nId, eState, pState );
}
if ( pInternalController )
@@ -462,7 +462,7 @@ void SfxStateCache::SetCachedState( bool bAlways )
for ( SfxControllerItem *pCtrl = pController;
pCtrl;
pCtrl = pCtrl->GetItemLink() )
- pCtrl->StateChanged( nId, eLastState, pLastItem );
+ pCtrl->StateChangedAtToolBoxControl( nId, eLastState, pLastItem );
}
if ( pInternalController )
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index d973da794d71..50034333bcd5 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -791,7 +791,7 @@ void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
{
const SfxPoolItem* pState=nullptr;
SfxItemState eState = pDispatcher->QueryState( GetId(), pState );
- StateChanged( GetId(), eState, pState );
+ StateChangedAtToolBoxControl( GetId(), eState, pState );
}
}
@@ -975,7 +975,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
}
}
-void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SfxDispatchController_Impl::StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
StateChanged( nSID, eState, pState, nullptr );
}
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 2a1a1d28a55f..af86e46b9736 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -51,7 +51,7 @@ SfxTemplateControllerItem::~SfxTemplateControllerItem()
// Notice about change of status, is propagated through the Controller
// passed on by the constructor
-void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
+void SfxTemplateControllerItem::StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pItem )
{
switch(nSID)
diff --git a/sfx2/source/inc/tplcitem.hxx b/sfx2/source/inc/tplcitem.hxx
index 9b13f8ce3acf..7ce479936e6d 100644
--- a/sfx2/source/inc/tplcitem.hxx
+++ b/sfx2/source/inc/tplcitem.hxx
@@ -33,7 +33,7 @@ class SfxTemplateControllerItem : public SfxControllerItem {
DECL_LINK(SetWaterCanStateHdl_Impl, void*, void);
protected:
- virtual void StateChanged(sal_uInt16, SfxItemState, const SfxPoolItem* pState) override;
+ virtual void StateChangedAtToolBoxControl(sal_uInt16, SfxItemState, const SfxPoolItem* pState) override;
public:
SfxTemplateControllerItem(sal_uInt16 nId, SfxCommonTemplateDialog_Impl& rDialog, SfxBindings& rBindings);
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 6027819ede7f..52b1d7ad1341 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -217,7 +217,7 @@ IMPL_LINK_NOARG(SfxURLToolBoxControl_Impl, OpenHdl, weld::ComboBox&, bool)
return true;
}
-void SfxURLToolBoxControl_Impl::StateChanged
+void SfxURLToolBoxControl_Impl::StateChangedAtToolBoxControl
(
sal_uInt16 nSID,
SfxItemState eState,
diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx
index a2953e807e61..e02276ec0cdd 100644
--- a/sfx2/source/sidebar/ControllerItem.cxx
+++ b/sfx2/source/sidebar/ControllerItem.cxx
@@ -40,7 +40,7 @@ ControllerItem::~ControllerItem()
dispose();
}
-void ControllerItem::StateChanged (
+void ControllerItem::StateChangedAtToolBoxControl (
sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState)
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index b5f37270e9d9..6e31b10bc7b1 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -268,7 +268,7 @@ void SAL_CALL SfxStatusBarControl::statusChanged( const frame::FeatureStateEvent
}
}
- StateChanged( nSlotID, eState, pItem.get() );
+ StateChangedAtStatusBarControl( nSlotID, eState, pItem.get() );
}
}
@@ -356,7 +356,7 @@ void SAL_CALL SfxStatusBarControl::doubleClick( const awt::Point& )
}
// old sfx2 interface
-void SfxStatusBarControl::StateChanged
+void SfxStatusBarControl::StateChangedAtStatusBarControl
(
sal_uInt16 nSID,
SfxItemState eState,
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 0ac302d49ce3..2db988e1518a 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -435,7 +435,7 @@ void SAL_CALL SfxToolBoxControl::statusChanged( const FeatureStateEvent& rEvent
}
}
- StateChanged( nSlotId, eState, pItem.get() );
+ StateChangedAtToolBoxControl( nSlotId, eState, pItem.get() );
}
}
@@ -471,7 +471,7 @@ Reference< css::awt::XWindow > SAL_CALL SfxToolBoxControl::createItemWindow( con
return VCLUnoHelper::GetInterface( CreateItemWindow( VCLUnoHelper::GetWindow( rParent )));
}
-void SfxToolBoxControl::StateChanged
+void SfxToolBoxControl::StateChangedAtToolBoxControl
(
sal_uInt16 /*nSlotId*/,
SfxItemState eState,
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index ac2bf3411497..370459a3ec0f 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -341,7 +341,7 @@ void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest )
SfxControllerItem* pCtrl = pCache->GetItemLink();
while( pCtrl )
{
- pCtrl->StateChanged( SID_FOCUSURLBOX, SfxItemState::UNKNOWN, nullptr );
+ pCtrl->StateChangedAtToolBoxControl( SID_FOCUSURLBOX, SfxItemState::UNKNOWN, nullptr );
pCtrl = pCtrl->GetItemLink();
}
}