[Libreoffice-commits] core.git: vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 4 18:08:25 UTC 2018
vcl/source/outdev/text.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 9e2e6c27231f916fec349ff60cb0f2c12e0988ad
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Dec 4 14:26:18 2018 +0000
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Dec 4 19:08:02 2018 +0100
tdf#121815 just use valid cached layout glyphs
I'm not exacly sure when and why the font cache is invalidated,
but as a result this also invalidates the cached layouted glyphs.
So just check the glyph layout cache state before trying to use
it. But actually the status bar should update it's cache, so I'm
not sure where to really put the fix. At least this won't crash
LO anymore.
Change-Id: I5f3ff8b9d56808af74d1419e878819d6019cd893
Reviewed-on: https://gerrit.libreoffice.org/64529
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 5c3cdf64fc53..c826126d4b27 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1236,6 +1236,12 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr,
vcl::TextLayoutCache const* pLayoutCache,
const SalLayoutGlyphs* pGlyphs) const
{
+ if (pGlyphs && !pGlyphs->IsValid())
+ {
+ SAL_WARN("vcl", "Trying to setup invalid cached glyphs - falling back to relayout!");
+ pGlyphs = nullptr;
+ }
+
if (!InitFont())
return nullptr;
More information about the Libreoffice-commits
mailing list