summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-15 16:42:42 +0100
committerKohei Yoshida <libreoffice@kohei.us>2014-07-17 13:05:21 +0000
commit642d64d8fe54b7577fb4184f1ad6e0e8b3f809c4 (patch)
tree45f1e6ab97e1bf8e1c890175d0bf5a6689c78abf /sc/source/ui/view
parent7bfee546dcd199c0325ec7c7edd5799ce0df79cf (diff)
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 52cc88d6191ba0c4b6477e5c4b9c5d0f0228030d. Revert "fdo#68961: Check visible range during scrolling, and re-paint if necessary." This reverts commit e36c8a674845ab19577fc06d44b780549757e1e7. Revert "Repaint grid view when the visible area changes." This reverts commit b54c1a53b4d400b1c2d282c186af1fa8f151894e. Conflicts: sc/source/ui/app/scmod.cxx Revert "Update visible ranges when updating the scroll bars." This reverts commit 391a57ef65687f2e373bac8d410e551aafa780ec. Change-Id: Ie170308cba18a9a74c7c72daf07dfa0a4ef7bd13 Reviewed-on: https://gerrit.libreoffice.org/10350 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx4
-rw-r--r--sc/source/ui/view/tabview3.cxx10
-rw-r--r--sc/source/ui/view/tabview4.cxx7
4 files changed, 8 insertions, 15 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index fa697ee5fbdd..a60fb82812f7 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -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
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index aafd1144d333..02b99b94f6bc 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -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)
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 7053037e60a3..50066ba15be2 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -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() );
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 2f72a20a53be..85284311e604 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -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