diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 12:56:36 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-21 13:17:51 +0100 |
commit | d0b3815392d1fb253ed05218422a7f9b37c9df24 (patch) | |
tree | 3dbf28ba79e4d27ec030c2ef12acd39b2eb5914f /extensions/source/config/ldap | |
parent | 70e36068a43cb6747232441ee67e609c86362aa0 (diff) |
tdf#123936 Formatting files in module extensions with clang-format
Change-Id: I6e86641bc93bf4b3941b01fbef69c1e7984aad3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105667
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'extensions/source/config/ldap')
-rw-r--r-- | extensions/source/config/ldap/ldapaccess.hxx | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.hxx b/extensions/source/config/ldap/ldapaccess.hxx index 34ba5a04f625..274cdb88009d 100644 --- a/extensions/source/config/ldap/ldapaccess.hxx +++ b/extensions/source/config/ldap/ldapaccess.hxx @@ -26,7 +26,7 @@ #ifdef _WIN32 #if !defined WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN #endif #include <windows.h> #include <winldap.h> @@ -38,28 +38,27 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> -namespace extensions::config::ldap { - -namespace uno = css::uno ; -namespace lang = css::lang ; -namespace ldap = css::ldap ; +namespace extensions::config::ldap +{ +namespace uno = css::uno; +namespace lang = css::lang; +namespace ldap = css::ldap; struct LdapUserProfile; - /** Struct containing the information on LDAP connection */ struct LdapDefinition { /** LDAP server name */ - OUString mServer ; + OUString mServer; /** LDAP server port number */ - sal_Int32 mPort ; + sal_Int32 mPort; /** Repository base DN */ - OUString mBaseDN ; + OUString mBaseDN; /** DN to use for "anonymous" connection */ - OUString mAnonUser ; + OUString mAnonUser; /** Credentials to use for "anonymous" connection */ - OUString mAnonCredentials ; + OUString mAnonCredentials; /** User Entity Object Class */ OUString mUserObjectClass; /** User Entity Unique Attribute */ @@ -71,23 +70,27 @@ struct LdapDefinition } }; -typedef std::map< OUString, OUString > LdapData; // key/value pairs +typedef std::map<OUString, OUString> LdapData; // key/value pairs /** Class encapsulating all LDAP functionality */ class LdapConnection { friend struct LdapMessageHolder; -public: +public: /** Default constructor */ - LdapConnection() : mConnection(nullptr),mLdapDefinition() {} + LdapConnection() + : mConnection(nullptr) + , mLdapDefinition() + { + } /** Destructor, releases the connection */ - ~LdapConnection() ; + ~LdapConnection(); /** Make connection to LDAP server @throws ldap::LdapConnectionException @throws ldap::LdapGenericException */ - void connectSimple(const LdapDefinition& aDefinition); + void connectSimple(const LdapDefinition& aDefinition); /** Gets LdapUserProfile from LDAP repository for specified user @@ -98,7 +101,7 @@ public: @throws css::ldap::LdapGenericException if an LDAP error occurs. */ - void getUserProfile(const OUString& aUser, LdapData * data); + void getUserProfile(const OUString& aUser, LdapData* data); /** finds DN of user @return DN of User @@ -116,18 +119,16 @@ private: Indicates whether the connection is in a valid state. @return sal_True if connection is valid, sal_False otherwise */ - bool isValid() const { return mConnection != nullptr ; } + bool isValid() const { return mConnection != nullptr; } /// @throws ldap::LdapConnectionException /// @throws ldap::LdapGenericException - void connectSimple(); + void connectSimple(); /** LDAP connection object */ - LDAP* mConnection ; + LDAP* mConnection; LdapDefinition mLdapDefinition; -} ; - - +}; } #endif // EXTENSIONS_CONFIG_LDAP_LDAPUSERPROFILE_HXX_ |