diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-05-29 21:24:33 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-03 06:15:41 +0000 |
commit | 25d46298c0a84b351d06fa78d48f2019cb845d4d (patch) | |
tree | af3c7b57b4b1e103d149fcf5b8e8d164936d341c | |
parent | 1ac1b375ee3e6359d1519ac94f3ad9e69009859c (diff) |
tdf#89329: use unique_ptr for pImpl in interaction
Change-Id: I21ad7278f7978e7eebf6962fdf1fac2d3cb2bddb
Reviewed-on: https://gerrit.libreoffice.org/25637
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | framework/source/fwe/dispatch/interaction.cxx | 12 | ||||
-rw-r--r-- | include/framework/interaction.hxx | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx index 6fc5c69086f2..cf4f27c8b21c 100644 --- a/framework/source/fwe/dispatch/interaction.cxx +++ b/framework/source/fwe/dispatch/interaction.cxx @@ -156,14 +156,14 @@ css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > } RequestFilterSelect::RequestFilterSelect( const OUString& sURL ) + : pImpl( new RequestFilterSelect_Impl( sURL )) { - pImp = new RequestFilterSelect_Impl( sURL ); - pImp->acquire(); + pImpl->acquire(); } RequestFilterSelect::~RequestFilterSelect() { - pImp->release(); + pImpl->release(); } // return abort state of interaction @@ -171,7 +171,7 @@ RequestFilterSelect::~RequestFilterSelect() bool RequestFilterSelect::isAbort() const { - return pImp->isAbort(); + return pImpl->isAbort(); } // return user selected filter @@ -179,12 +179,12 @@ bool RequestFilterSelect::isAbort() const OUString RequestFilterSelect::getFilter() const { - return pImp->getFilter(); + return pImpl->getFilter(); } uno::Reference < task::XInteractionRequest > RequestFilterSelect::GetRequest() { - return uno::Reference < task::XInteractionRequest > (pImp); + return uno::Reference < task::XInteractionRequest > (pImpl.get()); } class InteractionRequest_Impl : public ::cppu::WeakImplHelper< css::task::XInteractionRequest > diff --git a/include/framework/interaction.hxx b/include/framework/interaction.hxx index a57b3edc0e28..f7793d3939ac 100644 --- a/include/framework/interaction.hxx +++ b/include/framework/interaction.hxx @@ -34,6 +34,7 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <framework/fwedllapi.h> +#include <memory> namespace framework{ @@ -60,7 +61,7 @@ namespace framework{ class RequestFilterSelect_Impl; class FWE_DLLPUBLIC RequestFilterSelect { - RequestFilterSelect_Impl* pImp; + std::unique_ptr<RequestFilterSelect_Impl> pImpl; public: RequestFilterSelect( const OUString& sURL ); |