loolwsd/LOOLKit.cpp   |    6 +++++-
 loolwsd/TileCache.cpp |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit e0ad73d2e438195e2a51866846109469caa1e908
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Jun 16 11:42:47 2016 +0200

    LOOLKit: fix loss of callback during initializeForRendering()
    
    Impress deletes the current view and creates a new one during that call,
    so make sure at the end our registered callback is not lost. With this,
    the order matches how it's done in gtktiledviewer.
    
    This fixes the HTTPWSTest::testInsertDelete() test when per-view
    callbacks are enabled.
    
    Also remove the assert from TileCacheTests::testTileInvalidateWriter()
    that would assume something is invalidated right after load: the hope is
    that it's possible to load a document without invalidating anything...
    :-)
    
    (cherry picked from commit 3c32bc172482f52783c985a10211f68137759cd0)

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 7cbd37a..f0e16d7 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1013,6 +1013,11 @@ private:
                 return nullptr;
             }
 
+            // initializeForRendering() should be called before
+            // registerCallback(), as the previous creates a new view in
+            // Impress.
+            _loKitDocument->pClass->initializeForRendering(_loKitDocument, 
(renderOpts.empty() ? nullptr : renderOpts.c_str()));
+
             if (_multiView)
             {
                 Log::info("Loading view to document from URI: [" + uri + "] 
for session [" + sessionId + "].");
@@ -1029,7 +1034,6 @@ private:
                 _loKitDocument->pClass->registerCallback(_loKitDocument, 
DocumentCallback, this);
             }
 
-            _loKitDocument->pClass->initializeForRendering(_loKitDocument, 
(renderOpts.empty() ? nullptr : renderOpts.c_str()));
         }
         else
         {
commit 6b5fbd7eede3bbb4aed3fcb529f0312775145cc9
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Sat Jul 9 23:59:25 2016 +0530

    loolwsd: Show only abbreviated message when reading from cache
    
    Change-Id: I6d5c8984010e2917b9069df6ee3b0a28c678b297
    (cherry picked from commit d18379adceec03d2ae44fc69cc9266b5fb1f875b)

diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 364ac1b..74bafc6 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -152,7 +152,7 @@ std::string TileCache::getTextFile(const std::string& 
fileName)
         buffer.pop_back();
 
     std::string result = std::string(buffer.data(), buffer.size());
-    Log::info("Read '" + result + "' from " + fullFileName);
+    Log::info("Read '" + LOOLProtocol::getAbbreviatedMessage(result.c_str(), 
result.size()) + "' from " + fullFileName);
 
     return result;
 }
commit d258c207b98ec6ab8cc33ffebc694198506677cb
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Fri Jul 1 20:29:19 2016 +0530

    loolwsd: Print abbreviated message while saving to TileCache
    
    Change-Id: I1f77062466e3672ce742b6a46e3c39b35ce70f31
    (cherry picked from commit 0b8e9dedafe6470ee10fa87a31da9a546511c44b)

diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 9243e57..364ac1b 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -169,7 +169,7 @@ void TileCache::saveTextFile(const std::string& text, const 
std::string& fileNam
     }
     else
     {
-        Log::info("Saving '" + text + "' to " + fullFileName);
+        Log::info("Saving '" + 
LOOLProtocol::getAbbreviatedMessage(text.c_str(), text.size()) + "' to " + 
fullFileName);
     }
 
     textStream << text << std::endl;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to