sw/qa/extras/uiwriter/uiwriter9.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
New commits: commit d6c745aa37292069e0057bc505e6eeb4455a4df8 Author: Justin Luth <[email protected]> AuthorDate: Mon Jan 5 16:08:42 2026 -0500 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Jan 12 13:13:23 2026 +0100 tdf#166945 Revert "tdf#111969 sw: ... last half-character for context menu" This reverts 24.8 commit 242f6985556af7aac77b68c6dfea20d4b32c5f52. The problem is that the context menu simply cannot know which choice the user will choose. Some actions DEPEND on the cursor being 'closest to the mouse point' and some actions DEPEND on the cursor being 'inside the character run properties or field'. That 'mouse point at right click' is completely lost as soon as the mouse moves to chose something from the context menu, so it is not available to be re-used by SID_PASTE etc to re-position the cursor before executing the paste. The benefits of the now-being-reverted-patch do not dwarf the already-discovered-downsides, so I'm just reverting to extract myself from this situation. Change-Id: I03943cf899e1d18fb3e736d4cccea159abe7332e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196586 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins (cherry picked from commit f656be88a35e1d4e51ddf131f1454acac4f03739) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196679 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sw/qa/extras/uiwriter/uiwriter9.cxx b/sw/qa/extras/uiwriter/uiwriter9.cxx index e7dabb391b37..81c2dd30ba09 100644 --- a/sw/qa/extras/uiwriter/uiwriter9.cxx +++ b/sw/qa/extras/uiwriter/uiwriter9.cxx @@ -656,7 +656,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf111969B) // the test: simulate a right-click of a mouse (at the end-edge of the second N-dash) // which sets the cursor and then acts on that pos. pWrtShell->SwCursorShell::SetCursor(aLogicL, false, /*Block=*/false, /*FieldInfo=*/true); - CPPUNIT_ASSERT(!pWrtShell->GetCurField(true)); + //CPPUNIT_ASSERT(!pWrtShell->GetCurField(true)); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf159049) diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index dd3604dcc9d7..34b8fecd1d8a 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1068,7 +1068,6 @@ int SwCursorShell::SetCursor(const Point& rLPt, bool bOnlyText, bool bBlock, boo bOnlyText ? CursorMoveState::SetOnlyText : CursorMoveState::NONE ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); aTmpState.m_bFieldInfo = bFieldInfo; // always set cursor at field-start if point is over field - aTmpState.m_bPosMatchesBounds = bFieldInfo; // always set cursor at character-start if over char SwTextNode const*const pTextNd = sw::GetParaPropsNode(*GetLayout(), pCursor->GetPoint()->GetNode());
