From 1499ba1213f353238ee4c5acfb4fc626c5f37ca6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 20 Jan 2022 12:19:52 +0000 Subject: Revert "can use the glyphcache for this GetTextArray call" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nothing wrong with this commit, but there's a an underlying bug in the direction I wanted to go here. This reverts commit 5fc43fe24c24c58e401707fa6fffe9250186b99c. Change-Id: Id670d9331cf41a0d2dcc2a74792c1aa7db4ec284 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128661 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/core/txtnode/fntcache.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index f40072e26b8d..cb68f6535635 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2091,13 +2091,11 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) { if( !m_pPrtFont->IsSameInstance( rInf.GetOut().GetFont() ) ) rInf.GetOut().SetFont( *m_pPrtFont ); - SwTextGlyphsKey aGlyphsKey{ &rInf.GetOut(), rInf.GetText(), sal_Int32(rInf.GetIdx()), sal_Int32(nLn) }; if( bCompress ) { std::vector aKernArray; - SalLayoutGlyphs* pGlyphs = GetCachedSalLayoutGlyphs(aGlyphsKey); rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray, - sal_Int32(rInf.GetIdx()), sal_Int32(nLn), nullptr, pGlyphs); + sal_Int32(rInf.GetIdx()), sal_Int32(nLn)); rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( aKernArray.data(), rInf.GetIdx(), nLn, rInf.GetKanaComp(), o3tl::narrowing(m_aFont.GetFontSize().Height()) ,lcl_IsFullstopCentered( rInf.GetOut() ) ) ); @@ -2105,6 +2103,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) } else { + SwTextGlyphsKey aGlyphsKey{ &rInf.GetOut(), rInf.GetText(), sal_Int32(rInf.GetIdx()), sal_Int32(nLn) }; aTextSize.setWidth( GetCachedTextWidth(aGlyphsKey, rInf.GetVclCache())); rInf.SetKanaDiff( 0 ); } -- cgit