[Libreoffice-commits] core.git: Branch 'libreoffice-4-2-0' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Sat Jan 11 08:12:34 PST 2014
sc/source/ui/inc/tabview.hxx | 6 ++++++
sc/source/ui/view/tabview.cxx | 4 ++++
sc/source/ui/view/tabview3.cxx | 13 +++++++++++++
sc/source/ui/view/tabview4.cxx | 10 +---------
4 files changed, 24 insertions(+), 9 deletions(-)
New commits:
commit 02404b1d3ad2120fc803e40ceab303fff86a408b
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Jan 9 20:31:25 2014 -0500
fdo#68961: Check visible range during scrolling, and re-paint if necessary.
Change-Id: I47383cc0c4cf0ec48ce621ba5acac33db44ba313
(cherry picked from commit e36c8a674845ab19577fc06d44b780549757e1e7)
Reviewed-on: https://gerrit.libreoffice.org/7352
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit 1f349d3240115651346da04daeb3459b31782301)
Reviewed-on: https://gerrit.libreoffice.org/7368
Reviewed-by: Eike Rathke <erack at redhat.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index e13d088..0569425 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -208,6 +208,12 @@ 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 );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 1c52550..219653b 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1236,6 +1236,8 @@ 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)
@@ -1321,6 +1323,8 @@ 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 cedb9ba..9553184 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2105,6 +2105,19 @@ void ScTabView::PaintRangeFinderEntry (ScRangeFindData* pData, const SCTAB nTab)
}
}
+void ScTabView::UpdateGrid()
+{
+ if (!aViewData.IsActive())
+ return;
+
+ 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 3aa9a47..ab02081 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -424,15 +424,7 @@ void ScTabView::UpdateScrollBars()
}
// set visible area for online spelling
-
- if ( aViewData.IsActive() )
- {
- if (UpdateVisibleRange())
- {
- SC_MOD()->AnythingChanged(); // if visible area has changed
- PaintGrid();
- }
- }
+ UpdateGrid();
}
#ifndef HDR_SLIDERSIZE
More information about the Libreoffice-commits
mailing list