onlineupdate/inc/bspatch.h                                            |   10 -
 onlineupdate/source/service/servicebase.hxx                           |    5 
 onlineupdate/source/service/workmonitor.hxx                           |    2 
 onlineupdate/source/update/common/errors.h                            |    2 
 onlineupdate/source/update/common/win_dirent.h                        |    4 
 onlineupdate/source/update/updater/progressui.h                       |    4 
 onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx |   69 
+++-------
 solenv/clang-format/excludelist                                       |    7 -
 8 files changed, 37 insertions(+), 66 deletions(-)

New commits:
commit de80fdc2060abe5b171bcef72944dd7b914ccd33
Author:     Philipp Hofer <philipp.ho...@protonmail.com>
AuthorDate: Thu Nov 12 13:08:26 2020 +0100
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Thu Nov 19 19:21:39 2020 +0100

    tdf#123936 Formatting files in module onlineupdate with clang-format
    
    Change-Id: I17aba4fbf7c2e914e64c62e9370695e20d7c14d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105693
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/onlineupdate/inc/bspatch.h b/onlineupdate/inc/bspatch.h
index ff1a8072964f..e9326262c243 100644
--- a/onlineupdate/inc/bspatch.h
+++ b/onlineupdate/inc/bspatch.h
@@ -69,7 +69,7 @@ typedef struct MBSPatchHeader_
  * @param fd Must have been opened for reading, and be at the beginning
  *           of the file.
  */
-int MBS_ReadHeader(FILE* file, MBSPatchHeader *header);
+int MBS_ReadHeader(FILE* file, MBSPatchHeader* header);
 
 /**
  * Apply a patch. This method does not validate the checksum of the original
@@ -82,14 +82,14 @@ int MBS_ReadHeader(FILE* file, MBSPatchHeader *header);
  *                to header->dlen if it is an existing file. The offset
  *                should be at the beginning of the file.
  */
-int MBS_ApplyPatch(const MBSPatchHeader *header, FILE* patchFile,
-                   unsigned char *fbuffer, FILE* file);
+int MBS_ApplyPatch(const MBSPatchHeader* header, FILE* patchFile, unsigned 
char* fbuffer,
+                   FILE* file);
 
 typedef struct MBSPatchTriple_
 {
     uint32_t x; /* add x bytes from oldfile to x bytes from the diff block */
     uint32_t y; /* copy y bytes from the extra block */
-    int32_t  z; /* seek forwards in oldfile by z bytes */
+    int32_t z; /* seek forwards in oldfile by z bytes */
 } MBSPatchTriple;
 
-#endif  // bspatch_h__
+#endif // bspatch_h__
diff --git a/onlineupdate/source/service/servicebase.hxx 
b/onlineupdate/source/service/servicebase.hxx
index c47f966ad551..45375fbe5d32 100644
--- a/onlineupdate/source/service/servicebase.hxx
+++ b/onlineupdate/source/service/servicebase.hxx
@@ -6,7 +6,7 @@
 #include "updatelogging.h"
 
 BOOL PathAppendSafe(LPWSTR base, LPCWSTR extra);
-BOOL VerifySameFiles(LPCWSTR file1Path, LPCWSTR file2Path, BOOL &sameContent);
+BOOL VerifySameFiles(LPCWSTR file1Path, LPCWSTR file2Path, BOOL& sameContent);
 
 // 32KiB for comparing files at a time seems reasonable.
 // The bigger the better for speed, but this will be used
@@ -17,6 +17,5 @@ BOOL VerifySameFiles(LPCWSTR file1Path, LPCWSTR file2Path, 
BOOL &sameContent);
 // Mozilla application as an updater.  Before the maintenance service will
 // execute the updater it must have this updater identity string in its string
 // table.  No other signed Mozilla product will have this string table value.
-#define UPDATER_IDENTITY_STRING \
-  "libreoffice-updater.exe-7bab28a0-0599-4f37-9efe-f7f8b71f05e3"
+#define UPDATER_IDENTITY_STRING 
"libreoffice-updater.exe-7bab28a0-0599-4f37-9efe-f7f8b71f05e3"
 #define IDS_UPDATER_IDENTITY 1006
diff --git a/onlineupdate/source/service/workmonitor.hxx 
b/onlineupdate/source/service/workmonitor.hxx
index ac4cd679bf8d..8fc2e51a7ded 100644
--- a/onlineupdate/source/service/workmonitor.hxx
+++ b/onlineupdate/source/service/workmonitor.hxx
@@ -2,4 +2,4 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-BOOL ExecuteServiceCommand(int argc, LPWSTR *argv);
+BOOL ExecuteServiceCommand(int argc, LPWSTR* argv);
diff --git a/onlineupdate/source/update/common/errors.h 
b/onlineupdate/source/update/common/errors.h
index 95bdcdfa73e5..2216b54491ee 100644
--- a/onlineupdate/source/update/common/errors.h
+++ b/onlineupdate/source/update/common/errors.h
@@ -93,4 +93,4 @@
 #define FALLBACKKEY_SERVICE_NO_STOP_ERROR 103
 #define FALLBACKKEY_LAUNCH_ERROR 104
 
