diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-14 15:03:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-14 21:43:24 +0100 |
commit | 14ca8f178f2ee713de5fc9a0c9579f49e52099f0 (patch) | |
tree | 40e03b0dde3e87e260c233fd5f62869602a156df | |
parent | 109152b1b6afedad77cbf347d8b08aa0e5d8d07a (diff) |
tdf#116397 get bounds of full field, not start of char inside field
The pSpecialPos is set for the StartTag case (#i75130#) and I surmise
we only care about it if we are a smarttag
Change-Id: Ic764bbf31a7784ab021f306f74a08473c8dd0a77
Reviewed-on: https://gerrit.libreoffice.org/51281
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 2fac420a2966..cd08869de125 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1233,7 +1233,14 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, if ( pField ) { if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) ) + { + //tdf#116397 now that we looking for the bounds of the field drop the SmartTag + //index within field setting so we don't the bounds of the char within the field + SwSpecialPos* pSpecialPos = aTmpState.m_pSpecialPos; + aTmpState.m_pSpecialPos = nullptr; pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState ); + aTmpState.m_pSpecialPos = pSpecialPos; + } if( bSetCursor ) { |