[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Wed Mar 14 20:43:48 UTC 2018


 sw/source/core/crsr/crstrvl.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 14ca8f178f2ee713de5fc9a0c9579f49e52099f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 14 15:03:08 2018 +0000

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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 )
                         {


More information about the Libreoffice-commits mailing list