Kaydet (Commit) 19694ee3 authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 829dc5dd
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment