[Libreoffice-commits] online.git: 2 commits - common/Util.hpp kit/Kit.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 17 09:37:08 UTC 2018


 common/Util.hpp |    2 +-
 kit/Kit.cpp     |   22 ++++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 9afe021b86ab8f01a77bfced987f265c7c43ca2d
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Oct 17 12:35:21 2018 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Oct 17 12:35:34 2018 +0300

    Move the non-namespaced anonymizeUrl() to build for MOBILEAPP, too
    
    Also, initialise the AnonymizeFilenames and AnonymizeUsernames
    variables to false in the MOBILEAPP case.

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 4caff9078..5ea4ad563 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -2247,7 +2247,9 @@ void lokit_main(
     std::shared_ptr<lok::Office> loKit;
     Path jailPath;
     bool bRunInsideJail = !noCapabilities;
-
+#else
+    AnonymizeFilenames = false;
+    AnonymizeUsernames = false;
 #endif // MOBILEAPP
 
     try
@@ -2524,6 +2526,15 @@ void lokit_main(
 }
 #endif
 
+std::string anonymizeUrl(const std::string& url)
+{
+#ifndef BUILDING_TESTS
+    return AnonymizeFilenames ? Util::anonymizeUrl(url) : url;
+#else
+    return url;
+#endif
+}
+
 #ifndef MOBILEAPP
 
 /// Initializes LibreOfficeKit for cross-fork re-use.
@@ -2596,15 +2607,6 @@ bool globalPreinit(const std::string &loTemplate)
     return true;
 }
 
-std::string anonymizeUrl(const std::string& url)
-{
-#ifndef BUILDING_TESTS
-    return AnonymizeFilenames ? Util::anonymizeUrl(url) : url;
-#else
-    return url;
-#endif
-}
-
 /// Anonymize usernames.
 std::string anonymizeUsername(const std::string& username)
 {
commit 5f01fbdf817b10d769d342cee56a91386c496858
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Oct 17 12:34:49 2018 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Oct 17 12:34:49 2018 +0300

    The iOS memrchr() replacement should of course be marked inline

diff --git a/common/Util.hpp b/common/Util.hpp
index 190fc6edf..07af2a6a4 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -334,7 +334,7 @@ namespace Util
 
 #ifdef IOS
 
-    void *memrchr(const void *s, int c, size_t n)
+    inline void *memrchr(const void *s, int c, size_t n)
     {
         char *p = (char*)s + n - 1;
         while (p >= (char*)s)


More information about the Libreoffice-commits mailing list