[Libreoffice-commits] online.git: kit/Kit.cpp

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 21 15:07:51 UTC 2020


 kit/Kit.cpp |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit c187f414c5bf76bbd6bf511ce8a62263e86abc46
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Tue Jan 21 13:36:14 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Jan 21 16:07:31 2020 +0100

    kit: show the correct documentLoad URL when a template is used.
    
    Change-Id: Ib9b3ac3e166dfbece8c7212fc239d517ce1c0bba
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87140
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 78eea14eb..34d5b86a5 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -54,6 +54,7 @@
 
 #include "ChildSession.hpp"
 #include <Common.hpp>
+#include <FileUtil.hpp>
 #include <IoUtil.hpp>
 #include "KitHelper.hpp"
 #include "Kit.hpp"
@@ -1636,13 +1637,14 @@ private:
             _jailedUrl = uri;
             _isDocPasswordProtected = false;
 
-            LOG_DBG("Calling lokit::documentLoad(" << uriAnonym << ", \"" << options << "\").");
+            const char *pURL = docTemplate.empty() ? uri.c_str() : docTemplate.c_str();
+            LOG_DBG("Calling lokit::documentLoad(" << FileUtil::anonymizeUrl(pURL) << ", \"" << options << "\").");
             const auto start = std::chrono::system_clock::now();
-            _loKitDocument.reset(_loKit->documentLoad(docTemplate.empty() ? uri.c_str() : docTemplate.c_str(), options.c_str()));
+            _loKitDocument.reset(_loKit->documentLoad(pURL, options.c_str()));
             const auto duration = std::chrono::system_clock::now() - start;
             const auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(duration).count();
             const double totalTime = elapsed/1000.;
-            LOG_DBG("Returned lokit::documentLoad(" << uriAnonym << ") in " << totalTime << "ms.");
+            LOG_DBG("Returned lokit::documentLoad(" << FileUtil::anonymizeUrl(pURL) << ") in " << totalTime << "ms.");
 #ifdef IOS
             // The iOS app (and the Android one) has max one document open at a time, so we can keep
             // a pointer to it in a global.


More information about the Libreoffice-commits mailing list