Make page navigation in move navigation handler consistent

Page navigation in the move navigation handler scrolls the view without
moving the cursor or unselecting selections. This patch makes page
navigation that results in document wrapping, scroll the view without
changing the cursor position or selections. This is useful, for example,
when find all search is made and page viewing is wanted that does not
destroy cursor selections.

Change-Id: Ie062eeba9a29c2b8a42605ed842d60244cc74147
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108380
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index bfa8ec0..348a9a0d 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -343,32 +343,26 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
    switch( m_nMoveType )
    {
        case NID_PGE:
            if ( bNext )
        {
            if (USHRT_MAX == rSh.GetNextPrevPageNum(bNext))
            {
                if ( USHRT_MAX == rSh.GetNextPrevPageNum( true ) )
                {
                    rSh.GotoPage( 1, true );
                    SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::EndWrapped );
                }
                else
                {
                    PhyPageDown();
                    SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty );
                }
                const Point aPt(GetVisArea().Left(),
                                rSh.GetPagePos(bNext ? 1 : rSh.GetPageCnt()).Y());
                Point aAlPt(AlignToPixel(aPt) );
                // If there is a difference, has been truncated --> then add one pixel,
                // so that no residue of the previous page is visible.
                if(aPt.Y() != aAlPt.Y())
                    aAlPt.AdjustY(3 * GetEditWin().PixelToLogic(Size(0, 1)).Height());
                SetVisArea(aAlPt);
                SvxSearchDialogWrapper::SetSearchLabel(bNext ? SearchLabel::EndWrapped :
                                                               SearchLabel::StartWrapped);
            }
            else
            {
                if ( USHRT_MAX == rSh.GetNextPrevPageNum( false ) )
                {
                    rSh.GotoPage( rSh.GetPageCnt(), true );
                    SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::StartWrapped );
                }
                else
                {
                    PhyPageUp();
                    SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty );
                }
                bNext ? PhyPageDown() : PhyPageUp();
                SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty);
            }
        }
        break;
        case NID_TBL :
            rSh.EnterStdMode();