summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-21 20:02:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-23 07:30:05 +0100
commit9a61e9a3356874a23a697ace57a53e3ada505d87 (patch)
tree81e1ffd58ae9d3f965a0f1cb15a1d8d4ad726fcb /fpicker
parent873df086db969cadc66087a5abdb1ff33f2c99f1 (diff)
loplugin:refcounting in fpicker
Change-Id: Ia14d2a874d559c4438a33c8a46ec6076802cd637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx10
-rw-r--r--fpicker/source/office/iodlg.cxx5
2 files changed, 6 insertions, 9 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 30115abd93e8..1282d47115a3 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -683,11 +683,10 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, const OString&, rIdent, void
{
OUString sUserName = aURLEntries.UserList[0].UserName;
- ::comphelper::SimplePasswordRequest* pPasswordRequest
+ rtl::Reference<::comphelper::SimplePasswordRequest> pPasswordRequest
= new ::comphelper::SimplePasswordRequest;
- Reference< XInteractionRequest > rRequest( pPasswordRequest );
- xInteractionHandler->handle( rRequest );
+ xInteractionHandler->handle( pPasswordRequest );
if ( pPasswordRequest->isPassword() )
{
@@ -1180,10 +1179,9 @@ bool RemoteFilesDialog::ContentIsDocument( const OUString& rURL )
// It's a webdav URL, so use the same open sequence as in normal open process.
// Let's use a comphelper::StillReadWriteInteraction to trap errors here without showing the user.
// This sequence will result in an exception if the target URL resource is not present
- comphelper::StillReadWriteInteraction* pInteraction = new comphelper::StillReadWriteInteraction(xInteractionHandler,xInteractionHandler);
- css::uno::Reference< css::task::XInteractionHandler > xInteraction(static_cast< css::task::XInteractionHandler* >(pInteraction), css::uno::UNO_QUERY);
+ rtl::Reference<comphelper::StillReadWriteInteraction> pInteraction = new comphelper::StillReadWriteInteraction(xInteractionHandler,xInteractionHandler);
- Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( xInteraction, Reference< XProgressHandler >() );
+ Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( pInteraction, Reference< XProgressHandler >() );
::ucbhelper::Content aContent( rURL, xEnv, m_xContext );
aContent.openStream();
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index cbb354ecf585..fe199ae5a530 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1401,14 +1401,13 @@ void SvtFileDialog::displayIOException( const OUString& _rURL, IOErrorCode _eCod
aException.Classification = InteractionClassification_ERROR;
// let and interaction handler handle this exception
- ::comphelper::OInteractionRequest* pRequest = nullptr;
- Reference< css::task::XInteractionRequest > xRequest = pRequest =
+ rtl::Reference<::comphelper::OInteractionRequest> pRequest =
new ::comphelper::OInteractionRequest( makeAny( aException ) );
pRequest->addContinuation( new ::comphelper::OInteractionAbort( ) );
Reference< XInteractionHandler2 > xHandler(
InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr ) );
- xHandler->handle( xRequest );
+ xHandler->handle( pRequest );
}
catch( const Exception& )
{