sw/source/uibase/utlui/content.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 1a12438faeeb74fcb1151e0fd34fcc4c70340c8e
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Sat Dec 17 12:10:59 2022 -0900
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Dec 20 09:00:25 2022 +0000

    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.gran...@collabora.co.uk>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144456

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index e45e6f9e9938..0185943ff419 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);
     }
 }
 

Reply via email to