diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-11 16:23:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-11 16:26:20 +0100 |
commit | 19694ee33b6605e0b881392ad98eeec164ea770c (patch) | |
tree | 0006158425aa77085c281003122e4dc9837d8f41 | |
parent | 829dc5ddc53bf0c8e371dd5dd32a7edbf24cdbbf (diff) |
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
-rw-r--r-- | sc/source/ui/view/select.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 221bfb024d74..e81a27545051 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 ) |