[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Mon Jul 10 09:22:51 UTC 2017
sc/source/ui/view/tabview3.cxx | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
New commits:
commit 15de3808bbef05ca8f60441cdb1fab057753a23a
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/39729
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-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 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;
More information about the Libreoffice-commits
mailing list