wsd/ClientSession.hpp | 2 ++ wsd/DocumentBroker.cpp | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-)
New commits: commit f707ba7c753ab53ef454fa7c2a6418c4d0b17f77 Author: Tamás Zolnai <[email protected]> AuthorDate: Fri Sep 21 15:49:30 2018 +0200 Commit: Jan Holesovsky <[email protected]> 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 <[email protected]> Tested-by: Jan Holesovsky <[email protected]> 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
