summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appuno.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-01 16:22:29 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-06 07:01:34 +0000
commit0323253a7c67316cb96e4a64792ab4fe74aac1ca (patch)
tree81787c4ae44ff778aa41e12574cd60a624c9277b /sfx2/source/appl/appuno.cxx
parent4d666f5092d7c4f2ece9702dda4d874e44cdc6f7 (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: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f Reviewed-on: https://gerrit.libreoffice.org/25806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/appl/appuno.cxx')
-rw-r--r--sfx2/source/appl/appuno.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 6e7158a9d4c6..ea74addbe48c 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1751,24 +1751,22 @@ uno::Sequence< uno::Reference< task::XInteractionContinuation > >
}
RequestPackageReparation::RequestPackageReparation( const OUString& aName )
+ : mxImpl(new RequestPackageReparation_Impl( aName ))
{
- pImp = new RequestPackageReparation_Impl( aName );
- pImp->acquire();
}
RequestPackageReparation::~RequestPackageReparation()
{
- pImp->release();
}
bool RequestPackageReparation::isApproved()
{
- return pImp->isApproved();
+ return mxImpl->isApproved();
}
css::uno::Reference < task::XInteractionRequest > RequestPackageReparation::GetRequest()
{
- return css::uno::Reference < task::XInteractionRequest >(pImp);
+ return mxImpl.get();
}
@@ -1810,19 +1808,17 @@ uno::Sequence< uno::Reference< task::XInteractionContinuation > >
}
NotifyBrokenPackage::NotifyBrokenPackage( const OUString& aName )
+ : mxImpl(new NotifyBrokenPackage_Impl( aName ))
{
- pImp = new NotifyBrokenPackage_Impl( aName );
- pImp->acquire();
}
NotifyBrokenPackage::~NotifyBrokenPackage()
{
- pImp->release();
}
css::uno::Reference < task::XInteractionRequest > NotifyBrokenPackage::GetRequest()
{
- return css::uno::Reference < task::XInteractionRequest >(pImp);
+ return mxImpl.get();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */