summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2023-12-19 15:04:21 -0500
committerJustin Luth <jluth@mail.com>2023-12-20 13:56:03 +0100
commit5032244819e861899bc5f45bd097624ffa1caa40 (patch)
tree2dfb7baf63e1142d21911a266031540792ee928d /sw
parentb763e68a5641933d1ea2fd449b1faf0e4097b7a4 (diff)
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 <jluth@mail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx1
1 files changed, 1 insertions, 0 deletions
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;