From 111de438ea3e512a541281dc0716cc728ea8d152 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 23 May 2016 13:53:42 +0200 Subject: remove some manual ref-counting triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f Reviewed-on: https://gerrit.libreoffice.org/25363 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/Library_fwi.mk | 1 + framework/source/fwe/dispatch/interaction.cxx | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'framework') diff --git a/framework/Library_fwi.mk b/framework/Library_fwi.mk index 5e829635723d..8435b9df474e 100644 --- a/framework/Library_fwi.mk +++ b/framework/Library_fwi.mk @@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,fwi,\ cppuhelper \ i18nlangtag \ sal \ + salhelper \ svl \ svt \ tk \ diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx index 6fc5c69086f2..0229db2fddf1 100644 --- a/framework/source/fwe/dispatch/interaction.cxx +++ b/framework/source/fwe/dispatch/interaction.cxx @@ -156,14 +156,12 @@ css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > } RequestFilterSelect::RequestFilterSelect( const OUString& sURL ) + : mxImpl(new RequestFilterSelect_Impl( sURL )) { - pImp = new RequestFilterSelect_Impl( sURL ); - pImp->acquire(); } RequestFilterSelect::~RequestFilterSelect() { - pImp->release(); } // return abort state of interaction @@ -171,7 +169,7 @@ RequestFilterSelect::~RequestFilterSelect() bool RequestFilterSelect::isAbort() const { - return pImp->isAbort(); + return mxImpl->isAbort(); } // return user selected filter @@ -179,12 +177,12 @@ bool RequestFilterSelect::isAbort() const OUString RequestFilterSelect::getFilter() const { - return pImp->getFilter(); + return mxImpl->getFilter(); } uno::Reference < task::XInteractionRequest > RequestFilterSelect::GetRequest() { - return uno::Reference < task::XInteractionRequest > (pImp); + return mxImpl; } class InteractionRequest_Impl : public ::cppu::WeakImplHelper< css::task::XInteractionRequest > -- cgit