Kaydet (Commit) 84e8e11d authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: rhbz#101681 set hyperlink tooltip for the full hyperlink area

not just a single point in it.

This way gtk3 knows the successive tooltip hints for the positions
along the hyperlink are for the same tooltip

Change-Id: I46a8c960e528f6a9aaab5bea145c6870f22e46c5
üst c1520089
......@@ -1429,16 +1429,25 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
}
if( bRet )
{
rContentAtPos.sStr = pTextNd->GetExpandText(
pTextAttr->GetStart(),
*pTextAttr->GetEnd() - pTextAttr->GetStart() );
const sal_Int32 nSt = pTextAttr->GetStart();
const sal_Int32 nEnd = *pTextAttr->End();
rContentAtPos.sStr = pTextNd->GetExpandText(nSt, nEnd-nSt);
rContentAtPos.aFnd.pAttr = &pTextAttr->GetAttr();
rContentAtPos.eContentAtPos = SwContentAtPos::SW_INETATTR;
rContentAtPos.pFndTextAttr = pTextAttr;
if( pFieldRect && nullptr != ( pFrame = pTextNd->getLayoutFrame( GetLayout(), &aPt ) ) )
pFrame->GetCharRect( *pFieldRect, aPos, &aTmpState );
{
SwRect aStart;
SwPosition aStartPos(*pTextNd, nSt);
pFrame->GetCharRect(aStart, aStartPos, &aTmpState);
SwRect aEnd;
SwPosition aEndPos(*pTextNd, nEnd);
pFrame->GetCharRect(aEnd, aEndPos, &aTmpState);
*pFieldRect = aStart.Union(aEnd);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment