[Libreoffice-commits] core.git: sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Sat Nov 19 14:25:47 UTC 2016
sc/source/ui/view/tabview3.cxx | 44 +++++++++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 15 deletions(-)
New commits:
commit 580c2072923f7d29ce27595543f2d2749af83cf9
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Thu Nov 17 12:50:19 2016 +0100
LOK - Calc: use the tiled rendering area as visible area in PaintArea
This workaround is needed since the visible area in core is not the
same which is used in the client.
Change-Id: I82b23e689000c4d8106ffa01ed082ae3d629b1be
Reviewed-on: https://gerrit.libreoffice.org/30976
Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
Tested-by: Marco Cecchetti <mrcekets at gmail.com>
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 41a0679..d73c9bd 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2220,24 +2220,38 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
nCol2 = nEndCol;
nRow2 = nEndRow;
- SCCOL nScrX = aViewData.GetPosX( eHWhich );
- SCROW nScrY = aViewData.GetPosY( eVWhich );
- if (nCol1 < nScrX)
- nCol1 = nScrX;
- if (nCol2 < nScrX)
+ SCCOL nLastX = 0;
+ SCROW nLastY = 0;
+
+ if (comphelper::LibreOfficeKit::isActive())
{
- if ( eMode == SC_UPDATE_ALL ) // for UPDATE_ALL, paint anyway
- nCol2 = nScrX; // (because of extending strings to the right)
- else
- bOut = true; // completely outside the window
+ nLastX = aViewData.GetMaxTiledCol();
+ nLastY = aViewData.GetMaxTiledRow();
+ }
+ else
+ {
+
+ SCCOL nScrX = aViewData.GetPosX( eHWhich );
+ SCROW nScrY = aViewData.GetPosY( eVWhich );
+
+ if (nCol1 < nScrX)
+ nCol1 = nScrX;
+ if (nCol2 < nScrX)
+ {
+ if ( eMode == SC_UPDATE_ALL ) // for UPDATE_ALL, paint anyway
+ nCol2 = nScrX; // (because of extending strings to the right)
+ else
+ bOut = true; // completely outside the window
+ }
+ if (nRow1 < nScrY)
+ nRow1 = nScrY;
+ if (nRow2 < nScrY)
+ bOut = true;
+
+ nLastX = nScrX + aViewData.VisibleCellsX( eHWhich ) + 1;
+ nLastY = nScrY + aViewData.VisibleCellsY( eVWhich ) + 1;
}
- if (nRow1 < nScrY)
- nRow1 = nScrY;
- if (nRow2 < nScrY)
- bOut = true;
- SCCOL nLastX = nScrX + aViewData.VisibleCellsX( eHWhich ) + 1;
- SCROW nLastY = nScrY + aViewData.VisibleCellsY( eVWhich ) + 1;
if (nCol1 > nLastX)
bOut = true;
if (nCol2 > nLastX)
More information about the Libreoffice-commits
mailing list