summaryrefslogtreecommitdiff
path: root/vcl/source/window/menuitemlist.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-10-31 12:28:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-11-01 11:20:43 +0100
commit4a66d7f0dd40c54307b5f750723f68b53703b01a (patch)
tree711dd3efe189f093f82b896db41535ed88406ed2 /vcl/source/window/menuitemlist.cxx
parentc86728655415ea507cb5f8d7f0588014db2d6098 (diff)
tdf#121030 invalidate referenced FontInstances
This sets the FreetypeFont pointer of the FreetypeFontInstances to nullptr when clearing the cache. And it changes the interface functions of SalLayoutGlyphs to some variant different from std::vector. I don't know if we should prefer the mutable or the const font instance. With mutable at least one can invalidate the font instance when checking the IsValid(), so we can get rid of our referenced font instance. Change-Id: I6070cfcb3c549dbad3383bd4ec2b05b30645b753 Reviewed-on: https://gerrit.libreoffice.org/62688 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/menuitemlist.cxx')
-rw-r--r--vcl/source/window/menuitemlist.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index c0496f1ee603..62127940e4e1 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -41,7 +41,7 @@ MenuItemData::~MenuItemData()
SalLayoutGlyphs* MenuItemData::GetTextGlyphs(OutputDevice* pOutputDevice)
{
- if (!aTextGlyphs.empty())
+ if (aTextGlyphs.IsValid())
// Use pre-calculated result.
return &aTextGlyphs;