summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabview3.cxx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2017-07-09 15:57:30 +0200
committerMichael Meeks <michael.meeks@collabora.com>2017-07-10 11:22:41 +0200
commit365cf17a375f96789ae0b175ebaec80c6c9e8373 (patch)
tree25d208f89374ffacc86ddcb0cd9eeb6f5f603586 /sc/source/ui/view/tabview3.cxx
parent4250b25c6ae361359300ab6ccde27230f8e01039 (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/39728 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc/source/ui/view/tabview3.cxx')
-rw-r--r--sc/source/ui/view/tabview3.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 9d0c13329c2b..07d234ecf293 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2299,7 +2299,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 == ScUpdateMode::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;