[Libreoffice-commits] core.git: 2 commits - fpicker/inc fpicker/source helpcompiler/source solenv/clang-format

Philipp Hofer (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 13 14:19:39 UTC 2020


 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 +++---
 helpcompiler/source/HelpLinker_main.cxx       |   10 +++++-----
 helpcompiler/source/LuceneHelper.cxx          |    6 +++---
 helpcompiler/source/LuceneHelper.hxx          |    8 ++++----
 solenv/clang-format/excludelist               |   13 -------------
 14 files changed, 53 insertions(+), 73 deletions(-)

New commits:
commit 11aa7dc7a6009c02e681f41f7255902fe578ab7e
Author:     Philipp Hofer <philipp.hofer at protonmail.com>
AuthorDate: Thu Nov 12 12:59:08 2020 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Fri Nov 13 15:18:57 2020 +0100

    tdf#123936 Formatting files in module helpcompiler with clang-format
    
    Change-Id: Ibf7baa3de0a8cd7952044909c00c55e7c5b008a9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105675
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/helpcompiler/source/HelpLinker_main.cxx b/helpcompiler/source/HelpLinker_main.cxx
index 36826b49209c..5c8fe8807336 100644
--- a/helpcompiler/source/HelpLinker_main.cxx
+++ b/helpcompiler/source/HelpLinker_main.cxx
@@ -23,25 +23,25 @@
 #include <iostream>
 #include <memory>
 
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
+SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
+{
     std::vector<std::string> args;
     for (int i = 1; i < argc; ++i)
         args.push_back(std::string(argv[i]));
     try
     {
         std::unique_ptr<HelpLinker> pHelpLinker(new HelpLinker());
-        pHelpLinker->main( args );
+        pHelpLinker->main(args);
     }
-    catch( const HelpProcessingException& e )
+    catch (const HelpProcessingException& e)
     {
         std::cerr << e.m_aErrorMsg;
         exit(1);
     }
-    catch (const std::exception &e)
+    catch (const std::exception& e)
     {
         std::cerr << e.what();
         exit(1);
     }
     return 0;
 }
-
diff --git a/helpcompiler/source/LuceneHelper.cxx b/helpcompiler/source/LuceneHelper.cxx
index 7002162a7862..d6a2de2523e8 100644
--- a/helpcompiler/source/LuceneHelper.cxx
+++ b/helpcompiler/source/LuceneHelper.cxx
@@ -9,7 +9,7 @@
 
 #include "LuceneHelper.hxx"
 
-std::vector<TCHAR> OUStringToTCHARVec(OUString const &rStr)
+std::vector<TCHAR> OUStringToTCHARVec(OUString const& rStr)
 {
     //UTF-16
     if (sizeof(TCHAR) == sizeof(sal_Unicode))
@@ -17,7 +17,7 @@ std::vector<TCHAR> OUStringToTCHARVec(OUString const &rStr)
 
     //UTF-32
     std::vector<TCHAR> aRet;
-    for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength(); )
+    for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength();)
     {
         const sal_uInt32 nCode = rStr.iterateCodePoints(&nStrIndex);
         aRet.push_back(nCode);
@@ -26,7 +26,7 @@ std::vector<TCHAR> OUStringToTCHARVec(OUString const &rStr)
     return aRet;
 }
 
-OUString TCHARArrayToOUString(TCHAR const *str)
+OUString TCHARArrayToOUString(TCHAR const* str)
 {
     // UTF-16
     if (sizeof(TCHAR) == sizeof(sal_Unicode))
diff --git a/helpcompiler/source/LuceneHelper.hxx b/helpcompiler/source/LuceneHelper.hxx
index a84346e25faf..781f30bba416 100644
--- a/helpcompiler/source/LuceneHelper.hxx
+++ b/helpcompiler/source/LuceneHelper.hxx
@@ -11,20 +11,20 @@
 #define INCLUDED_HELPCOMPILER_SOURCE_LUCENEHELPER_HXX
 
 #if defined(__GNUC__)
-#  pragma GCC visibility push (default)
+#pragma GCC visibility push(default)
 #endif
 
 #include <CLucene.h>
 
 #if defined(__GNUC__)
-#  pragma GCC visibility pop
+#pragma GCC visibility pop
 #endif
 
 #include <rtl/ustring.hxx>
 #include <vector>
 
-std::vector<TCHAR> OUStringToTCHARVec(OUString const &rStr);
-OUString TCHARArrayToOUString(TCHAR const *str);
+std::vector<TCHAR> OUStringToTCHARVec(OUString const& rStr);
+OUString TCHARArrayToOUString(TCHAR const* str);
 
 #endif
 
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 28f484cfb5f9..b4bc8c6fa988 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -4809,10 +4809,7 @@ helpcompiler/source/HelpCompiler.cxx
 helpcompiler/source/HelpIndexer.cxx
 helpcompiler/source/HelpIndexer_main.cxx
 helpcompiler/source/HelpLinker.cxx
-helpcompiler/source/HelpLinker_main.cxx
 helpcompiler/source/HelpSearch.cxx
-helpcompiler/source/LuceneHelper.cxx
-helpcompiler/source/LuceneHelper.hxx
 hwpfilter/qa/cppunit/test_hwpfilter.cxx
 hwpfilter/source/attributes.cxx
 hwpfilter/source/attributes.hxx
commit 4d9e9f2125867adde3558b9866d08f7bafb4386b
Author:     Philipp Hofer <philipp.hofer at protonmail.com>
AuthorDate: Thu Nov 12 12:58:22 2020 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Fri Nov 13 15:18:38 2020 +0100

    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 <lohmaier+LibreOffice at googlemail.com>

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 <unotools/resmgr.hxx>
 
-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 <rtl/ustring.hxx>
 #include <sal/types.h>
 
-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 <Cocoa/Cocoa.h>
 #include <postmac.h>
 
-
-
-
 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<weld::Entry> m_xNameEdit;
     std::unique_ptr<weld::Button> 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<weld::Entry> m_xEntry;
 
-    std::vector< OUString > m_aEntries;
-    std::vector< OUString > m_aMatching;
+    std::vector<OUString> m_aEntries;
+    std::vector<OUString> m_aMatching;
     Idle m_aChangedIdle;
     Link<weld::Entry&, void> 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<weld::Entry> xEntry);
@@ -40,9 +40,12 @@ public:
     void select_region(int nStartPos, int nEndPos) { m_xEntry->select_region(nStartPos, nEndPos); }
 
     void connect_changed(const Link<weld::Entry&, void>& rLink) { m_aChangeHdl = rLink; }
-    void connect_focus_in(const Link<weld::Widget&, void>& rLink) { m_xEntry->connect_focus_in(rLink); }
+    void connect_focus_in(const Link<weld::Widget&, void>& 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<Breadcrumb*,bool> m_aClickHdl;
+    Link<Breadcrumb*, bool> 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<Breadcrumb*,bool>& rLink );
+    void connect_clicked(const Link<Breadcrumb*, bool>& 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 <rtl/ustring.hxx>
 
 #if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
 #endif
 #include <windows.h>
 
@@ -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 <rtl/ustring.hxx>
 
-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


More information about the Libreoffice-commits mailing list