-#endif  // Errors_h__
+#endif // Errors_h__
diff --git a/onlineupdate/source/update/common/win_dirent.h 
b/onlineupdate/source/update/common/win_dirent.h
index ee2ab6c67bd5..fff13f9e0c9f 100644
--- a/onlineupdate/source/update/common/win_dirent.h
+++ b/onlineupdate/source/update/common/win_dirent.h
@@ -27,5 +27,5 @@ DIR* opendir(const WCHAR* path);
 int closedir(DIR* dir);
 dirent* readdir(DIR* dir);
 
-#endif  // WNT
-#endif  // WINDIRENT_H__
+#endif // WNT
+#endif // WINDIRENT_H__
diff --git a/onlineupdate/source/update/updater/progressui.h 
b/onlineupdate/source/update/updater/progressui.h
index cb1468d3949c..a3e4913fc32f 100644
--- a/onlineupdate/source/update/updater/progressui.h
+++ b/onlineupdate/source/update/updater/progressui.h
@@ -17,7 +17,7 @@
 #endif
 
 // Called to perform any initialization of the widget toolkit
-int InitProgressUI(int *argc, NS_tchar ***argv);
+int InitProgressUI(int* argc, NS_tchar*** argv);
 
 #if defined(_WIN32)
 // Called on the main thread at startup
@@ -33,4 +33,4 @@ void QuitProgressUI();
 // May be called from any thread: progress is a number between 0 and 100
 void UpdateProgressUI(float progress);
 
-#endif  // PROGRESSUI_H__
+#endif // PROGRESSUI_H__
diff --git 
a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx 
b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx
index def164d3808e..17ee57ec400f 100644
--- a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx
+++ b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx
@@ -16,38 +16,32 @@
 
 #ifdef _WIN32
 // from Mozilla's nsAlgorithm.h
-template <class T>
-inline const T&
-XPCOM_MIN(const T& aA, const T& aB)
-{
-    return aB < aA ? aB : aA;
-}
+template <class T> inline const T& XPCOM_MIN(const T& aA, const T& aB) { 
return aB < aA ? aB : aA; }
 #endif
 
 struct VersionPart
 {
-    int32_t     numA;
+    int32_t numA;
 
-    const char* strB;    // NOT null-terminated, can be a null pointer
-    uint32_t    strBlen;
+    const char* strB; // NOT null-terminated, can be a null pointer
+    uint32_t strBlen;
 
-    int32_t     numC;
+    int32_t numC;
 
-    char*       extraD;  // null-terminated
+    char* extraD; // null-terminated
 };
 
 #ifdef _WIN32
 struct VersionPartW
 {
-    int32_t     numA;
-
-    wchar_t*    strB;    // NOT null-terminated, can be a null pointer
-    uint32_t    strBlen;
+    int32_t numA;
 
-    int32_t     numC;
+    wchar_t* strB; // NOT null-terminated, can be a null pointer
+    uint32_t strBlen;
 
-    wchar_t*    extraD;  // null-terminated
+    int32_t numC;
 
+    wchar_t* extraD; // null-terminated
 };
 #endif
 
@@ -56,8 +50,7 @@ struct VersionPartW
  *
  * @returns A pointer to the next versionpart, or null if none.
  */
-static char*
-ParseVP(char* aPart, VersionPart& aResult)
+static char* ParseVP(char* aPart, VersionPart& aResult)
 {
     char* dot;
 
@@ -136,17 +129,14 @@ ParseVP(char* aPart, VersionPart& aResult)
     return dot;
 }
 
-
 /**
  * Parse a version part into a number and "extra text".
  *
  * @returns A pointer to the next versionpart, or null if none.
  */
 #ifdef _WIN32
