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

Caolán McNamara caolanm at redhat.com
Mon Jul 11 15:26:41 UTC 2016


 sc/source/ui/view/select.cxx   |   11 ++++++++---
 sc/source/ui/view/tabvwsh3.cxx |    2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 19694ee33b6605e0b881392ad98eeec164ea770c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 11 16:23:17 2016 +0100

    Related: tdf#100573 try a different approach to solving tdf#46637
    
    Try scrolling to the selected cell if its not fully visible already
    in SetCursorAtPoint to get the cell fully visible if possible
    
    Change-Id: I7ba6ee4196a2fab989a5a4ca1e391c863945176b

diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 221bfb0..e81a275 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -312,17 +312,22 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon
 
     //  Scrolling
     Size aWinSize = pEngine->GetWindow()->GetOutputSizePixel();
-    bool bRightScroll  = ( aEffPos.X() >= aWinSize.Width() );
     bool bLeftScroll  = ( aEffPos.X() < 0 );
-    bool bBottomScroll = ( aEffPos.Y() >= aWinSize.Height() );
     bool bTopScroll = ( aEffPos.Y() < 0 );
-    bool bScroll = bRightScroll || bBottomScroll || bLeftScroll || bTopScroll;
 
     SCsCOL  nPosX;
     SCsROW  nPosY;
     pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(),
                                 nPosX, nPosY, true, true );     // with Repair
 
+    Rectangle aEditArea = pViewData->GetEditArea(GetWhich(), nPosX, nPosY,
+                                                 pEngine->GetWindow(),
+                                                 nullptr, false);
+
+    bool bBottomScroll = ( aEditArea.Bottom() >= aWinSize.Height() );
+    bool bRightScroll  = ( aEditArea.Right() >= aWinSize.Width() );
+    bool bScroll = bRightScroll || bBottomScroll || bLeftScroll || bTopScroll;
+
     // for Autofill switch in the center of cell
     // thereby don't prevent scrolling to bottom/right
     if ( pViewData->IsFillMode() || pViewData->GetFillMode() == ScFillMode::MATRIX )
commit 829dc5ddc53bf0c8e371dd5dd32a7edbf24cdbbf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 11 16:22:19 2016 +0100

    Resolves: tdf#100573 revert original attempt to resolves tdf#46637
    
    Revert "tdf#46637 - Make partially visible cells fully visible on mouse click"
    
    this can be safely backported to 5-2 series as a standalone revert
    
    This reverts commit 08f6107edf3021c31571769e45f7c4b5267d6924.

diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 3a1d101..fd8246e 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -376,7 +376,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                         if( bUnmark )
                         {
                             MoveCursorAbs( nCol, nRow,
-                                SC_FOLLOW_LINE, false, false );
+                                SC_FOLLOW_NONE, false, false );
                         }
                     }
 


More information about the Libreoffice-commits mailing list