loolwsd: fix regression in rendering of Writer

Writer has only one part for rendering purposes (0).

With the new API that includes the part number in
the INVALIDATE_TILES event, the part number must
be 0, otherwise, there will not be anything to render.

Unfortunately Core issues part number == page number,
which we overwrite with 0 in Online.

Change-Id: I842fdd2f50021334dcd3fa47c0b1c9df34d8c5e1
Reviewed-on: https://gerrit.libreoffice.org/29605
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2016-10-07 18:19:56 -04:00 committed by Ashod Nakashian
parent f5a7a19b95
commit 23a2d2261e

View file

@ -999,7 +999,7 @@ void ChildSession::loKitCallback(const int nType, const std::string& rPayload)
y = std::stoi(tokens[1]);
width = std::stoi(tokens[2]);
height = std::stoi(tokens[3]);
part = std::stoi(tokens[4]);
part = (_docType != "text" ? std::stoi(tokens[4]) : 0); // Writer renders everything as part 0.
}
catch (const std::out_of_range&)
{