summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-09-21 15:49:30 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-09-21 16:01:44 +0200
commit4b13430f6d63d950c07cb9ceda4e1bca7bec6422 (patch)
treeef6447885f15b5cdca7aed690f6ae4dd35981935
parentRevert "loleaflet: mobile: disable scroll bars" (diff)
downloadonline-4b13430f6d63d950c07cb9ceda4e1bca7bec6422.tar.gz
online-4b13430f6d63d950c07cb9ceda4e1bca7bec6422.zip
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
-rw-r--r--wsd/ClientSession.hpp2
-rw-r--r--wsd/DocumentBroker.cpp13
2 files changed, 9 insertions, 6 deletions
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index 2efd266245..326ff50c0b 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -150,6 +150,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 79d4104070..7fe5646ee5 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;