[Libreoffice-commits] core.git: sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Mon Jul 10 09:23:07 UTC 2017
sc/source/ui/view/tabview3.cxx | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
New commits:
commit 365cf17a375f96789ae0b175ebaec80c6c9e8373
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Sun Jul 9 15:57:30 2017 +0200
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 at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
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;
More information about the Libreoffice-commits
mailing list