tdf#138587 Preserve doc view x position on go to content

from the Writer Navigator.

Change-Id: I55b05be037b4ce010fb0476f584921c7ecae79bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144392
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 6f6e792..15ca21f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -5666,9 +5666,8 @@ void SwContentTree::GotoContent(const SwContent* pCnt)
            (!m_pActiveShell->IsCursorVisible() && !m_pActiveShell->IsFrameSelected() &&
            !m_pActiveShell->IsObjSelected()))
    {
        Point rPoint = m_pActiveShell->GetCursorDocPos();
        rPoint.setX(0);
        rView.SetVisArea(rPoint);
        Point aPoint(rView.GetVisArea().getX(), m_pActiveShell->GetCursorDocPos().getY());
        rView.SetVisArea(aPoint);
    }
}