From 3d264450989cecdc59a2e64f46a0328432ba0d08 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 Mar 2016 11:43:56 +0200 Subject: loplugin:constantfunction in ucbhelper Change-Id: I80e00b5ac2621378801f89532ed88b377ef72b60 Reviewed-on: https://gerrit.libreoffice.org/23297 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- ucbhelper/source/provider/contenthelper.cxx | 10 ++++------ ucbhelper/source/provider/resultsetmetadata.cxx | 5 ++--- .../source/provider/simpleauthenticationrequest.cxx | 16 +++++----------- .../source/provider/simplenameclashresolverequest.cxx | 9 +++------ 4 files changed, 14 insertions(+), 26 deletions(-) (limited to 'ucbhelper') diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx index b66c6687012c..70418ef878f8 100644 --- a/ucbhelper/source/provider/contenthelper.cxx +++ b/ucbhelper/source/provider/contenthelper.cxx @@ -657,20 +657,18 @@ ContentImplHelper::getAdditionalPropertySet( bool bCreate ) bool ContentImplHelper::renameAdditionalPropertySet( const OUString& rOldKey, - const OUString& rNewKey, - bool bRecursive ) + const OUString& rNewKey ) { return m_xProvider->renameAdditionalPropertySet( - rOldKey, rNewKey, bRecursive ); + rOldKey, rNewKey, true/*bRecursive*/ ); } bool ContentImplHelper::copyAdditionalPropertySet( const OUString& rSourceKey, - const OUString& rTargetKey, - bool bRecursive ) + const OUString& rTargetKey ) { return m_xProvider->copyAdditionalPropertySet( - rSourceKey, rTargetKey, bRecursive ); + rSourceKey, rTargetKey, true/*bRecursive*/ ); } bool ContentImplHelper::removeAdditionalPropertySet() diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx index 792000905b2d..7ac87be02fc1 100644 --- a/ucbhelper/source/provider/resultsetmetadata.cxx +++ b/ucbhelper/source/provider/resultsetmetadata.cxx @@ -80,12 +80,11 @@ namespace ucbhelper { ResultSetMetaData::ResultSetMetaData( const Reference< XComponentContext >& rxContext, - const Sequence< Property >& rProps, - bool bReadOnly ) + const Sequence< Property >& rProps ) : m_pImpl( new ResultSetMetaData_Impl( rProps.getLength() ) ), m_xContext( rxContext ), m_aProps( rProps ), - m_bReadOnly( bReadOnly ) + m_bReadOnly( true ) { } diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx b/ucbhelper/source/provider/simpleauthenticationrequest.cxx index ad6c9cd8a8c4..e8cdb9cc5c62 100644 --- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx +++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx @@ -32,7 +32,6 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest( const OUString & rUserName, const OUString & rPassword, const OUString & rAccount, - bool bAllowPersistentStoring, bool bAllowUseSystemCredentials, bool bAllowSessionStoring ) { @@ -61,7 +60,7 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest( true, true, aRequest.HasAccount, - bAllowPersistentStoring, + true/*bAllowPersistentStoring*/, bAllowUseSystemCredentials, bAllowSessionStoring ); } @@ -75,9 +74,7 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest( EntityType eUserNameType, const OUString & rUserName, EntityType ePasswordType, - const OUString & rPassword, - EntityType eAccountType, - const OUString & rAccount ) + const OUString & rPassword) { // Fill request... ucb::URLAuthenticationRequest aRequest; @@ -95,16 +92,14 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest( aRequest.HasPassword = ePasswordType != ENTITY_NA; if ( aRequest.HasPassword ) aRequest.Password = rPassword; - aRequest.HasAccount = eAccountType != ENTITY_NA; - if ( aRequest.HasAccount ) - aRequest.Account = rAccount; + aRequest.HasAccount = false; aRequest.URL = rURL; initialize(aRequest, eRealmType == ENTITY_MODIFY, eUserNameType == ENTITY_MODIFY, ePasswordType == ENTITY_MODIFY, - eAccountType == ENTITY_MODIFY, + false, true, false ); } @@ -152,8 +147,7 @@ void SimpleAuthenticationRequest::initialize( ucb::RememberAuthentication_SESSION, // eDefaultRememberPasswordMode aRememberModes, // rRememberAccountModes ucb::RememberAuthentication_SESSION, // eDefaultRememberAccountMode - bAllowUseSystemCredentials, // bCanUseSystemCredentials, - false // bDefaultUseSystemCredentials + bAllowUseSystemCredentials // bCanUseSystemCredentials, ); uno::Sequence< diff --git a/ucbhelper/source/provider/simplenameclashresolverequest.cxx b/ucbhelper/source/provider/simplenameclashresolverequest.cxx index 5f29c2e51fa7..a9712a3425ae 100644 --- a/ucbhelper/source/provider/simplenameclashresolverequest.cxx +++ b/ucbhelper/source/provider/simplenameclashresolverequest.cxx @@ -146,8 +146,7 @@ SimpleNameClashResolveRequest::~SimpleNameClashResolveRequest() {} SimpleNameClashResolveRequest::SimpleNameClashResolveRequest( const OUString & rTargetFolderURL, const OUString & rClashingName, - const OUString & rProposedNewName, - bool bSupportsOverwriteData ) + const OUString & rProposedNewName ) { // Fill request... ucb::NameClashResolveRequest aRequest; @@ -164,12 +163,10 @@ SimpleNameClashResolveRequest::SimpleNameClashResolveRequest( m_xNameSupplier = new InteractionSupplyName( this ); uno::Sequence< uno::Reference< task::XInteractionContinuation > > - aContinuations( bSupportsOverwriteData ? 3 : 2 ); + aContinuations( 3 ); aContinuations[ 0 ] = new InteractionAbort( this ); aContinuations[ 1 ] = m_xNameSupplier.get(); - - if ( bSupportsOverwriteData ) - aContinuations[ 2 ] = new InteractionReplaceExistingData( this ); + aContinuations[ 2 ] = new InteractionReplaceExistingData( this ); setContinuations( aContinuations ); } -- cgit