vcl/source/outdev/text.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit b6764835b4bbd532ba796b48d52f3e87453776a1
Author: Jan-Marek Glogowski <[email protected]>
AuthorDate: Tue Dec 4 14:26:18 2018 +0000
Commit: Jan-Marek Glogowski <[email protected]>
CommitDate: Wed Dec 5 08:53:25 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 <[email protected]>
(cherry picked from commit 9e2e6c27231f916fec349ff60cb0f2c12e0988ad)
Reviewed-on: https://gerrit.libreoffice.org/64572
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 2bb81ad8da2d..ddc8af2c0073 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1249,6 +1249,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;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits