diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 1e2d57c54d5b..366bd2a5d0fb 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -168,8 +168,7 @@ public: const FontCharMapRef GetFontCharMap() const; bool GetFontCapabilities(vcl::FontCapabilities &) const; - const GlyphMetric& GetGlyphMetric( sal_GlyphId aGlyphId ) - { return GetGlyphData( aGlyphId ).GetMetric(); } + const GlyphMetric& GetGlyphMetric(sal_GlyphId aGlyphId); #if ENABLE_GRAPHITE GraphiteFaceWrapper* GetGraphiteFace() const; @@ -201,7 +200,6 @@ private: void ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_* ) const; void ApplyGSUB( const FontSelectPattern& ); - GlyphData& GetGlyphData( sal_GlyphId ); ServerFontLayoutEngine* GetLayoutEngine(); diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index c1b4a4e80c63..de4bb9666975 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -304,14 +304,14 @@ long FreetypeFont::Release() const return --mnRefCount; } -GlyphData& FreetypeFont::GetGlyphData( sal_GlyphId aGlyphId ) +const GlyphMetric& FreetypeFont::GetGlyphMetric(sal_GlyphId aGlyphId) { // usually the GlyphData is cached GlyphList::iterator it = maGlyphList.find( aGlyphId ); if( it != maGlyphList.end() ) { GlyphData& rGlyphData = it->second; GlyphCache::GetInstance().UsingGlyph( *this, rGlyphData ); - return rGlyphData; + return rGlyphData.GetMetric(); } // sometimes not => we need to create and initialize it ourselves @@ -319,7 +319,7 @@ GlyphData& FreetypeFont::GetGlyphData( sal_GlyphId aGlyphId ) mnBytesUsed += sizeof( GlyphData ); InitGlyphData( aGlyphId, rGlyphData ); GlyphCache::GetInstance().AddedGlyph( *this, rGlyphData ); - return rGlyphData; + return rGlyphData.GetMetric(); } void FreetypeFont::GarbageCollect( long nMinLruIndex )