summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcache.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-09-04 13:17:10 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-09-04 15:34:21 +0200
commita910fb442e31afb53c4d43243dfe75f044b2355c (patch)
tree444b60ea85e7912c2e423721a3774cb07fa9859e /sw/source/core/txtnode/fntcache.cxx
parent200f88c55842a3947eb3cbc5ce05b044eb25d338 (diff)
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 <vmiklos@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
1 files changed, 3 insertions, 1 deletions
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(),