diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-19 14:33:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-20 10:21:07 +0100 |
commit | 7d7d4cf217e82db8839dbc49dcab1ab72c203b4e (patch) | |
tree | 02bf7659d9bb3fce41a54407ea890313ad9d6a30 /sw/source/filter/ww8 | |
parent | 6aecd49aa6de7c7f65c3c240ee3b7db36497df4d (diff) |
loplugin:refcounting in sw
Change-Id: I56f2f5aa4d9105e93f28701b8352d1fb97829ead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111215
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 10430ebdefc1..f872e84f2629 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5593,13 +5593,12 @@ namespace uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler() ); if( xHandler.is() ) { - ::comphelper::DocPasswordRequest* pRequest = new ::comphelper::DocPasswordRequest( + rtl::Reference<::comphelper::DocPasswordRequest> pRequest = new ::comphelper::DocPasswordRequest( ::comphelper::DocPasswordRequestType::MS, task::PasswordRequestMode_PASSWORD_ENTER, INetURLObject(rMedium.GetOrigURL()) .GetLastName(INetURLObject::DecodeMechanism::WithCharset)); - uno::Reference< task::XInteractionRequest > xRequest( pRequest ); - xHandler->handle( xRequest ); + xHandler->handle( pRequest ); if( pRequest->isPassword() ) aPassw = pRequest->getPassword(); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 7c67e6702d3a..88b952099e6a 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2372,11 +2372,11 @@ bool CanUseRemoteLink(const OUString &rGrfName) task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), nullptr)); uno::Reference< ucb::XProgressHandler > xProgress; - ::ucbhelper::CommandEnvironment* pCommandEnv = + rtl::Reference<::ucbhelper::CommandEnvironment> pCommandEnv = new ::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( xIH ), xProgress); ::ucbhelper::Content aCnt(rGrfName, - static_cast< ucb::XCommandEnvironment* >(pCommandEnv), + static_cast< ucb::XCommandEnvironment* >(pCommandEnv.get()), comphelper::getProcessComponentContext()); if ( !INetURLObject( rGrfName ).isAnyKnownWebDAVScheme() ) |