tdf#156470 add SAL_INFO calls for debugging

In the verious LibreOffice samples attached to tdf#156470, it appears
that LibreOffice spends a lot of time the GetTextArray() calls in
SvxFont::QuickGetTextSize(). So add logging to determine if any of
the GetTextArray() calls are returning unusual sizes.

Change-Id: Ie6f0fcc85396b47342b6a93180d4bc9873420931
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155072
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
This commit is contained in:
Patrick Luby
2023-07-31 18:11:53 +02:00
parent e675d9673f
commit ccc31ed4d9
2 changed files with 9 additions and 1 deletions
+8 -1
View File
@@ -478,8 +478,13 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
const sal_Int32 nIdx, const sal_Int32 nLen, KernArray* pDXArray ) const
{
if ( !IsCaseMap() && !IsFixKerning() )
return Size( GetTextArray( pOut, rTxt, pDXArray, nIdx, nLen ),
{
SAL_INFO( "editeng.quicktextsize", "SvxFont::QuickGetTextSize before GetTextArray(): Case map: " << IsCaseMap() << " Fix kerning: " << IsFixKerning());
Size aTxtSize( GetTextArray( pOut, rTxt, pDXArray, nIdx, nLen ),
pOut->GetTextHeight() );
SAL_INFO( "editeng.quicktextsize", "SvxFont::QuickGetTextSize after GetTextArray(): Text length: " << nLen << " Text size: " << aTxtSize.Width() << "x" << aTxtSize.Height());
return aTxtSize;
}
KernArray aDXArray;
@@ -492,11 +497,13 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
Size aTxtSize;
aTxtSize.setHeight( pOut->GetTextHeight() );
SAL_INFO( "editeng.quicktextsize", "SvxFont::QuickGetTextSize before GetTextArray(): Case map: " << IsCaseMap() << " Fix kerning: " << IsFixKerning());
if ( !IsCaseMap() )
aTxtSize.setWidth( GetTextArray( pOut, rTxt, pDXArray, nIdx, nLen ) );
else
aTxtSize.setWidth( GetTextArray( pOut, CalcCaseMap( rTxt ),
pDXArray, nIdx, nLen ) );
SAL_INFO( "editeng.quicktextsize", "SvxFont::QuickGetTextSize after GetTextArray(): Text length: " << nLen << " Text size: " << aTxtSize.Width() << "x" << aTxtSize.Height());
if( IsFixKerning() && ( nLen > 1 ) )
{
+1
View File
@@ -197,6 +197,7 @@ certain functionality.
@li @c editeng
@li @c editeng.chaining
@li @c editeng.items
@li @c editeng.quicktextsize
@section embeddedobj