[Libreoffice-commits] core.git: include/ucbhelper svl/source ucbhelper/source ucb/source

Noel Grandin noel at peralex.com
Wed Mar 16 10:46:29 UTC 2016


 include/ucbhelper/contenthelper.hxx                         |   10 +------
 include/ucbhelper/interactionrequest.hxx                    |   12 +++------
 include/ucbhelper/resultsetmetadata.hxx                     |    7 +----
 include/ucbhelper/simpleauthenticationrequest.hxx           |   11 --------
 include/ucbhelper/simplenameclashresolverequest.hxx         |    6 ----
 svl/source/passwordcontainer/passwordcontainer.cxx          |    3 --
 ucb/source/core/ucbcmds.cxx                                 |    3 --
 ucb/source/ucp/cmis/auth_provider.cxx                       |    2 -
 ucb/source/ucp/hierarchy/hierarchycontent.cxx               |    3 --
 ucb/source/ucp/package/pkgcontent.cxx                       |    3 --
 ucb/source/ucp/tdoc/tdoc_content.cxx                        |    6 +---
 ucbhelper/source/provider/contenthelper.cxx                 |   10 +++----
 ucbhelper/source/provider/resultsetmetadata.cxx             |    5 +--
 ucbhelper/source/provider/simpleauthenticationrequest.cxx   |   16 +++---------
 ucbhelper/source/provider/simplenameclashresolverequest.cxx |    9 ++----
 15 files changed, 31 insertions(+), 75 deletions(-)

New commits:
commit 3d264450989cecdc59a2e64f46a0328432ba0d08
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Mar 16 11:43:56 2016 +0200

    loplugin:constantfunction in ucbhelper
    
    Change-Id: I80e00b5ac2621378801f89532ed88b377ef72b60
    Reviewed-on: https://gerrit.libreoffice.org/23297
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/ucbhelper/contenthelper.hxx b/include/ucbhelper/contenthelper.hxx
index d05f552..f558507 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 03122c1..08df5d7 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 9ac6996..079a320 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 3a14090..892d70e 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 da9b761..8c63126 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 20e9866..456efd4 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 2565548..ca6c0d0 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 3adefe8..64cb84e 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 6d6a9a4..e73cdcf 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 f821140..e90152f 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 37a58f1..08895cf 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 b66c668..70418ef 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 7920009..7ac87be 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 ad6c9cd..e8cdb9c 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 5f29c2e..a9712a3 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 );
 }


More information about the Libreoffice-commits mailing list