diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-12 15:47:31 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-17 16:08:46 +0100 |
commit | 9235c5a3c2c7038b75606235859057f13824d5a1 (patch) | |
tree | d4b04f5f6e60e410a5e57c266a2ba0e1680024e3 /sw | |
parent | 2c86015adc2875666969c519436684253cf13c32 (diff) |
MM change listener from friend to a nested class
Change-Id: I245a27e02816d3c96ca7777059b99c42cb64cca5
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/dbmgr.hxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 19 |
2 files changed, 11 insertions, 13 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index b124106e5e9f..bc22bdfc70ee 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -231,14 +231,13 @@ struct SwMergeDescriptor } }; -struct SwDBManager_Impl; -class SwConnectionDisposedListener_Impl; class AbstractMailMergeDlg; class SwDoc; class SW_DLLPUBLIC SwDBManager { -friend class SwConnectionDisposedListener_Impl; + struct SwDBManager_Impl; + class ConnectionDisposedListener_Impl; enum class MergeStatus { diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index e55d0733d46d..e372b8ee971d 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -200,8 +200,8 @@ static bool lcl_getCountFromResultSet( sal_Int32& rCount, const SwDSParam* pPara return false; } -class SwConnectionDisposedListener_Impl : public cppu::WeakImplHelper -< lang::XEventListener > +class SwDBManager::ConnectionDisposedListener_Impl + : public cppu::WeakImplHelper< lang::XEventListener > { private: SwDBManager * m_pDBManager; @@ -209,7 +209,7 @@ private: virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException, std::exception) override; public: - explicit SwConnectionDisposedListener_Impl(SwDBManager& rMgr); + explicit ConnectionDisposedListener_Impl(SwDBManager& rMgr); void Dispose() { m_pDBManager = nullptr; } @@ -293,17 +293,16 @@ void SwDataSourceRemovedListener::Dispose() m_pDBManager = nullptr; } -struct SwDBManager_Impl +struct SwDBManager::SwDBManager_Impl { SwDSParam* pMergeData; VclPtr<AbstractMailMergeDlg> pMergeDialog; - ::rtl::Reference<SwConnectionDisposedListener_Impl> m_xDisposeListener; + rtl::Reference<SwDBManager::ConnectionDisposedListener_Impl> m_xDisposeListener; rtl::Reference<SwDataSourceRemovedListener> m_xDataSourceRemovedListener; explicit SwDBManager_Impl(SwDBManager& rDBManager) - :pMergeData(nullptr) - ,pMergeDialog() - , m_xDisposeListener(new SwConnectionDisposedListener_Impl(rDBManager)) + : pMergeData( nullptr ) + , m_xDisposeListener(new ConnectionDisposedListener_Impl(rDBManager)) {} ~SwDBManager_Impl() @@ -3063,12 +3062,12 @@ void SwDBManager::releaseRevokeListener() pImpl->m_xDataSourceRemovedListener.clear(); } -SwConnectionDisposedListener_Impl::SwConnectionDisposedListener_Impl(SwDBManager& rManager) +SwDBManager::ConnectionDisposedListener_Impl::ConnectionDisposedListener_Impl(SwDBManager& rManager) : m_pDBManager(&rManager) { } -void SwConnectionDisposedListener_Impl::disposing( const lang::EventObject& rSource ) +void SwDBManager::ConnectionDisposedListener_Impl::disposing( const lang::EventObject& rSource ) throw (uno::RuntimeException, std::exception) { ::SolarMutexGuard aGuard; |