diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-16 11:43:56 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-16 10:46:03 +0000 |
commit | 3d264450989cecdc59a2e64f46a0328432ba0d08 (patch) | |
tree | 6900674c4034a2f689950d551398390d0e801b17 | |
parent | 125c845f406fca336baea89614a5017f909bab40 (diff) |
loplugin:constantfunction in ucbhelper
Change-Id: I80e00b5ac2621378801f89532ed88b377ef72b60
Reviewed-on: https://gerrit.libreoffice.org/23297
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | include/ucbhelper/contenthelper.hxx | 10 | ||||
-rw-r--r-- | include/ucbhelper/interactionrequest.hxx | 12 | ||||
-rw-r--r-- | include/ucbhelper/resultsetmetadata.hxx | 7 | ||||
-rw-r--r-- | include/ucbhelper/simpleauthenticationrequest.hxx | 11 | ||||
-rw-r--r-- | include/ucbhelper/simplenameclashresolverequest.hxx | 6 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 3 | ||||
-rw-r--r-- | ucb/source/core/ucbcmds.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/auth_provider.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.cxx | 6 | ||||
-rw-r--r-- | ucbhelper/source/provider/contenthelper.cxx | 10 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultsetmetadata.cxx | 5 | ||||
-rw-r--r-- | ucbhelper/source/provider/simpleauthenticationrequest.cxx | 16 | ||||
-rw-r--r-- | ucbhelper/source/provider/simplenameclashresolverequest.cxx | 9 |
15 files changed, 31 insertions, 75 deletions
diff --git a/include/ucbhelper/contenthelper.hxx b/include/ucbhelper/contenthelper.hxx index d05f552b23b6..f558507e2d45 100644 --- a/include/ucbhelper/contenthelper.hxx +++ b/include/ucbhelper/contenthelper.hxx @@ -255,13 +255,10 @@ protected: * * @param rOldKey is the old key of the propertyset. * @param rNewKey is the new key for the propertyset. - * @param bRecursive is a flag indicating whether propertysets for - * children described by rOldKey shall be renamed too. * @return True, if the operation succeeded - False, otherwise. */ bool renameAdditionalPropertySet( const OUString& rOldKey, - const OUString& rNewKey, - bool bRecursive ); + const OUString& rNewKey ); /** * This method copies the propertyset containing the Additional Core @@ -269,13 +266,10 @@ protected: * * @param rSourceKey is the key of the source propertyset. * @param rTargetKey is the key of the target propertyset. - * @param bRecursive is a flag indicating whether propertysets for - * children described by rSourceKey shall be copied too. * @return True, if the operation succeeded - False, otherwise. */ bool copyAdditionalPropertySet( const OUString& rSourceKey, - const OUString& rTargetKey, - bool bRecursive ); + const OUString& rTargetKey ); /** * This method removes the propertyset containing the Additional Core diff --git a/include/ucbhelper/interactionrequest.hxx b/include/ucbhelper/interactionrequest.hxx index 03122c18742f..08df5d700b85 100644 --- a/include/ucbhelper/interactionrequest.hxx +++ b/include/ucbhelper/interactionrequest.hxx @@ -399,8 +399,6 @@ public: * @param bCanUseSystemCredentials indicates whether issuer of the * authentication request can obtain and use system credentials * for authentication. - * @param bDefaultUseSystemCredentials specifies the default system - * credentials usage preferred by the requesting client * * @see css::ucb::AuthenticationRequest * @see css::ucb::RememberAuthentication @@ -415,8 +413,7 @@ public: const css::ucb::RememberAuthentication eDefaultRememberPasswordMode, const css::uno::Sequence< css::ucb::RememberAuthentication > & rRememberAccountModes, const css::ucb::RememberAuthentication eDefaultRememberAccountMode, - bool bCanUseSystemCredentials, - bool bDefaultUseSystemCredentials ); + bool bCanUseSystemCredentials ); // XInterface virtual css::uno::Any SAL_CALL @@ -568,8 +565,7 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication( const css::ucb::RememberAuthentication eDefaultRememberPasswordMode, const css::uno::Sequence< css::ucb::RememberAuthentication > & rRememberAccountModes, const css::ucb::RememberAuthentication eDefaultRememberAccountMode, - bool bCanUseSystemCredentials, - bool bDefaultUseSystemCredentials ) + bool bCanUseSystemCredentials ) : InteractionContinuation( pRequest ), m_aRememberPasswordModes( rRememberPasswordModes ), m_aRememberAccountModes( rRememberAccountModes ), @@ -582,8 +578,8 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication( m_bCanSetPassword( bCanSetPassword ), m_bCanSetAccount( bCanSetAccount ), m_bCanUseSystemCredentials( bCanUseSystemCredentials ), - m_bDefaultUseSystemCredentials( bDefaultUseSystemCredentials ), - m_bUseSystemCredentials( bDefaultUseSystemCredentials && bCanUseSystemCredentials ) + m_bDefaultUseSystemCredentials( false ), + m_bUseSystemCredentials( false ) { } diff --git a/include/ucbhelper/resultsetmetadata.hxx b/include/ucbhelper/resultsetmetadata.hxx index 9ac6996f4a97..079a3204dae0 100644 --- a/include/ucbhelper/resultsetmetadata.hxx +++ b/include/ucbhelper/resultsetmetadata.hxx @@ -150,18 +150,15 @@ protected: public: /** - * Constructor. + * Constructor. ResultSet is readonly by default. * * @param rxSMgr is a Servive Manager. * @param rProps is a sequence of properties (partially) describing the * columns of a resultset. - * @param bReadOnly is used to specify whether the whole(!) resultset - * is read-only. */ ResultSetMetaData( const css::uno::Reference< css::uno::XComponentContext >& rxContext, - const css::uno::Sequence< css::beans::Property >& rProps, - bool bReadOnly = true ); + const css::uno::Sequence< css::beans::Property >& rProps ); /** * Constructor. diff --git a/include/ucbhelper/simpleauthenticationrequest.hxx b/include/ucbhelper/simpleauthenticationrequest.hxx index 3a14090206ec..892d70ecf696 100644 --- a/include/ucbhelper/simpleauthenticationrequest.hxx +++ b/include/ucbhelper/simpleauthenticationrequest.hxx @@ -86,8 +86,6 @@ public: * @param rPassword contains a password, if available (for instance from * a previous try). * @param rAccount contains an account, if applicable. - * @param bAllowPersistentStoring specifies if the credentials should - * be stored in the password container persistently * @param bAllowUseSystemCredentials specifies if requesting client is * able to obtain and use system credentials for authentication */ @@ -97,7 +95,6 @@ public: const OUString & rUserName, const OUString & rPassword, const OUString & rAccount, - bool bAllowPersistentStoring, bool bAllowUseSystemCredentials, bool bAllowSessionStoring = true ); @@ -117,9 +114,6 @@ public: modifiable. * @param rPassword contains a password, if available (for instance from * a previous try). - * @param eAccountType specifies whether an account is applicable and - modifiable. - * @param rAccount contains an account, if applicable. */ SimpleAuthenticationRequest( const OUString & rURL, const OUString & rServerName, @@ -128,10 +122,7 @@ public: EntityType eUserNameType, const OUString & rUserName, EntityType ePasswordType, - const OUString & rPassword, - EntityType eAccountType = ENTITY_NA, - const OUString & rAccount - = OUString() ); + const OUString & rPassword ); /** * This method returns the supplier for the missing authentication data, diff --git a/include/ucbhelper/simplenameclashresolverequest.hxx b/include/ucbhelper/simplenameclashresolverequest.hxx index da9b761f5129..8c63126337ed 100644 --- a/include/ucbhelper/simplenameclashresolverequest.hxx +++ b/include/ucbhelper/simplenameclashresolverequest.hxx @@ -54,14 +54,10 @@ public: * @param rClashingName contains the clashing name. * @param rProposedNewName contains a proposal for the new name or is * empty. - * @param bSupportsOverwriteData indicates whether an - * InteractionReplaceExistingData continuation shall be supplied - * with the interaction request. */ SimpleNameClashResolveRequest( const OUString & rTargetFolderURL, const OUString & rClashingName, - const OUString & rProposedNewName, - bool bSupportsOverwriteData = true ); + const OUString & rProposedNewName ); /** * This method returns the new name that was supplied by the interaction * handler. diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 20e986665529..456efd42f8d8 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -1402,8 +1402,7 @@ MasterPasswordRequest_Impl::MasterPasswordRequest_Impl( PasswordRequestMode Mode RememberAuthentication_NO, // eDefaultRememberPasswordMode aRememberModes, // rRememberAccountModes RememberAuthentication_NO, // eDefaultRememberAccountMode - false, // bCanUseSystemCredentials - false // bDefaultUseSystemCredentials + false // bCanUseSystemCredentials ); Sequence< diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 2565548fdefd..ca6c0d07ee0f 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -392,8 +392,7 @@ NameClashContinuation interactiveNameClashResolve( new ucbhelper::SimpleNameClashResolveRequest( rTargetURL, // target folder URL rClashingName, // clashing name - OUString(), // no proposal for new name - true /* bSupportsOverwriteData */ ) ); + OUString() ) ); // no proposal for new name rException = xRequest->getRequest(); if ( xEnv.is() ) diff --git a/ucb/source/ucp/cmis/auth_provider.cxx b/ucb/source/ucp/cmis/auth_provider.cxx index 3adefe88473b..64cb84ecd6ca 100644 --- a/ucb/source/ucp/cmis/auth_provider.cxx +++ b/ucb/source/ucp/cmis/auth_provider.cxx @@ -38,7 +38,7 @@ namespace cmis m_sUrl, m_sBindingUrl, OUString(), STD_TO_OUSTR( username ), STD_TO_OUSTR( password ), - OUString(), true, false, false ); + OUString(), false, false ); xIH->handle( xRequest.get() ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 6d6a9a4d063e..e73cdcf99aeb 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -1297,8 +1297,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( // Adapt Additional Core Properties. renameAdditionalPropertySet( xOldId->getContentIdentifier(), - xNewId->getContentIdentifier(), - true ); + xNewId->getContentIdentifier() ); } else { diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index f821140ca3e7..e90152f5de8d 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -1359,8 +1359,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Adapt Additional Core Properties. renameAdditionalPropertySet( xOldId->getContentIdentifier(), - xNewId->getContentIdentifier(), - true ); + xNewId->getContentIdentifier() ); } else { diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 37a58f1a29b3..08895cfae8ca 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -1321,8 +1321,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Adapt Additional Core Properties. renameAdditionalPropertySet( xOldId->getContentIdentifier(), - xNewId->getContentIdentifier(), - true ); + xNewId->getContentIdentifier() ); } else { @@ -2080,8 +2079,7 @@ void Content::transfer( else aTargetUri += aSourceUri.getName(); - if ( !copyAdditionalPropertySet( - aSourceUri.getUri(), aTargetUri, true ) ) + if ( !copyAdditionalPropertySet( aSourceUri.getUri(), aTargetUri ) ) { uno::Any aProps = uno::makeAny( 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 ); } |