From a910fb442e31afb53c4d43243dfe75f044b2355c Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 4 Sep 2018 13:17:10 +0200 Subject: sw: less vcl layout calls in SwFntObj::GetCursorOfst() GenericSalLayout::LayoutText() calls for a single word document's initial layout: 5 -> 4. Change-Id: If806b6f91faef1a5ad56b3439efc12bbabe030af Reviewed-on: https://gerrit.libreoffice.org/59973 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/source/core/txtnode/fntcache.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 8fa3eee79aa8..e893e43d1f8e 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2071,8 +2071,10 @@ TextFrameIndex SwFntObj::GetCursorOfst(SwDrawTextInfo &rInf) { m_pPrinter->SetLayoutMode( rInf.GetOut().GetLayoutMode() ); m_pPrinter->SetDigitLanguage( rInf.GetOut().GetDigitLanguage() ); + SwTextGlyphsKey aGlyphsKey{ m_pPrinter, rInf.GetText(), rInf.GetIdx(), rInf.GetLen() }; + SalLayoutGlyphs* pGlyphs = lcl_CreateLayout(aGlyphsKey, m_aTextGlyphs[aGlyphsKey]); m_pPrinter->GetTextArray( rInf.GetText(), pKernArray.get(), - sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); + sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()), nullptr, pGlyphs); } else rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray.get(), -- cgit