editeng/source/items/svxfont.cxx | 9 ++++++++- include/sal/log-areas.dox | 1 + 2 files changed, 9 insertions(+), 1 deletion(-)
New commits: commit ccc31ed4d96bada134d08046f22f64c095a29041 Author: Patrick Luby <plub...@neooffice.org> AuthorDate: Sun Jul 30 15:03:56 2023 -0400 Commit: Patrick Luby <plub...@neooffice.org> CommitDate: Mon Jul 31 18:11:53 2023 +0200 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 <plub...@neooffice.org> diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index ef6197f85778..75359251fe56 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -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 ) ) { diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index f209b6244f5f..275f33e1d073 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -197,6 +197,7 @@ certain functionality. @li @c editeng @li @c editeng.chaining @li @c editeng.items +@li @c editeng.quicktextsize @section embeddedobj