summaryrefslogtreecommitdiff
path: root/extensions/source/bibliography/framectr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/bibliography/framectr.cxx')
-rw-r--r--extensions/source/bibliography/framectr.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 0e06fed4b1b1..ad713bd538cb 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -178,13 +178,15 @@ BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWi
pParent->SetUniqueId(UID_BIB_FRAME_WINDOW);
bDisposing=false;
bHierarchical=true;
- mxImpl = new BibFrameCtrl_Impl;
- mxImpl->pController = this;
+ pImp = new BibFrameCtrl_Impl;
+ pImp->pController = this;
+ pImp->acquire();
}
BibFrameController_Impl::~BibFrameController_Impl()
{
- mxImpl->pController = nullptr;
+ pImp->pController = nullptr;
+ pImp->release();
delete pDatMan;
if(pBibMod)
CloseBibModul(pBibMod);
@@ -211,7 +213,7 @@ css::uno::Sequence< OUString > SAL_CALL BibFrameController_Impl::getSupportedSer
void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & xArg ) throw (css::uno::RuntimeException, std::exception)
{
xFrame = xArg;
- xFrame->addFrameActionListener( mxImpl );
+ xFrame->addFrameActionListener( pImp );
}
sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > & /*xModel*/ ) throw (css::uno::RuntimeException, std::exception)
@@ -222,9 +224,9 @@ sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > &
sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend ) throw (css::uno::RuntimeException, std::exception)
{
if ( bSuspend )
- getFrame()->removeFrameActionListener( mxImpl );
+ getFrame()->removeFrameActionListener( pImp );
else
- getFrame()->addFrameActionListener( mxImpl );
+ getFrame()->addFrameActionListener( pImp );
return true;
}
@@ -252,7 +254,7 @@ void BibFrameController_Impl::dispose() throw (css::uno::RuntimeException, std::
bDisposing = true;
lang::EventObject aObject;
aObject.Source = static_cast<XController*>(this);
- mxImpl->aLC.disposeAndClear(aObject);
+ pImp->aLC.disposeAndClear(aObject);
m_xDatMan = nullptr;
pDatMan = nullptr;
aStatusListeners.clear();
@@ -260,12 +262,12 @@ void BibFrameController_Impl::dispose() throw (css::uno::RuntimeException, std::
void BibFrameController_Impl::addEventListener( const uno::Reference< lang::XEventListener > & aListener ) throw (css::uno::RuntimeException, std::exception)
{
- mxImpl->aLC.addInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
+ pImp->aLC.addInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
}
void BibFrameController_Impl::removeEventListener( const uno::Reference< lang::XEventListener > & aListener ) throw (css::uno::RuntimeException, std::exception)
{
- mxImpl->aLC.removeInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
+ pImp->aLC.removeInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
}
uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( const util::URL& aURL, const OUString& /*aTarget*/, sal_Int32 /*nSearchFlags*/ ) throw (css::uno::RuntimeException, std::exception)
@@ -556,7 +558,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
bLeft = xCursor->isLast() && nCount > 1;
bRight= !xCursor->isLast();
// ask for confirmation
- Reference< frame::XController > xCtrl = mxImpl->pController;
+ Reference< frame::XController > xCtrl = pImp->pController;
Reference< form::XConfirmDeleteListener > xConfirm(pDatMan->GetFormController(),UNO_QUERY);
if (xConfirm.is())
{