sw/source/core/crsr/crsrsh.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 5032244819e861899bc5f45bd097624ffa1caa40
Author: Justin Luth <[email protected]>
AuthorDate: Tue Dec 19 15:04:21 2023 -0500
Commit: Justin Luth <[email protected]>
CommitDate: Wed Dec 20 13:56:03 2023 +0100
tdf#111969 sw: acknowledge that last half-character for smart tags
This fixes CTRL-clicking on the last half-character of the smarttag
and having nothing happen, or triggering it
with the half-character before the smarttag.
This is a suggested follow-up to right-clicking on a selection,
which had the same problem.
smart tags need an extension to activate,
so a unit test is impractical in this case.
Change-Id: I151c28090b5a6701df16dab95992eeae2aec3ca3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161033
Tested-by: Jenkins
Reviewed-by: Justin Luth <[email protected]>
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index c29020615058..e910a3aa92fa 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -4144,6 +4144,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt,
SwRect& rSelectRect )
SwPosition aPos( *pCursor->GetPoint() );
Point aPt( rPt );
SwCursorMoveState eTmpState( CursorMoveState::SetOnlyText );
+ eTmpState.m_bPosMatchesBounds = true; // treat last half of character same
as first half
SwSpecialPos aSpecialPos;
eTmpState.m_pSpecialPos = &aSpecialPos;
SwTextNode *pNode;