Kaydet (Commit) 642d64d8 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Kohei Yoshida

scrolling very slow in calc

even on a short spreadsheet scrolling up and down leaves
the first/last row (depending on the direction of scroll)
unchanged until the scrolling stops.

http://people.freedesktop.org/~mst/calc_4.2_scrolling.webm

On larger document there are rendering artifacts during scrolling which go away
after scrolling for me and mstahl, but a bunch of people can show us piles of
horribly broken spreadsheets after scrolling, esp wheel scrolling

Revert "fdo#75026: Sometimes we need to update grid view...

while not being active."

This reverts commit 52cc88d6.

Revert "fdo#68961: Check visible range during scrolling, and re-paint if necessary."

This reverts commit e36c8a67.

Revert "Repaint grid view when the visible area changes."

This reverts commit b54c1a53.

Conflicts:
	sc/source/ui/app/scmod.cxx

Revert "Update visible ranges when updating the scroll bars."

This reverts commit 391a57ef.

Change-Id: Ie170308cba18a9a74c7c72daf07dfa0a4ef7bd13
Reviewed-on: https://gerrit.libreoffice.org/10350Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
Tested-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst 7bfee546
......@@ -204,12 +204,6 @@ private:
void PaintRangeFinderEntry (ScRangeFindData* pData, SCTAB nTab);
/**
* Check the visible grid area to see if the visible range has changed. If
* so, update the stored visible range, and re-paint the grid area.
*/
void UpdateGrid();
protected:
void UpdateHeaderWidth( const ScVSplitPos* pWhich = NULL,
const SCROW* pPosY = NULL );
......
......@@ -390,6 +390,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
OSL_ENSURE( ValidCol(nX2) && ValidRow(nY2), "GridWin Draw Bereich zu gross" );
UpdateVisibleRange();
if (nX2 < maVisibleRange.mnCol1 || nY2 < maVisibleRange.mnRow1)
return;
// unsichtbar
......
......@@ -1198,8 +1198,6 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
if (pColOutline[eWhich]) pColOutline[eWhich]->ScrollPixel( nDiff );
if (bUpdBars)
UpdateScrollBars();
else
UpdateGrid();
}
if (nDeltaX==1 || nDeltaX==-1)
......@@ -1285,8 +1283,6 @@ void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
if (pRowOutline[eWhich]) pRowOutline[eWhich]->ScrollPixel( nDiff );
if (bUpdBars)
UpdateScrollBars();
else
UpdateGrid();
}
if (nDeltaY==1 || nDeltaY==-1)
......
......@@ -2089,16 +2089,6 @@ void ScTabView::PaintRangeFinderEntry (ScRangeFindData* pData, const SCTAB nTab)
}
}
void ScTabView::UpdateGrid()
{
if (!UpdateVisibleRange())
// Visible range hasn't changed. No need to re-paint.
return;
SC_MOD()->AnythingChanged(); // if visible area has changed
PaintGrid();
}
void ScTabView::PaintRangeFinder( long nNumber )
{
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( aViewData.GetViewShell() );
......
......@@ -421,7 +421,12 @@ void ScTabView::UpdateScrollBars()
}
// set visible area for online spelling
UpdateGrid();
if ( aViewData.IsActive() )
{
if (UpdateVisibleRange())
SC_MOD()->AnythingChanged(); // if visible area has changed
}
}
#ifndef HDR_SLIDERSIZE
......
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