diff options
Diffstat (limited to 'vcl/generic/glyphs/glyphcache.cxx')
-rw-r--r-- | vcl/generic/glyphs/glyphcache.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx index bc3c544ad896..826b4cc2a380 100644 --- a/vcl/generic/glyphs/glyphcache.cxx +++ b/vcl/generic/glyphs/glyphcache.cxx @@ -410,9 +410,22 @@ ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD ) // ----------------------------------------------------------------------- +void ImplServerFontEntry::SetServerFont(ServerFont* p) +{ + if (p == mpServerFont) + return; + if (mpServerFont) + mpServerFont->Release(); + mpServerFont = p; + if (mpServerFont) + mpServerFont->AddRef(); +} + ImplServerFontEntry::~ImplServerFontEntry() { // TODO: remove the ServerFont here instead of in the GlyphCache + if (mpServerFont) + mpServerFont->Release(); } // ======================================================================= |