From 5e083eb18b4e83078cb73a35862113e754e3267f Mon Sep 17 00:00:00 2001
From: Caolán McNamara <caolanm@redhat.com>
Date: Sat, 12 Nov 2011 22:59:20 +0000
Subject: post cairo text-rendering GetGlyphId only called by GetGlyphId

---
 vcl/unx/generic/gdi/gcach_xpeer.cxx | 50 -------------------------------------
 vcl/unx/generic/gdi/gcach_xpeer.hxx |  1 -
 2 files changed, 51 deletions(-)

(limited to 'vcl')

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index f68314bf8e7f..f014732621d4 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -584,56 +584,6 @@ const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
     return pRawBitmap;
 }
 
-// ---------------------------------------------------------------------------
-
-Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
-{
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
-        return NO_GLYPHID;
-
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
-
-    Glyph aGlyphId = GetRenderGlyph( rGlyphData );
-    if( aGlyphId == NO_GLYPHID )
-    {
-        // prepare GlyphInfo and Bitmap
-        if( rServerFont.GetGlyphBitmap8( nGlyphIndex, maRawBitmap ) )
-        {
-            XGlyphInfo aGlyphInfo;
-            aGlyphInfo.width    = maRawBitmap.mnWidth;
-            aGlyphInfo.height   = maRawBitmap.mnHeight;
-            aGlyphInfo.x        = -maRawBitmap.mnXOffset;
-            aGlyphInfo.y        = -maRawBitmap.mnYOffset;
-
-            rGlyphData.SetSize( Size( maRawBitmap.mnWidth, maRawBitmap.mnHeight ) );
-            rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset );
-
-            const GlyphMetric& rGM = rGlyphData.GetMetric();
-            aGlyphInfo.xOff     = +rGM.GetDelta().X();
-            aGlyphInfo.yOff     = +rGM.GetDelta().Y();
-
-            // upload glyph bitmap to server
-            GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 );
-
-            aGlyphId = nGlyphIndex & 0x00FFFFFF;
-            const sal_uLong nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
-            XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId,
-                aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes );
-            mnBytesUsed += nBytes;
-        }
-        else
-        {
-            // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
-                aGlyphId = GetGlyphId( rServerFont, 0 );
-        }
-
-        SetRenderGlyph( rGlyphData, aGlyphId );
-    }
-
-    return aGlyphId;
-}
-
 // ===========================================================================
 
 X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer )
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index df5f5168535c..a426e3b0d8be 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -49,7 +49,6 @@ public:
     const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
 
     GlyphSet            GetGlyphSet( ServerFont&, int nScreen );
-    Glyph               GetGlyphId( ServerFont&, int nGlyphIndex );
 
 protected:
     void                InitAntialiasing();
-- 
cgit