From 5032244819e861899bc5f45bd097624ffa1caa40 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 19 Dec 2023 15:04:21 -0500 Subject: 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 --- sw/source/core/crsr/crsrsh.cxx | 1 + 1 file changed, 1 insertion(+) 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; -- cgit