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>
This commit is contained in:
Mike Kaganski 2021-10-29 10:21:30 +03:00
parent 82047d042e
commit 51b75b2eae
7 changed files with 14 additions and 47 deletions

View file

@ -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",

View file

@ -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: */

View file

@ -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 );

View file

@ -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: */

View file

@ -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: */

View file

@ -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: */

View file

@ -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