summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcache.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-10-08 21:46:46 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-09 09:24:52 +0200
commit5da57ff00b23fd9969a2bfcf4e6e1e8245dfc1a3 (patch)
tree3b6e15cd0ac2551af68d5a7796ad470e79df1840 /sw/source/core/txtnode/fntcache.cxx
parent98cc91efd7862d39b3c33b85b744721bec935938 (diff)
tdf#119993 sw: clear the font cache text glyphs on table col change
This helps not storing pre-computed vcl text layouts which are most probably never re-used anymore. Approximate numbers for memory usage with 10 column resizes for the bugdoc: - old: 310MB -> 454MB - new: 309MB -> 310MB Change-Id: Ifb88b88e1bffe2c2670089930fc2d22ff19576ce Reviewed-on: https://gerrit.libreoffice.org/61562 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index dd377d0c1090..740710c6c27e 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2682,4 +2682,10 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont )
return false;
}
+void SwClearFntCacheTextGlyphs()
+{
+ for (SwFntObj* pFntObj = pFntCache->First(); pFntObj; pFntObj = SwFntCache::Next(pFntObj))
+ pFntObj->GetTextGlyphs().clear();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */