summaryrefslogtreecommitdiff
path: root/ucbhelper/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-29 10:21:30 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-31 21:28:26 +0100
commit51b75b2eae36272289230bd63b546d527c18df19 (patch)
treead00cf37ef385ba5660223e04fc579a37bafeccd /ucbhelper/source
parent82047d042e9d5d24b334eba63fd7e4c5bbbb022e (diff)
Prepare for removal of non-const operator[] from Sequence in ucbhelper
Change-Id: I06b04e3eed46aba8aac528b2c394d60e733533a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124405 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'ucbhelper/source')
-rw-r--r--ucbhelper/source/client/proxydecider.cxx4
-rw-r--r--ucbhelper/source/provider/authenticationfallback.cxx7
-rw-r--r--ucbhelper/source/provider/cancelcommandexecution.cxx7
-rw-r--r--ucbhelper/source/provider/simpleauthenticationrequest.cxx21
-rw-r--r--ucbhelper/source/provider/simplecertificatevalidationrequest.cxx7
-rw-r--r--ucbhelper/source/provider/simpleioerrorrequest.cxx6
-rw-r--r--ucbhelper/source/provider/simplenameclashresolverequest.cxx9
7 files changed, 14 insertions, 47 deletions
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 7a363a0962f7..211711b556d1 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -301,9 +301,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
uno::Reference< lang::XMultiServiceFactory > xConfigProv =
configuration::theDefaultProvider::get( rxContext );
- uno::Sequence< uno::Any > aArguments( 1 );
- aArguments[ 0 ] <<= OUString( CONFIG_ROOT_KEY );
-
+ uno::Sequence< uno::Any > aArguments{ uno::Any(OUString( CONFIG_ROOT_KEY )) };
uno::Reference< uno::XInterface > xInterface(
xConfigProv->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess",
diff --git a/ucbhelper/source/provider/authenticationfallback.cxx b/ucbhelper/source/provider/authenticationfallback.cxx
index eee4b04b39e7..70fd0ecbf6b5 100644
--- a/ucbhelper/source/provider/authenticationfallback.cxx
+++ b/ucbhelper/source/provider/authenticationfallback.cxx
@@ -25,12 +25,7 @@ AuthenticationFallbackRequest::AuthenticationFallbackRequest(
setRequest( uno::makeAny( aRequest ) );
m_xAuthFallback = new InteractionAuthFallback( this );
- uno::Sequence<
- uno::Reference< task::XInteractionContinuation > > aContinuations( 2 );
- aContinuations[ 0 ] = new InteractionAbort( this );
- aContinuations[ 1 ] = m_xAuthFallback.get( );
-
- setContinuations( aContinuations );
+ setContinuations({ new InteractionAbort(this), m_xAuthFallback });
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 8aac85c240aa..89245ca78492 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -51,12 +51,7 @@ void cancelCommandExecution( const uno::Any & rException,
rtl::Reference< ucbhelper::InteractionRequest > xRequest
= new ucbhelper::InteractionRequest( rException );
- uno::Sequence< uno::Reference< task::XInteractionContinuation > >
- aContinuations( 1 );
- aContinuations[ 0 ]
- = new ucbhelper::InteractionAbort( xRequest.get() );
-
- xRequest->setContinuations( aContinuations );
+ xRequest->setContinuations({ new ucbhelper::InteractionAbort(xRequest.get()) });
xIH->handle( xRequest );
diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
index 96608c784c9b..c6eee708bbd3 100644
--- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx
+++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
@@ -112,21 +112,19 @@ void SimpleAuthenticationRequest::initialize(
setRequest( uno::makeAny( rRequest ) );
// Fill continuations...
- unsigned int nSize = 1;
- unsigned int nPos = 0;
+ unsigned int nSize = 2;
if( bAllowSessionStoring )
nSize++;
- nSize++;
-
uno::Sequence< ucb::RememberAuthentication > aRememberModes( nSize );
- aRememberModes[ nPos++ ] = ucb::RememberAuthentication_NO;
+ auto it = aRememberModes.getArray();
+ *it++ = ucb::RememberAuthentication_NO;
if( bAllowSessionStoring )
- aRememberModes[ nPos++ ] = ucb::RememberAuthentication_SESSION;
+ *it++ = ucb::RememberAuthentication_SESSION;
- aRememberModes[ nPos++ ] = ucb::RememberAuthentication_PERSISTENT;
+ *it = ucb::RememberAuthentication_PERSISTENT;
m_xAuthSupplier
= new InteractionSupplyAuthentication(
@@ -142,13 +140,8 @@ void SimpleAuthenticationRequest::initialize(
bAllowUseSystemCredentials // bCanUseSystemCredentials,
);
- uno::Sequence<
- uno::Reference< task::XInteractionContinuation > > aContinuations( 3 );
- aContinuations[ 0 ] = new InteractionAbort( this );
- aContinuations[ 1 ] = new InteractionRetry( this );
- aContinuations[ 2 ] = m_xAuthSupplier.get();
-
- setContinuations( aContinuations );
+ setContinuations(
+ { new InteractionAbort(this), new InteractionRetry(this), m_xAuthSupplier });
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx b/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
index 6b9e7a3d1d0c..af39fdf03f16 100644
--- a/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
+++ b/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
@@ -36,12 +36,7 @@ SimpleCertificateValidationRequest::SimpleCertificateValidationRequest( sal_Int3
setRequest( uno::makeAny( aRequest ) );
- uno::Sequence< uno::Reference< task::XInteractionContinuation > > aContinuations( 2 );
- aContinuations[ 0 ] = new InteractionAbort( this );
- aContinuations[ 1 ] = new InteractionApprove( this );
-
- setContinuations( aContinuations );
- certificate.get();
+ setContinuations({ new InteractionAbort(this), new InteractionApprove(this) });
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/provider/simpleioerrorrequest.cxx b/ucbhelper/source/provider/simpleioerrorrequest.cxx
index 492c736a60ff..7a18c6474295 100644
--- a/ucbhelper/source/provider/simpleioerrorrequest.cxx
+++ b/ucbhelper/source/provider/simpleioerrorrequest.cxx
@@ -42,11 +42,7 @@ SimpleIOErrorRequest::SimpleIOErrorRequest(
setRequest( uno::makeAny( aRequest ) );
// Fill continuations...
- uno::Sequence< uno::Reference<
- task::XInteractionContinuation > > aContinuations( 1 );
- aContinuations[ 0 ] = new InteractionAbort( this );
-
- setContinuations( aContinuations );
+ setContinuations({ new InteractionAbort(this) });
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/provider/simplenameclashresolverequest.cxx b/ucbhelper/source/provider/simplenameclashresolverequest.cxx
index 51517f93dd51..e5118d536033 100644
--- a/ucbhelper/source/provider/simplenameclashresolverequest.cxx
+++ b/ucbhelper/source/provider/simplenameclashresolverequest.cxx
@@ -143,13 +143,8 @@ SimpleNameClashResolveRequest::SimpleNameClashResolveRequest(
// Fill continuations...
m_xNameSupplier = new InteractionSupplyName( this );
- uno::Sequence< uno::Reference< task::XInteractionContinuation > >
- aContinuations( 3 );
- aContinuations[ 0 ] = new InteractionAbort( this );
- aContinuations[ 1 ] = m_xNameSupplier.get();
- aContinuations[ 2 ] = new InteractionReplaceExistingData( this );
-
- setContinuations( aContinuations );
+ setContinuations({ new InteractionAbort(this), m_xNameSupplier,
+ new InteractionReplaceExistingData(this) });
}
OUString const & SimpleNameClashResolveRequest::getNewName() const