dbaccess/source/ui/browser/genericcontroller.cxx | 8 ++++---- include/dbaccess/genericcontroller.hxx | 7 ++----- 2 files changed, 6 insertions(+), 9 deletions(-)
New commits: commit 1dd0d2ce717c2805b52fd59804cf0ea3f7d872c3 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Mon Apr 8 23:13:34 2024 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Apr 10 10:17:54 2024 +0200 OGenericUnoController remove some typedefs Change-Id: I9e582c19cd6a169d839aea9d2192e31ab06366b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165912 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 6263e3dca124..d07a7e51b0a2 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -388,7 +388,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, // it is possible that listeners are registered or revoked while // we are notifying them, so we must use a copy of m_arrStatusListener, not // m_arrStatusListener itself - Dispatch aNotifyLoop( m_arrStatusListener ); + std::vector<DispatchTarget> aNotifyLoop( m_arrStatusListener ); for (auto const& elem : aNotifyLoop) { @@ -617,7 +617,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene else { // remove the listener only for the given URL - Dispatch::iterator iterSearch = std::find_if(m_arrStatusListener.begin(), m_arrStatusListener.end(), + auto iterSearch = std::find_if(m_arrStatusListener.begin(), m_arrStatusListener.end(), [&aListener, &_rURL](const DispatchTarget& rCurrent) { return (rCurrent.xListener == aListener) && (rCurrent.aURL.Complete == _rURL.Complete); }); if (iterSearch != m_arrStatusListener.end()) @@ -631,7 +631,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find(_rURL.Complete); if (aIter != m_aSupportedFeatures.end()) { // clear the cache for that feature - StateCache::const_iterator aCachePos = m_aStateCache.find( aIter->second.nFeatureId ); + auto aCachePos = m_aStateCache.find( aIter->second.nFeatureId ); if ( aCachePos != m_aStateCache.end() ) m_aStateCache.erase( aCachePos ); } @@ -660,7 +660,7 @@ void OGenericUnoController::disposing() { EventObject aDisposeEvent; aDisposeEvent.Source = static_cast<XWeak*>(this); - Dispatch aStatusListener = m_arrStatusListener; + std::vector<DispatchTarget> aStatusListener = m_arrStatusListener; for (auto const& statusListener : aStatusListener) { statusListener.xListener->disposing(aDisposeEvent); diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx index 2624a2c4449f..175cf955d799 100644 --- a/include/dbaccess/genericcontroller.hxx +++ b/include/dbaccess/genericcontroller.hxx @@ -226,15 +226,12 @@ namespace dbaui DispatchTarget(css::util::URL _aURL, css::uno::Reference< css::frame::XStatusListener > xRef) : aURL(std::move(_aURL)), xListener(std::move(xRef)) { } }; - typedef std::map<sal_uInt16, FeatureState> StateCache; - typedef std::vector<DispatchTarget> Dispatch; - ::std::deque< FeatureListener > m_aFeaturesToInvalidate; std::mutex m_aFeatureMutex; // locked when features are append to or remove from deque - StateCache m_aStateCache; // save the current status of feature state - Dispatch m_arrStatusListener; // all our listeners where we dispatch status changes + std::map<sal_uInt16, FeatureState> m_aStateCache; // save the current status of feature state + std::vector<DispatchTarget> m_arrStatusListener; // all our listeners where we dispatch status changes OAsynchronousLink m_aAsyncInvalidateAll; OAsynchronousLink m_aAsyncCloseTask; // called when a task should be closed