diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-14 15:03:08 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2018-03-15 16:58:53 +0100 |
commit | 31ea1ebe851eff9257c7fa4acc1e04aa1c9fd32f (patch) | |
tree | 989fa3b7ceab4fbaba99513490e8c4781e4b29b1 | |
parent | 036bf5c78a3ead56f48b4be4d0462e23242c80e0 (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/51298
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.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 b65ba7d8dcf3..798793238edd 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1231,7 +1231,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 ) { |