sw/inc/viscrs.hxx | 2 +- sw/source/core/crsr/viscrs.cxx | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-)
New commits: commit 5c4603a058918114c41fa8b7ae189e7e10ef3d92 Author: Gülşah Köse <[email protected]> AuthorDate: Fri Oct 10 11:21:07 2025 +0300 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Dec 1 15:43:15 2025 +0100 Revert "Prevent cursor invalidation if the cursor position doesn't change." This reverts commit a260cc52b2fae1382805b4389c95f29ed8671f42. This commit causes the view jump on writer. This commit originally merged for the following issue Open two writer documents side by side includes hyperlink Click the hyperilnk one of them and see hyperlink popup Type into the other document There was a glich on hyperlink popup in the first document Issue doesn't exist even without this patch. So we remove it completely. Change-Id: I8a341d66a963ed1943d9f666ba026d7eca240f08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192157 Reviewed-by: Szymon Kłos <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193082 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit dbe29bc354105314e83edf7069ba34caf73956eb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194882 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 9fa0abfca050..66c7df3387bb 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -63,7 +63,7 @@ public: bool IsVisible() const { return m_bIsVisible; } void SetDragCursor( bool bFlag = true ) { m_bIsDragCursor = bFlag; } - ::std::pair<SwRect, bool> SetPos(); + SwRect SetPos(); void SetPosAndShow(SfxViewShell const * pViewShell); const vcl::Cursor& GetTextCursor() const; diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 05c8c5be9cb9..e98098db4733 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -142,7 +142,7 @@ OString buildHyperlinkJSON(const OUString& sText, const OUString& sLink) } -::std::pair<SwRect, bool> SwVisibleCursor::SetPos() +SwRect SwVisibleCursor::SetPos() { SwRect aRect; tools::Long nTmpY = m_rState.m_aCursorHeight.getY(); @@ -214,16 +214,14 @@ OString buildHyperlinkJSON(const OUString& sText, const OUString& sLink) m_pCursorShell->IsSelection() ) aRect.Width( 0 ); - bool bIsCursorPosChanged = m_aTextCursor.GetPos() != aRect.Pos(); - m_aTextCursor.SetSize( aRect.SSize() ); m_aTextCursor.SetPos( aRect.Pos() ); - return { aRect, bIsCursorPosChanged }; + return aRect; } void SwVisibleCursor::SetPosAndShow(SfxViewShell const * pViewShell) { - auto const [aRect, bIsCursorPosChanged] {SetPos()}; + const SwRect aRect = SetPos(); if (SfxViewShell* pNotifyViewShell = comphelper::LibreOfficeKit::isActive() ? m_pCursorShell->GetSfxViewShell() : nullptr) { @@ -255,7 +253,7 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * pViewShell) LOK_CALLBACK_INVALIDATE_VIEW_CURSOR); } } - else if ( bIsCursorPosChanged || m_pCursorShell->IsTableMode()) + else { SfxLokHelper::notifyUpdatePerViewId(pNotifyViewShell, SfxViewShell::Current(), pNotifyViewShell, LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR);
