Kaydet (Commit) 899a6568 authored tarafından Noel Grandin's avatar Noel Grandin

use rtl::Reference in BibDataManager

instead of manual reference counting

Change-Id: Ia8fd5487fb8d25d6725dd36b74aab57272aba911
Reviewed-on: https://gerrit.libreoffice.org/43447Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 843dca2f
......@@ -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);
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment