[Libreoffice-commits] core.git: sc/source

Dennis Francis dennisfrancis.in at gmail.com
Tue Feb 2 10:18:06 UTC 2016


 sc/source/ui/view/tabview2.cxx |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

New commits:
commit b5c191c130a132fb5f80ce9eefe4e98f1ad9422f
Author: Dennis Francis <dennisfrancis.in at gmail.com>
Date:   Mon Jan 18 06:47:02 2016 +0530

    Fix for tdf#97084 : Scroll view to the ref boundary...
    
    ...but maintain the fix for tdf#96524
    
    Change-Id: I35128843d13904e9e0cf9ded559c352acb3c7c46
    Reviewed-on: https://gerrit.libreoffice.org/21559
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 7ccf861..556390d 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -912,9 +912,19 @@ void ScTabView::ExpandBlock(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode)
 
         pDoc->SkipOverlapped(nNewX, nNewY, nRefTab);
         UpdateRef(nNewX, nNewY, nRefTab);
-        if ((aViewData.GetRefStartX() == MAXCOL || nNewX != MAXCOL) &&
-            (aViewData.GetRefStartY() == MAXROW || nNewY != MAXROW))
-            AlignToCursor(nNewX, nNewY, eMode);
+        SCCOL nTargetCol = nNewX;
+        SCROW nTargetRow = nNewY;
+        if (((aViewData.GetRefStartX() == 0) || (aViewData.GetRefStartY() == 0)) &&
+            ((nNewX != MAXCOL) || (nNewY != MAXROW)))
+        {
+            // Row selection
+            if ((aViewData.GetRefStartX() == 0) && (nNewX == MAXCOL))
+                nTargetCol = aViewData.GetCurX();
+            // Column selection
+            if ((aViewData.GetRefStartY() == 0) && (nNewY == MAXROW))
+                nTargetRow = aViewData.GetCurY();
+        }
+        AlignToCursor(nTargetCol, nTargetRow, eMode);
     }
     else
     {


More information about the Libreoffice-commits mailing list