loleaflet/src/layer/tile/TileLayer.js |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 8d2a7ab162d255bd13284e9f9445edb4c882f0a7
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Tue May 10 08:53:06 2016 -0400

    loleaflet: translate the part correctly for text documents
    
    Text documents have a single coordinate system, so they
    only render in part 0. For others, each page/slide/tab
    is a part.
    
    Change-Id: I3c61f4482e5bb535e41ea699147c8c258ca6fb93
    Reviewed-on: https://gerrit.libreoffice.org/24850
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 09c8c85..839e2c7 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -288,7 +288,10 @@ L.TileLayer = L.GridLayer.extend({
                }
                else if (textMsg.startsWith('invalidatetiles:') && 
textMsg.match('EMPTY')) {
                        var msg = 'invalidatetiles: ';
-                       msg += 'part=' + this._selectedPart + ' ';
+                       if (this._docType == 'text')
+                               msg += 'part=0 ';
+                       else
+                               msg += 'part=' + this._selectedPart + ' ';
                        msg += 'x=0 y=0 ';
                        msg += 'width=' + this._docWidthTwips + ' ';
                        msg += 'height=' + this._docHeightTwips;
@@ -751,7 +754,6 @@ L.TileLayer = L.GridLayer.extend({
                        this._tileCache[key] = img;
                }
                L.Log.log(textMsg, L.INCOMING, key);
-
        },
 
        _tileOnLoad: function (done, tile) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to