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 | |
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')
-rw-r--r-- | extensions/source/activex/SOActionsApproval.cxx | 9 | ||||
-rw-r--r-- | extensions/source/activex/SOComWindowPeer.cxx | 9 | ||||
-rw-r--r-- | extensions/source/activex/StdAfx2.h | 10 | ||||
-rw-r--r-- | extensions/source/config/ldap/ldapaccess.hxx | 49 | ||||
-rw-r--r-- | extensions/source/dbpilots/dbptypes.hxx | 10 | ||||
-rw-r--r-- | extensions/source/macosx/spotlight/OOoSpotlightImporter.h | 7 | ||||
-rw-r--r-- | extensions/source/ole/oledll.cxx | 6 | ||||
-rw-r--r-- | extensions/source/propctrlr/modulepcr.cxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/modulepcr.hxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/pcrcommontypes.hxx | 8 | ||||
-rw-r--r-- | extensions/source/update/check/download.hxx | 12 |
11 files changed, 57 insertions, 70 deletions
diff --git a/extensions/source/activex/SOActionsApproval.cxx b/extensions/source/activex/SOActionsApproval.cxx index dec824dcebfa..a4092166272b 100644 --- a/extensions/source/activex/SOActionsApproval.cxx +++ b/extensions/source/activex/SOActionsApproval.cxx @@ -39,17 +39,16 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP SOActionsApproval::InterfaceSupportsErrorInfo(REFIID riid) { - static const IID* arr[] = - { + static const IID* arr[] = { &IID_ISOActionsApproval, }; - for (std::size_t i=0;i<SAL_N_ELEMENTS(arr);i++) + for (std::size_t i = 0; i < SAL_N_ELEMENTS(arr); i++) { #ifdef _MSC_VER - if (InlineIsEqualGUID(*arr[i],riid)) + if (InlineIsEqualGUID(*arr[i], riid)) #else - if (::ATL::InlineIsEqualGUID(*arr[i],riid)) + if (::ATL::InlineIsEqualGUID(*arr[i], riid)) #endif return S_OK; } diff --git a/extensions/source/activex/SOComWindowPeer.cxx b/extensions/source/activex/SOComWindowPeer.cxx index 92303cd12f25..0a556466d32f 100644 --- a/extensions/source/activex/SOComWindowPeer.cxx +++ b/extensions/source/activex/SOComWindowPeer.cxx @@ -38,17 +38,16 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid) { - static const IID* arr[] = - { + static const IID* arr[] = { &IID_ISOComWindowPeer, }; - for (std::size_t i=0;i<SAL_N_ELEMENTS(arr);i++) + for (std::size_t i = 0; i < SAL_N_ELEMENTS(arr); i++) { #ifdef _MSC_VER - if (InlineIsEqualGUID(*arr[i],riid)) + if (InlineIsEqualGUID(*arr[i], riid)) #else - if (::ATL::InlineIsEqualGUID(*arr[i],riid)) + if (::ATL::InlineIsEqualGUID(*arr[i], riid)) #endif return S_OK; } diff --git a/extensions/source/activex/StdAfx2.h b/extensions/source/activex/StdAfx2.h index 4d8deddf604d..01665c2001e3 100644 --- a/extensions/source/activex/StdAfx2.h +++ b/extensions/source/activex/StdAfx2.h @@ -28,9 +28,9 @@ #define _ATL_APARTMENT_THREADED #define _ATL_STATIC_REGISTRY -#pragma warning (push) -#pragma warning (disable:4189) - // local variable is initialized but not referenced - in atlctl.h +#pragma warning(push) +// local variable is initialized but not referenced - in atlctl.h +#pragma warning(disable : 4189) #if defined __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wall" @@ -49,7 +49,7 @@ #pragma clang diagnostic ignored "-Wtypename-missing" #endif -#define min(a, b) (((a) < (b)) ? (a) : (b)) +#define min(a, b) (((a) < (b)) ? (a) : (b)) #include <atlbase.h> //You may derive a class from CComModule and use it if you want to override @@ -61,7 +61,7 @@ extern CComModule _Module; #if defined __clang__ #pragma clang diagnostic pop #endif -#pragma warning (pop) +#pragma warning(pop) //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 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_ diff --git a/extensions/source/dbpilots/dbptypes.hxx b/extensions/source/dbpilots/dbptypes.hxx index 976e4f24d0d9..6832b5160a17 100644 --- a/extensions/source/dbpilots/dbptypes.hxx +++ b/extensions/source/dbpilots/dbptypes.hxx @@ -27,16 +27,12 @@ #include <map> #include <set> - namespace dbp { +typedef std::set<OUString> StringBag; +typedef std::map<sal_uInt32, OUString> MapInt2String; - - typedef std::set<OUString> StringBag; - typedef std::map<sal_uInt32, OUString> MapInt2String; - - -} // namespace dbp +} // namespace dbp #endif // INCLUDED_EXTENSIONS_SOURCE_DBPILOTS_DBPTYPES_HXX diff --git a/extensions/source/macosx/spotlight/OOoSpotlightImporter.h b/extensions/source/macosx/spotlight/OOoSpotlightImporter.h index c00007832de5..947f8dbf1656 100644 --- a/extensions/source/macosx/spotlight/OOoSpotlightImporter.h +++ b/extensions/source/macosx/spotlight/OOoSpotlightImporter.h @@ -19,10 +19,13 @@ #import <Cocoa/Cocoa.h> -@interface OOoSpotlightImporter : NSObject { +@interface OOoSpotlightImporter : NSObject +{ } -- (BOOL)importDocument:(NSString*)pathToFile contentType:(NSString*)contentTypeUTI attributes:(NSMutableDictionary*)attributes; +- (BOOL)importDocument:(NSString*)pathToFile + contentType:(NSString*)contentTypeUTI + attributes:(NSMutableDictionary*)attributes; - (NSFileHandle*)openZipFileAtPath:(NSString*)pathToFile; diff --git a/extensions/source/ole/oledll.cxx b/extensions/source/ole/oledll.cxx index fb6b673a9dba..1275f4dc60c5 100644 --- a/extensions/source/ole/oledll.cxx +++ b/extensions/source/ole/oledll.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #define STRICT #define _WIN32_DCOM @@ -54,8 +53,7 @@ END_OBJECT_MAP() // DLL Entry Point -extern "C" -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { if (dwReason == DLL_PROCESS_ATTACH) { @@ -66,7 +64,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { _Module.Term(); } - return TRUE; // ok + return TRUE; // ok } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/propctrlr/modulepcr.cxx b/extensions/source/propctrlr/modulepcr.cxx index fdaf3b2a6348..74d4b5daff7c 100644 --- a/extensions/source/propctrlr/modulepcr.cxx +++ b/extensions/source/propctrlr/modulepcr.cxx @@ -23,10 +23,7 @@ namespace pcr { - OUString PcrRes(const char* pId) - { - return Translate::get(pId, Translate::Create("pcr")); - } +OUString PcrRes(const char* pId) { return Translate::get(pId, Translate::Create("pcr")); } } // namespace pcr diff --git a/extensions/source/propctrlr/modulepcr.hxx b/extensions/source/propctrlr/modulepcr.hxx index ee44cc6bbad3..ba23a795cb2c 100644 --- a/extensions/source/propctrlr/modulepcr.hxx +++ b/extensions/source/propctrlr/modulepcr.hxx @@ -24,7 +24,7 @@ namespace pcr { - OUString PcrRes(const char* pId); +OUString PcrRes(const char* pId); } // namespace pcr #endif // _ INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_MODULEPCR_HXX_ diff --git a/extensions/source/propctrlr/pcrcommontypes.hxx b/extensions/source/propctrlr/pcrcommontypes.hxx index 0fe62c6330c5..aebb3d47f420 100644 --- a/extensions/source/propctrlr/pcrcommontypes.hxx +++ b/extensions/source/propctrlr/pcrcommontypes.hxx @@ -25,18 +25,12 @@ #include <unordered_map> - namespace pcr { - - - typedef std::unordered_map< OUString, css::beans::Property > - PropertyMap; - +typedef std::unordered_map<OUString, css::beans::Property> PropertyMap; } // namespace pcr - #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_PCRCOMMONTYPES_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/update/check/download.hxx b/extensions/source/update/check/download.hxx index c21671ef44db..9762a567fc5c 100644 --- a/extensions/source/update/check/download.hxx +++ b/extensions/source/update/check/download.hxx @@ -50,12 +50,13 @@ protected: virtual ~DownloadInteractionHandler() override {} }; - class Download { public: - Download(const css::uno::Reference< css::uno::XComponentContext >& xContext, - const rtl::Reference< DownloadInteractionHandler >& rHandler) : m_xContext(xContext), m_aHandler(rHandler) {}; + Download(const css::uno::Reference<css::uno::XComponentContext>& xContext, + const rtl::Reference<DownloadInteractionHandler>& rHandler) + : m_xContext(xContext) + , m_aHandler(rHandler){}; // returns true when the content of rURL was successfully written to rLocalFile bool start(const OUString& rURL, const OUString& rFile, const OUString& rDestinationDir); @@ -64,14 +65,13 @@ public: void stop(); protected: - // Determines the appropriate proxy settings for the given URL. Returns true if a proxy should be used void getProxyForURL(const OUString& rURL, OString& rHost, sal_Int32& rPort) const; private: osl::Condition m_aCondition; - const css::uno::Reference< css::uno::XComponentContext >& m_xContext; - const rtl::Reference< DownloadInteractionHandler > m_aHandler; + const css::uno::Reference<css::uno::XComponentContext>& m_xContext; + const rtl::Reference<DownloadInteractionHandler> m_aHandler; }; #endif // INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_DOWNLOAD_HXX |