summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-20 12:19:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-20 14:59:27 +0100
commit1499ba1213f353238ee4c5acfb4fc626c5f37ca6 (patch)
treeb9726074f69aa907761c9f29c2b3e51956e62d01 /sw
parent17ec55c48082254e1f55bcfa00808e45a50a9801 (diff)
Revert "can use the glyphcache for this GetTextArray call"
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 <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx5
1 files changed, 2 insertions, 3 deletions
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<sal_Int32> 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<sal_uInt16>(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 );
}