diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2017-07-09 15:57:30 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-07-10 11:22:21 +0200 |
commit | 15de3808bbef05ca8f60441cdb1fab057753a23a (patch) | |
tree | f1f3c4b4de1191db8ffb9200167b16395607336f /sc | |
parent | 560ef780d3fbc4fc96aaf1d9421c3ff0d3646a93 (diff) |
lok: sc: missing invalidation on pasting text and deleting a cell
In the desktop case we invalidate up to the right side of the visible
area, however in the tiled rendering case we need to take care to
invalidate also cached tiles.
Change-Id: I7290ff35c155fab6bda3ce8b5d9c765624507052
Reviewed-on: https://gerrit.libreoffice.org/39729
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 2695f013f6df..8a4ff64cdca8 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2289,7 +2289,23 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO Point aStart = aViewData.GetScrPos( nCol1, nRow1, (ScSplitPos) i ); Point aEnd = aViewData.GetScrPos( nCol2+1, nRow2+1, (ScSplitPos) i ); if ( eMode == SC_UPDATE_ALL ) - aEnd.X() = bLayoutRTL ? 0 : (bIsTiledRendering ? aEnd.X() : pGridWin[i]->GetOutputSizePixel().Width()); + { + if (bIsTiledRendering) + { + // When a cell content is deleted we have no clue about + // the width of the embedded text. + // Anyway, clients will ask only for tiles that overlaps + // the visible area. + // Remember that wsd expects int and that aEnd.X() is + // in pixels and will be converted in twips, before performing + // the lok callback, so we need to avoid that an overflow occurs. + aEnd.X() = bLayoutRTL ? 0 : std::numeric_limits<int>::max() / 1000; + } + else + { + aEnd.X() = bLayoutRTL ? 0 : pGridWin[i]->GetOutputSizePixel().Width(); + } + } aEnd.X() -= nLayoutSign; aEnd.Y() -= 1; |