summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-23 13:53:42 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-24 06:54:06 +0000
commit111de438ea3e512a541281dc0716cc728ea8d152 (patch)
tree2c9ca866e79ed0cfc9299e553a87239345c515a6 /framework
parentd3f21849ec8580fdb59a1f0b35453657f4050e0f (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/Library_fwi.mk1
-rw-r--r--framework/source/fwe/dispatch/interaction.cxx10
2 files changed, 5 insertions, 6 deletions
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 >