-static wchar_t*
-ParseVP(wchar_t* aPart, VersionPartW& aResult)
+static wchar_t* ParseVP(wchar_t* aPart, VersionPartW& aResult)
 {
-
     wchar_t* dot;
 
     aResult.numA = 0;
@@ -226,8 +216,7 @@ ParseVP(wchar_t* aPart, VersionPartW& aResult)
 #endif
 
 // compare two null-terminated strings, which may be null pointers
-static int32_t
-ns_strcmp(const char* aStr1, const char* aStr2)
+static int32_t ns_strcmp(const char* aStr1, const char* aStr2)
 {
     // any string is *before* no string
     if (!aStr1)
@@ -244,9 +233,7 @@ ns_strcmp(const char* aStr1, const char* aStr2)
 }
 
 // compare two length-specified string, which may be null pointers
-static int32_t
-ns_strnncmp(const char* aStr1, uint32_t aLen1,
-            const char* aStr2, uint32_t aLen2)
+static int32_t ns_strnncmp(const char* aStr1, uint32_t aLen1, const char* 
aStr2, uint32_t aLen2)
 {
     // any string is *before* no string
     if (!aStr1)
@@ -281,8 +268,7 @@ ns_strnncmp(const char* aStr1, uint32_t aLen1,
 }
 
 // compare two int32_t
-static int32_t
-ns_cmp(int32_t aNum1, int32_t aNum2)
+static int32_t ns_cmp(int32_t aNum1, int32_t aNum2)
 {
     if (aNum1 < aNum2)
     {
@@ -295,8 +281,7 @@ ns_cmp(int32_t aNum1, int32_t aNum2)
 /**
  * Compares two VersionParts
  */
-static int32_t
-CompareVP(VersionPart& aVer1, VersionPart& aVer2)
+static int32_t CompareVP(VersionPart& aVer1, VersionPart& aVer2)
 {
     int32_t r = ns_cmp(aVer1.numA, aVer2.numA);
     if (r)
@@ -323,8 +308,7 @@ CompareVP(VersionPart& aVer1, VersionPart& aVer2)
  * Compares two VersionParts
  */
 #ifdef _WIN32
-static int32_t
-CompareVP(VersionPartW& aVer1, VersionPartW& aVer2)
+static int32_t CompareVP(VersionPartW& aVer1, VersionPartW& aVer2)
 {
     int32_t r = ns_cmp(aVer1.numA, aVer2.numA);
     if (r)
@@ -358,11 +342,10 @@ CompareVP(VersionPartW& aVer1, VersionPartW& aVer2)
 }
 #endif
 
-namespace mozilla {
-
+namespace mozilla
+{
 #ifdef _WIN32
-int32_t
-CompareVersions(const wchar_t* aStrA, const wchar_t* aStrB)
+int32_t CompareVersions(const wchar_t* aStrA, const wchar_t* aStrB)
 {
     wchar_t* A2 = wcsdup(aStrA);
     if (!A2)
@@ -394,8 +377,7 @@ CompareVersions(const wchar_t* aStrA, const wchar_t* aStrB)
             break;
         }
 
-    }
-    while (a || b);
+    } while (a || b);
 
     free(A2);
     free(B2);
@@ -404,8 +386,7 @@ CompareVersions(const wchar_t* aStrA, const wchar_t* aStrB)
 }
 #endif
 
-int32_t
-CompareVersions(const char* aStrA, const char* aStrB)
+int32_t CompareVersions(const char* aStrA, const char* aStrB)
 {
     char* A2 = strdup(aStrA);
     if (!A2)
@@ -437,8 +418,7 @@ CompareVersions(const char* aStrA, const char* aStrB)
             break;
         }
 
-    }
-    while (a || b);
+    } while (a || b);
 
     free(A2);
     free(B2);
@@ -447,4 +427,3 @@ CompareVersions(const char* aStrA, const char* aStrB)
 }
 
 } // namespace mozilla
-
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 09ed9297e0b9..9f63700bca26 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -7554,7 +7554,6 @@ odk/source/unoapploader/win/unoapploader.c
 odk/source/unowinreg/win/unowinreg.cxx
 officecfg/qa/cppheader.cxx
 onlineupdate/inc/Char16.h
-onlineupdate/inc/bspatch.h
 onlineupdate/source/libmar/sign/mar_sign.c
 onlineupdate/source/libmar/sign/nss_secutil.c
 onlineupdate/source/libmar/sign/nss_secutil.h
@@ -7575,13 +7574,10 @@ onlineupdate/source/service/registrycertificates.cxx
 onlineupdate/source/service/registrycertificates.hxx
 onlineupdate/source/service/resource.hxx
 onlineupdate/source/service/servicebase.cxx
-onlineupdate/source/service/servicebase.hxx
 onlineupdate/source/service/serviceinstall.cxx
 onlineupdate/source/service/serviceinstall.hxx
 onlineupdate/source/service/windowsHelper.hxx
 onlineupdate/source/service/workmonitor.cxx
-onlineupdate/source/service/workmonitor.hxx
-onlineupdate/source/update/common/errors.h
 onlineupdate/source/update/common/pathhash.cxx
 onlineupdate/source/update/common/pathhash.h
 onlineupdate/source/update/common/readstrings.cxx
@@ -7593,13 +7589,11 @@ onlineupdate/source/update/common/updatehelper.cxx
 onlineupdate/source/update/common/updatehelper.h
 onlineupdate/source/update/common/updatelogging.cxx
 onlineupdate/source/update/common/updatelogging.h
-onlineupdate/source/update/common/win_dirent.h
 onlineupdate/source/update/updater/archivereader.cxx
 onlineupdate/source/update/updater/archivereader.h
 onlineupdate/source/update/updater/bspatch.cxx
 onlineupdate/source/update/updater/loaddlls.cxx
 onlineupdate/source/update/updater/progressui-unused/progressui_gonk.cxx
-onlineupdate/source/update/updater/progressui.h
 onlineupdate/source/update/updater/progressui_gtk.cxx
 onlineupdate/source/update/updater/progressui_gtk_icon.h
 onlineupdate/source/update/updater/progressui_null.cxx
@@ -7607,7 +7601,6 @@ onlineupdate/source/update/updater/progressui_win.cxx
 onlineupdate/source/update/updater/resource.h
 onlineupdate/source/update/updater/updater.cxx
 onlineupdate/source/update/updater/win_dirent.cxx
-onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx
 onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h
 oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
 oox/inc/drawingml/chart/axiscontext.hxx
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to