diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-05 14:33:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-06 08:41:58 +0200 |
commit | 4e2a8b78be17001cf7a3f648261559754a24e555 (patch) | |
tree | f72eec2eedeffab8dbbcf1991c550a7939fb9a94 | |
parent | 501e757649b760229cca1327ac2cf1945dc745a4 (diff) |
loplugin:mergeclasses
Change-Id: I7c8c60aab31517d595a7e37c3789fa1e515ec3ee
-rw-r--r-- | compilerplugins/clang/mergeclasses.results | 1 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 44 |
2 files changed, 15 insertions, 30 deletions
diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results index 40dfe8f73c6f..0ed5086cef04 100644 --- a/compilerplugins/clang/mergeclasses.results +++ b/compilerplugins/clang/mergeclasses.results @@ -1,5 +1,4 @@ merge (anonymous namespace)::Data with cppu::PropertySetMixinImpl::Impl -merge (anonymous namespace)::ITimeoutHandler with SvtFileView_Impl merge (anonymous namespace)::VCLXToolkit_Impl with (anonymous namespace)::VCLXToolkit merge AbstractMailMergeWizard with AbstractMailMergeWizard_Impl merge AbstractSearchProgress with AbstractSearchProgress_Impl diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index fa2a2c4b3e2a..e0f921421824 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -113,42 +113,21 @@ namespace o3tl namespace { - //= ITimeoutHandler - - class CallbackTimer; - class ITimeoutHandler - { - public: - virtual void onTimeout( CallbackTimer* _pInstigator ) = 0; - - protected: - ~ITimeoutHandler() {} - }; - - //= CallbackTimer class CallbackTimer : public ::salhelper::Timer { protected: - ITimeoutHandler* m_pTimeoutHandler; + SvtFileView_Impl* m_pTimeoutHandler; public: - CallbackTimer( ITimeoutHandler* _pHandler ) : m_pTimeoutHandler( _pHandler ) { } + CallbackTimer( SvtFileView_Impl* _pHandler ) : m_pTimeoutHandler( _pHandler ) { } protected: virtual void SAL_CALL onShot() SAL_OVERRIDE; }; - void SAL_CALL CallbackTimer::onShot() - { - OSL_ENSURE( m_pTimeoutHandler, "CallbackTimer::onShot: nobody interested in?" ); - ITimeoutHandler* pHandler( m_pTimeoutHandler ); - if ( pHandler ) - pHandler->onTimeout( this ); - } - } @@ -330,7 +309,6 @@ public: class SvtFileView_Impl :public ::svt::IEnumerationResultHandler - ,public ITimeoutHandler { protected: VclPtr<SvtFileView> mpAntiImpl; @@ -417,16 +395,14 @@ public: inline void EndEditing( bool _bCancel ); + void onTimeout(); + protected: DECL_LINK_TYPED( SelectionMultiplexer, SvTreeListBox*, void ); -protected: // IEnumerationResultHandler overridables virtual void enumerationDone( ::svt::EnumerationResult eResult ) SAL_OVERRIDE; void implEnumerationSuccess(); - - // ITimeoutHandler - virtual void onTimeout( CallbackTimer* _pInstigator ) SAL_OVERRIDE; }; inline void SvtFileView_Impl::EnableDelete( bool bEnable ) @@ -1835,7 +1811,7 @@ void SvtFileView_Impl::CancelRunningAsyncAction() } -void SvtFileView_Impl::onTimeout( CallbackTimer* ) +void SvtFileView_Impl::onTimeout() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( maMutex ); @@ -2262,4 +2238,14 @@ void QueryDeleteDlg_Impl::dispose() } +namespace { + void SAL_CALL CallbackTimer::onShot() + { + OSL_ENSURE( m_pTimeoutHandler, "CallbackTimer::onShot: nobody interested in?" ); + SvtFileView_Impl* pHandler( m_pTimeoutHandler ); + if ( pHandler ) + pHandler->onTimeout(); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |