diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 3923725ee9a2..d4cd2b349b87 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -58,6 +58,7 @@ #include #include #include +#include #include // Save some typing work to avoid accessing destroyed pages. @@ -2271,6 +2272,9 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : pRoot->ResetIdleFormat(); SfxObjectShell* pDocShell = pImp->GetShell()->GetDoc()->GetDocShell(); pDocShell->Broadcast( SfxEventHint( SfxEventHintId::SwEventLayoutFinished, SwDocShell::GetEventName(STR_SW_EVENT_LAYOUT_FINISHED), pDocShell ) ); + // Limit lifetime of the text glyphs cache to a single run of the + // layout. + SwClearFntCacheTextGlyphs(); } }