Kaydet (Commit) 580c2072 authored tarafından Marco Cecchetti's avatar Marco Cecchetti Kaydeden (comit) Marco Cecchetti

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/30976Reviewed-by: 's avatarMarco Cecchetti <mrcekets@gmail.com>
Tested-by: 's avatarMarco Cecchetti <mrcekets@gmail.com>
üst 6a1f0ec2
...@@ -2220,24 +2220,38 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO ...@@ -2220,24 +2220,38 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
nCol2 = nEndCol; nCol2 = nEndCol;
nRow2 = nEndRow; nRow2 = nEndRow;
SCCOL nScrX = aViewData.GetPosX( eHWhich ); SCCOL nLastX = 0;
SCROW nScrY = aViewData.GetPosY( eVWhich ); SCROW nLastY = 0;
if (nCol1 < nScrX)
nCol1 = nScrX; if (comphelper::LibreOfficeKit::isActive())
if (nCol2 < nScrX)
{ {
if ( eMode == SC_UPDATE_ALL ) // for UPDATE_ALL, paint anyway nLastX = aViewData.GetMaxTiledCol();
nCol2 = nScrX; // (because of extending strings to the right) nLastY = aViewData.GetMaxTiledRow();
else }
bOut = true; // completely outside the window 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) if (nCol1 > nLastX)
bOut = true; bOut = true;
if (nCol2 > nLastX) if (nCol2 > nLastX)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment