summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2016-11-17 12:50:19 +0100
committerMarco Cecchetti <mrcekets@gmail.com>2016-11-19 14:25:28 +0000
commit580c2072923f7d29ce27595543f2d2749af83cf9 (patch)
tree5a730ded66540f8442c17ababdf2751fb87f71db /sc
parent6a1f0ec26cf5ff2cbd83a074774d324c9f751217 (diff)
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@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview3.cxx44
1 files changed, 29 insertions, 15 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 41a0679408d7..d73c9bd84593 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)