[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/ClientSession.hpp wsd/DocumentBroker.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 1 12:17:31 UTC 2018


 wsd/ClientSession.hpp  |    2 ++
 wsd/DocumentBroker.cpp |   13 +++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit f707ba7c753ab53ef454fa7c2a6418c4d0b17f77
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Sep 21 15:49:30 2018 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Oct 1 14:17:12 2018 +0200

    Fix warning: in case of a text document part number has no meaning
    
    In this case the part number is undefined, somewhere it is set to 0 or 1,
    but has no meaning at all. Just avoid using it with text ducments.
    
    Change-Id: Ic98217bf3ea6c86d37c34e42302bf456f7274975
    (cherry picked from commit 4b13430f6d63d950c07cb9ceda4e1bca7bec6422)
    Reviewed-on: https://gerrit.libreoffice.org/60877
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index eb0440046..33c7ca7c2 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -133,6 +133,8 @@ public:
 
     /// Clear wireId map anytime when client visible area changes (visible area, zoom, part number)
     void resetWireIdMap();
+
+    bool isTextDocument() const { return _isTextDocument; }
 private:
 
     /// SocketHandler: disconnection event.
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 02b112a95..32e20e8f5 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1357,13 +1357,14 @@ void DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
         for (const auto& newTile : tileCombined.getTiles())
         {
             const TileDesc& firstOldTile = *(requestedTiles.begin());
-            if(newTile.getPart() != firstOldTile.getPart() ||
-               newTile.getWidth() != firstOldTile.getWidth() ||
-               newTile.getHeight() != firstOldTile.getHeight() ||
-               newTile.getTileWidth() != firstOldTile.getTileWidth() ||
-               newTile.getTileHeight() != firstOldTile.getTileHeight() )
+            if(!session->isTextDocument() && newTile.getPart() != firstOldTile.getPart())
             {
-                LOG_WRN("Different visible area information in tile requests");
+                LOG_WRN("Different part numbers in tile requests");
+            }
+            else if (newTile.getTileWidth() != firstOldTile.getTileWidth() ||
+                     newTile.getTileHeight() != firstOldTile.getTileHeight() )
+            {
+                LOG_WRN("Different tile sizes in tile requests");
             }
 
             bool tileFound = false;


More information about the Libreoffice-commits mailing list