sw/source/core/crsr/crsrsh.cxx | 16 ---------------- sw/source/uibase/wrtsh/move.cxx | 9 +-------- 2 files changed, 1 insertion(+), 24 deletions(-)
New commits: commit c38c2a53d42c8e42f0b4bb4b6906e7f0fdc30f43 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Nov 29 10:29:13 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Jan 7 09:54:19 2025 +0100 Revert "lok: sw: fix PageDown position when cursor is not visible" This reverts commit ddb454bb80622a2fd625bc09af8a66b025b0739f. lok: sw: fix PageDown position when cursor is not visible It caused sending of incorrect cursor position during tile rendering in LOK case - LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR while `SwCursorShell::VisPortChgd` <- which is used eg. in the PaintTile to make interesting part visible: ``` libswlo.so!SwCursorShell::VisPortChgd(SwCursorShell * this, const SwRect & rRect) (sw/source/core/crsr/crsrsh.cxx:1800) libswlo.so!SwViewShell::PaintTile(SwViewShell * this, VirtualDevice & rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, tools::Long tileWidth, tools::Long tileHeight) (sw/source/core/view/viewsh.cxx:2034) ``` There are 2 problems: 1. It generates and sends it just-now, not using the optimized delayed version `SfxLokHelper::notifyUpdatePerViewId` 2. Even more important: rendering tiles shouldn't cause cursor movement/invalidation Change-Id: I2315cf7dd5575586276b86ca5285d6c5b15ff73a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177520 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179613 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins (cherry picked from commit d8a7b0e9708603aca3f18107e47cb6872598c725) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179700 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 6386b8673856..3c026b0f6391 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -78,7 +78,6 @@ #include <hints.hxx> #include <tools/json_writer.hxx> #include <redline.hxx> -#include <boost/property_tree/ptree.hpp> using namespace com::sun::star; @@ -1831,21 +1830,6 @@ void SwCursorShell::VisPortChgd( const SwRect & rRect ) if( m_bSVCursorVis && bVis ) // show SV cursor again m_pVisibleCursor->Show(); - if( comphelper::LibreOfficeKit::isActive() && !rRect.Overlaps( m_aCharRect )) - { - boost::property_tree::ptree aParams; - tools::Rectangle aRect(rRect.TopLeft(), Size(1, 1)); - - aParams.put("rectangle", aRect.toString()); - aParams.put("scroll", true); - aParams.put("hyperlink", ""); - - SfxLokHelper::notifyOtherView(GetSfxViewShell(), - GetSfxViewShell(), - LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, - aParams); - } - if( m_nCursorMove ) m_bInCMvVisportChgd = true; diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 2b6c7745b75b..0a58d03e6779 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -27,7 +27,6 @@ #include <drawdoc.hxx> #include <svx/svdpage.hxx> #include <svx/svdview.hxx> -#include <comphelper/lok.hxx> /** Always: @@ -455,13 +454,7 @@ bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect) { Point aPt( aOldRect.Center() ); - if (SfxViewShell* pKitView = comphelper::LibreOfficeKit::isActive() ? GetSfxViewShell() : nullptr) - { - SwRect aLOKVis(pKitView->getLOKVisibleArea()); - if (!aLOKVis.Overlaps(aOldRect)) - aPt.setY( aLOKVis.Top() + aLOKVis.Height() / 2 ); - } - else if( !IsCursorVisible() ) + if( !IsCursorVisible() ) // set CursorPos to top-/bottom left pos. So the pagescroll is not // be dependent on the current cursor, but on the visarea. aPt.setY( aTmpArea.Top() + aTmpArea.Height() / 2 );