diff options
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 14 | ||||
-rw-r--r-- | extensions/source/bibliography/datman.hxx | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 9e2dd31805e8..5afbd5f33590 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -607,7 +607,6 @@ OUString const gViewSize("theViewSize"); BibDataManager::BibDataManager() :BibDataManager_Base( GetMutex() ) - ,m_pInterceptorHelper( nullptr ) ,m_aLoadListeners(m_aMutex) ,pBibView( nullptr ) ,pToolbar(nullptr) @@ -633,11 +632,10 @@ BibDataManager::~BibDataManager() xConnection->dispose(); m_xForm = nullptr; } - if( m_pInterceptorHelper ) + if( m_xInterceptorHelper.is() ) { - m_pInterceptorHelper->ReleaseInterceptor(); - m_pInterceptorHelper->release(); - m_pInterceptorHelper = nullptr; + m_xInterceptorHelper->ReleaseInterceptor(); + m_xInterceptorHelper.clear(); } } @@ -1590,12 +1588,10 @@ uno::Reference< form::runtime::XFormController > const & BibDataManager::GetForm void BibDataManager::RegisterInterceptor( ::bib::BibBeamer* pBibBeamer) { - DBG_ASSERT( !m_pInterceptorHelper, "BibDataManager::RegisterInterceptor: called twice!" ); + DBG_ASSERT( !m_xInterceptorHelper.is(), "BibDataManager::RegisterInterceptor: called twice!" ); if( pBibBeamer ) - m_pInterceptorHelper = new BibInterceptorHelper( pBibBeamer, m_xFormDispatch); - if( m_pInterceptorHelper ) - m_pInterceptorHelper->acquire(); + m_xInterceptorHelper = new BibInterceptorHelper( pBibBeamer, m_xFormDispatch); } diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx index f988e29f9fad..139c0b7dd9ff 100644 --- a/extensions/source/bibliography/datman.hxx +++ b/extensions/source/bibliography/datman.hxx @@ -86,7 +86,7 @@ private: css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xParser; css::uno::Reference< css::form::runtime::XFormController > m_xFormCtrl; css::uno::Reference< css::frame::XDispatch > m_xFormDispatch; - BibInterceptorHelper* m_pInterceptorHelper; + rtl::Reference<BibInterceptorHelper> m_xInterceptorHelper; OUString aActiveDataTable; OUString aDataSourceURL; |