From 4d9e9f2125867adde3558b9866d08f7bafb4386b Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 12 Nov 2020 12:58:22 +0100 Subject: tdf#123936 Formatting files in module fpicker with clang-format Change-Id: Ieeaf63081023a7b1ea31b2a276c31ac3114b5657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105673 Tested-by: Jenkins Reviewed-by: Christian Lohmaier --- fpicker/inc/fpsofficeResMgr.hxx | 5 +---- fpicker/source/aqua/CFStringUtilities.hxx | 5 +++-- fpicker/source/aqua/NSString_OOoAdditions.hxx | 4 ++-- fpicker/source/aqua/SalAquaPicker.hxx | 26 ++++++++++---------------- fpicker/source/office/QueryFolderName.hxx | 6 +++--- fpicker/source/office/autocmpledit.hxx | 13 ++++++++----- fpicker/source/office/breadcrumb.hxx | 14 +++++++------- fpicker/source/win32/WinImplHelper.hxx | 7 +++---- fpicker/source/win32/resourceprovider.hxx | 3 +-- fpicker/source/win32/shared.hxx | 6 +++--- solenv/clang-format/excludelist | 10 ---------- 11 files changed, 41 insertions(+), 58 deletions(-) diff --git a/fpicker/inc/fpsofficeResMgr.hxx b/fpicker/inc/fpsofficeResMgr.hxx index 11c8d9f50728..195af8337c01 100644 --- a/fpicker/inc/fpsofficeResMgr.hxx +++ b/fpicker/inc/fpsofficeResMgr.hxx @@ -11,10 +11,7 @@ #include -inline OUString FpsResId(const char* pId) -{ - return Translate::get(pId, Translate::Create("fps")); -}; +inline OUString FpsResId(const char* pId) { return Translate::get(pId, Translate::Create("fps")); }; #endif diff --git a/fpicker/source/aqua/CFStringUtilities.hxx b/fpicker/source/aqua/CFStringUtilities.hxx index 784487d79448..ca8a84348525 100644 --- a/fpicker/source/aqua/CFStringUtilities.hxx +++ b/fpicker/source/aqua/CFStringUtilities.hxx @@ -27,14 +27,15 @@ #include #include -enum InfoType { +enum InfoType +{ FULLPATH, FILENAME, PATHWITHOUTLASTCOMPONENT }; OUString CFStringToOUString(const CFStringRef sOrig); -OUString FSRefToOUString(FSRef const & fsRef, InfoType info = FULLPATH); +OUString FSRefToOUString(FSRef const& fsRef, InfoType info = FULLPATH); OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info); CFStringRef CFStringCreateWithOUString(const OUString& aString); diff --git a/fpicker/source/aqua/NSString_OOoAdditions.hxx b/fpicker/source/aqua/NSString_OOoAdditions.hxx index 08bfbd47d356..cd33d959d739 100644 --- a/fpicker/source/aqua/NSString_OOoAdditions.hxx +++ b/fpicker/source/aqua/NSString_OOoAdditions.hxx @@ -27,8 +27,8 @@ //for Cocoa types @interface NSString (OOoAdditions) -+ (id) stringWithOUString:(const OUString&)ouString; -- (OUString) OUString; ++ (id)stringWithOUString:(const OUString&)ouString; +- (OUString)OUString; @end #endif // INCLUDED_FPICKER_SOURCE_AQUA_NSSTRING_OOOADDITIONS_HXX diff --git a/fpicker/source/aqua/SalAquaPicker.hxx b/fpicker/source/aqua/SalAquaPicker.hxx index 739297e3ea71..63f76a6055ad 100644 --- a/fpicker/source/aqua/SalAquaPicker.hxx +++ b/fpicker/source/aqua/SalAquaPicker.hxx @@ -33,9 +33,6 @@ #import #include - - - class SalAquaPicker { public: @@ -46,24 +43,22 @@ public: int run(); int runandwaitforresult(); - OUString const & getDisplayDirectory() { return m_sDisplayDirectory; } + OUString const& getDisplayDirectory() { return m_sDisplayDirectory; } - ControlHelper* getControlHelper() const { - return m_pControlHelper; - } + ControlHelper* getControlHelper() const { return m_pControlHelper; } protected: - OUString m_sDisplayDirectory; - NSSavePanel *m_pDialog; + NSSavePanel* m_pDialog; - ControlHelper *m_pControlHelper; + ControlHelper* m_pControlHelper; osl::Mutex m_rbHelperMtx; // The type of dialog - enum NavigationServices_DialogType { + enum NavigationServices_DialogType + { NAVIGATIONSERVICES_OPEN, NAVIGATIONSERVICES_SAVE, NAVIGATIONSERVICES_DIRECTORY @@ -72,17 +67,16 @@ protected: NavigationServices_DialogType m_nDialogType; /// @throws css::uno::RuntimeException - void implsetTitle( const OUString& aTitle ); + void implsetTitle(const OUString& aTitle); /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException - void implsetDisplayDirectory( const OUString& rDirectory ); + void implsetDisplayDirectory(const OUString& rDirectory); /// @throws css::uno::RuntimeException - OUString const & implgetDisplayDirectory( ); - - void implInitialize( ); + OUString const& implgetDisplayDirectory(); + void implInitialize(); }; #endif diff --git a/fpicker/source/office/QueryFolderName.hxx b/fpicker/source/office/QueryFolderName.hxx index 4172aa0f9ee0..2a9b80f989a1 100644 --- a/fpicker/source/office/QueryFolderName.hxx +++ b/fpicker/source/office/QueryFolderName.hxx @@ -27,12 +27,12 @@ private: std::unique_ptr m_xNameEdit; std::unique_ptr m_xOKBtn; - DECL_LINK( OKHdl, weld::Button&, void ); - DECL_LINK( NameHdl, weld::Entry&, void ); + DECL_LINK(OKHdl, weld::Button&, void); + DECL_LINK(NameHdl, weld::Entry&, void); public: QueryFolderNameDialog(weld::Window* _pParent, const OUString& rTitle, - const OUString& rDefaultText); + const OUString& rDefaultText); virtual ~QueryFolderNameDialog() override; OUString GetName() const { return m_xNameEdit->get_text(); } }; diff --git a/fpicker/source/office/autocmpledit.hxx b/fpicker/source/office/autocmpledit.hxx index fc1108e383c2..f29f4bb742b4 100644 --- a/fpicker/source/office/autocmpledit.hxx +++ b/fpicker/source/office/autocmpledit.hxx @@ -19,15 +19,15 @@ class AutocompleteEdit private: std::unique_ptr m_xEntry; - std::vector< OUString > m_aEntries; - std::vector< OUString > m_aMatching; + std::vector m_aEntries; + std::vector m_aMatching; Idle m_aChangedIdle; Link m_aChangeHdl; DECL_LINK(ChangedHdl, weld::Entry&, void); DECL_LINK(TryAutoComplete, Timer*, void); - bool Match( const OUString& rText ); + bool Match(const OUString& rText); public: AutocompleteEdit(std::unique_ptr xEntry); @@ -40,9 +40,12 @@ public: void select_region(int nStartPos, int nEndPos) { m_xEntry->select_region(nStartPos, nEndPos); } void connect_changed(const Link& rLink) { m_aChangeHdl = rLink; } - void connect_focus_in(const Link& rLink) { m_xEntry->connect_focus_in(rLink); } + void connect_focus_in(const Link& rLink) + { + m_xEntry->connect_focus_in(rLink); + } - void AddEntry( const OUString& rEntry ); + void AddEntry(const OUString& rEntry); void ClearEntries(); }; diff --git a/fpicker/source/office/breadcrumb.hxx b/fpicker/source/office/breadcrumb.hxx index 9fc66f9bcd7b..5a3f325168fe 100644 --- a/fpicker/source/office/breadcrumb.hxx +++ b/fpicker/source/office/breadcrumb.hxx @@ -46,10 +46,10 @@ private: SvtBreadcrumbMode m_eMode; - Link m_aClickHdl; + Link m_aClickHdl; void appendField(); - bool showField( unsigned int nIndex, unsigned int nWidthMax ); + bool showField(unsigned int nIndex, unsigned int nWidthMax); DECL_LINK(SizeAllocHdl, const Size&, void); DECL_LINK(ClickLinkHdl, weld::LinkButton&, bool); @@ -58,14 +58,14 @@ public: Breadcrumb(weld::Container* pParent); ~Breadcrumb(); - void EnableFields( bool bEnable ); + void EnableFields(bool bEnable); - void connect_clicked( const Link& rLink ); + void connect_clicked(const Link& rLink); const OUString& GetHdlURL() const; - void SetRootName( const OUString& rURL ); - void SetURL( const OUString& rURL ); - void SetMode( SvtBreadcrumbMode eMode ); + void SetRootName(const OUString& rURL); + void SetURL(const OUString& rURL); + void SetMode(SvtBreadcrumbMode eMode); }; #endif diff --git a/fpicker/source/win32/WinImplHelper.hxx b/fpicker/source/win32/WinImplHelper.hxx index acac133d3ae6..860572415ba1 100644 --- a/fpicker/source/win32/WinImplHelper.hxx +++ b/fpicker/source/win32/WinImplHelper.hxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #ifndef INCLUDED_FPICKER_SOURCE_WIN32_MISC_WINIMPLHELPER_HXX #define INCLUDED_FPICKER_SOURCE_WIN32_MISC_WINIMPLHELPER_HXX @@ -25,7 +24,7 @@ #include #if !defined WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN #endif #include @@ -38,7 +37,7 @@ // '~' -> '&' // '~~' -> '~' // '&' -> '&&' -OUString SOfficeToWindowsLabel( const OUString& aSOLabel ); +OUString SOfficeToWindowsLabel(const OUString& aSOLabel); // converts a windows label to a soffice label // the following rules for character replacements @@ -46,7 +45,7 @@ OUString SOfficeToWindowsLabel( const OUString& aSOLabel ); // '&' -> '~' // '&&' -> '&' // '~' -> '~~' -OUString WindowsToSOfficeLabel( const OUString& aWinLabel ); +OUString WindowsToSOfficeLabel(const OUString& aWinLabel); #endif diff --git a/fpicker/source/win32/resourceprovider.hxx b/fpicker/source/win32/resourceprovider.hxx index a611d1aaf195..722d172294b5 100644 --- a/fpicker/source/win32/resourceprovider.hxx +++ b/fpicker/source/win32/resourceprovider.hxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #ifndef INCLUDED_FPICKER_SOURCE_WIN32_MISC_RESOURCEPROVIDER_HXX #define INCLUDED_FPICKER_SOURCE_WIN32_MISC_RESOURCEPROVIDER_HXX @@ -31,7 +30,7 @@ namespace CResourceProvider { - OUString getResString(sal_Int16 aId); +OUString getResString(sal_Int16 aId); }; #endif diff --git a/fpicker/source/win32/shared.hxx b/fpicker/source/win32/shared.hxx index be8813f32c68..2e4427f6de9e 100644 --- a/fpicker/source/win32/shared.hxx +++ b/fpicker/source/win32/shared.hxx @@ -22,9 +22,9 @@ #include -const OUString BACKSLASH( "\\" ); -const OUString FILTER_SEPARATOR( "------------------------------------------" ); -const OUString ALL_FILES_WILDCARD( "*.*" ); +const OUString BACKSLASH("\\"); +const OUString FILTER_SEPARATOR("------------------------------------------"); +const OUString ALL_FILES_WILDCARD("*.*"); const bool ALLOW_DUPLICATES = true; #endif diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index e2c3a9d40244..28f484cfb5f9 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -4455,14 +4455,10 @@ formula/source/ui/dlg/parawin.cxx formula/source/ui/dlg/parawin.hxx formula/source/ui/dlg/structpg.cxx formula/source/ui/dlg/structpg.hxx -fpicker/inc/fpsofficeResMgr.hxx -fpicker/source/aqua/CFStringUtilities.hxx fpicker/source/aqua/ControlHelper.hxx fpicker/source/aqua/FilterHelper.hxx -fpicker/source/aqua/NSString_OOoAdditions.hxx fpicker/source/aqua/SalAquaFilePicker.hxx fpicker/source/aqua/SalAquaFolderPicker.hxx -fpicker/source/aqua/SalAquaPicker.hxx fpicker/source/aqua/resourceprovider.hxx fpicker/source/office/OfficeControlAccess.cxx fpicker/source/office/OfficeControlAccess.hxx @@ -4472,15 +4468,12 @@ fpicker/source/office/OfficeFolderPicker.cxx fpicker/source/office/OfficeFolderPicker.hxx fpicker/source/office/PlacesListBox.cxx fpicker/source/office/PlacesListBox.hxx -fpicker/source/office/QueryFolderName.hxx fpicker/source/office/RemoteFilesDialog.cxx fpicker/source/office/RemoteFilesDialog.hxx fpicker/source/office/asyncfilepicker.cxx fpicker/source/office/asyncfilepicker.hxx fpicker/source/office/autocmpledit.cxx -fpicker/source/office/autocmpledit.hxx fpicker/source/office/breadcrumb.cxx -fpicker/source/office/breadcrumb.hxx fpicker/source/office/commonpicker.cxx fpicker/source/office/commonpicker.hxx fpicker/source/office/contentenumeration.cxx @@ -4509,14 +4502,11 @@ fpicker/source/win32/VistaFilePickerEventHandler.hxx fpicker/source/win32/VistaFilePickerImpl.cxx fpicker/source/win32/VistaFilePickerImpl.hxx fpicker/source/win32/WinImplHelper.cxx -fpicker/source/win32/WinImplHelper.hxx fpicker/source/win32/asyncrequests.cxx fpicker/source/win32/asyncrequests.hxx fpicker/source/win32/comptr.hxx fpicker/source/win32/platform_vista.h fpicker/source/win32/resourceprovider.cxx -fpicker/source/win32/resourceprovider.hxx -fpicker/source/win32/shared.hxx fpicker/source/win32/vistatypes.h fpicker/source/win32/workbench/Test_fps.cxx framework/inc/acceleratorconst.h -- cgit