You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/12/16 17:07:43 UTC

svn commit: r1551244 [1/2] - in /openoffice/trunk/main: padmin/source/ vcl/aqua/source/gdi/ vcl/inc/ vcl/inc/aqua/ vcl/inc/os2/ vcl/inc/unx/ vcl/inc/vcl/ vcl/inc/win/ vcl/os2/source/gdi/ vcl/source/fontsubset/ vcl/source/gdi/ vcl/source/glyphs/ vcl/unx...

Author: hdu
Date: Mon Dec 16 16:07:41 2013
New Revision: 1551244

URL: http://svn.apache.org/r1551244
Log:
#i123840# add and use the sal_GlyphId type

Using the central definition adds consistency and cleans up many ad hoc
declarations. The type sal_GlyphId will become a class in the future so
that its bitfield operations etc. can then be isolated into nice methods. 

Added:
    openoffice/trunk/main/padmin/source/salglyphid.hxx
    openoffice/trunk/main/vcl/inc/salglyphid.hxx
Modified:
    openoffice/trunk/main/vcl/aqua/source/gdi/salatslayout.cxx
    openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx
    openoffice/trunk/main/vcl/inc/aqua/salgdi.h
    openoffice/trunk/main/vcl/inc/fontsubset.hxx
    openoffice/trunk/main/vcl/inc/glyphcache.hxx
    openoffice/trunk/main/vcl/inc/graphite_layout.hxx
    openoffice/trunk/main/vcl/inc/os2/salgdi.h
    openoffice/trunk/main/vcl/inc/salgdi.hxx
    openoffice/trunk/main/vcl/inc/sallayout.hxx
    openoffice/trunk/main/vcl/inc/unx/pspgraphics.h
    openoffice/trunk/main/vcl/inc/unx/salgdi.h
    openoffice/trunk/main/vcl/inc/vcl/fontmanager.hxx
    openoffice/trunk/main/vcl/inc/win/salgdi.h
    openoffice/trunk/main/vcl/os2/source/gdi/os2layout.cxx
    openoffice/trunk/main/vcl/os2/source/gdi/salgdi3.cxx
    openoffice/trunk/main/vcl/source/fontsubset/cff.cxx
    openoffice/trunk/main/vcl/source/fontsubset/fontsubset.cxx
    openoffice/trunk/main/vcl/source/gdi/outdev3.cxx
    openoffice/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx
    openoffice/trunk/main/vcl/source/gdi/sallayout.cxx
    openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx
    openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.hxx
    openoffice/trunk/main/vcl/source/glyphs/gcach_layout.cxx
    openoffice/trunk/main/vcl/source/glyphs/glyphcache.cxx
    openoffice/trunk/main/vcl/source/glyphs/graphite_layout.cxx
    openoffice/trunk/main/vcl/unx/generic/fontmanager/fontmanager.cxx
    openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.cxx
    openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.hxx
    openoffice/trunk/main/vcl/unx/generic/gdi/pspgraphics.cxx
    openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx
    openoffice/trunk/main/vcl/unx/generic/gdi/xrender_peer.hxx
    openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.cxx
    openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.hxx
    openoffice/trunk/main/vcl/unx/generic/printergfx/text_gfx.cxx
    openoffice/trunk/main/vcl/unx/headless/svpgdi.hxx
    openoffice/trunk/main/vcl/unx/headless/svppspgraphics.cxx
    openoffice/trunk/main/vcl/unx/headless/svppspgraphics.hxx
    openoffice/trunk/main/vcl/unx/headless/svptext.cxx
    openoffice/trunk/main/vcl/win/source/gdi/salgdi3.cxx
    openoffice/trunk/main/vcl/win/source/gdi/winlayout.cxx

Added: openoffice/trunk/main/padmin/source/salglyphid.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/padmin/source/salglyphid.hxx?rev=1551244&view=auto
==============================================================================
--- openoffice/trunk/main/padmin/source/salglyphid.hxx (added)
+++ openoffice/trunk/main/padmin/source/salglyphid.hxx Mon Dec 16 16:07:41 2013
@@ -0,0 +1,52 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+// This header file is a verbatim copy of its counterpart in vcl.
+// With spadmin being on its way out (#i123863i#) a cleaner solution isn't worth the effort
+
+#ifndef _SV_SALGLYPHID_HXX
+#define _SV_SALGLYPHID_HXX
+
+// TODO: sal_GlyphId should become a class...
+typedef sal_uInt32 sal_GlyphId;
+
+// Glyph Flags
+#define GF_NONE     0x00000000
+#define GF_FLAGMASK 0xFF800000
+#define GF_IDXMASK  ~GF_FLAGMASK
+#define GF_ISCHAR   0x00800000
+#define GF_ROTL     0x01000000
+// caution !!!
+#define GF_VERT     0x02000000
+// GF_VERT is only for windows implementation
+// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx)
+// don't use this elsewhere !!!
+#define GF_ROTR     0x03000000
+#define GF_ROTMASK  0x03000000
+#define GF_UNHINTED 0x04000000
+#define GF_GSUB     0x08000000
+#define GF_FONTMASK 0xF0000000
+#define GF_FONTSHIFT 28
+
+#define GF_DROPPED  0xFFFFFFFF
+
+#endif // _SV_SALGLYPHID_HXX
+

Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salatslayout.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/salatslayout.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/gdi/salatslayout.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/gdi/salatslayout.cxx Mon Dec 16 16:07:41 2013
@@ -480,7 +480,7 @@ void ATSLayout::DrawText( SalGraphics& r
  *
  * @return : number of glyph details that were provided
 **/
-int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int& nStart,
+int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pOutGlyphIds, Point& rPos, int& nStart,
     sal_Int32* pGlyphAdvances, int* pCharIndexes ) const
 {
 	if( nStart < 0 )                // first glyph requested?
@@ -539,7 +539,7 @@ int ATSLayout::GetNextGlyphs( int nLen, 
     while( nCount < nLen )
     {
         ++nCount;
-        sal_GlyphId nGlyphId = mpGlyphIds[nStart];
+        sal_GlyphId aGlyphId = mpGlyphIds[ nStart];
 
        	// check if glyph fallback is needed for this glyph
         // TODO: use ATSUDirectGetLayoutDataArrayPtrFromTextLayout(kATSUDirectDataStyleIndex) API instead?
@@ -557,11 +557,11 @@ int ATSLayout::GetNextGlyphs( int nLen, 
             // register fallback font
             const int nLevel = mpFallbackInfo->AddFallback( nFallbackFontID );
        	    // update sal_GlyphId with fallback level
-            nGlyphId |= (nLevel << GF_FONTSHIFT);
+            aGlyphId |= (nLevel << GF_FONTSHIFT);
         }
 
         // update resulting glyphid array
-        *(pGlyphIDs++) = nGlyphId;
+        *(pOutGlyphIds++) = aGlyphId;
 
         // update returned glyph advance array
         if( pGlyphAdvances )
@@ -1209,13 +1209,13 @@ void ATSLayout::Simplify( bool /*bIsBase
 
 // get the ImplFontData for a glyph fallback font
 // for a glyphid that was returned by ATSLayout::GetNextGlyphs()
-const ImplFontData* ATSLayout::GetFallbackFontData( sal_GlyphId nGlyphId ) const
+const ImplFontData* ATSLayout::GetFallbackFontData( sal_GlyphId aGlyphId ) const
 {
     // check if any fallback fonts were needed
     if( !mpFallbackInfo )
         return NULL;
     // check if the current glyph needs a fallback font
-    int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
+    int nFallbackLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
     if( !nFallbackLevel )
         return NULL;
 	return mpFallbackInfo->GetFallbackFontData( nFallbackLevel );

Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/gdi/salgdi.cxx Mon Dec 16 16:07:41 2013
@@ -1852,7 +1852,7 @@ static OSStatus GgoMoveToProc( const Flo
 	return eStatus;
 }
 
-sal_Bool AquaSalGraphics::GetGlyphOutline( long nGlyphId, basegfx::B2DPolyPolygon& rPolyPoly )
+bool AquaSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolygon& rPolyPoly )
 {
 	GgoData aGgoData;
 	aGgoData.mpPolyPoly = &rPolyPoly;
@@ -1860,7 +1860,7 @@ sal_Bool AquaSalGraphics::GetGlyphOutlin
 
 	ATSUStyle rATSUStyle = maATSUStyle;	// TODO: handle glyph fallback when CWS pdffix02 is integrated
 	OSStatus eGgoStatus = noErr;
-	OSStatus eStatus = ATSUGlyphGetCubicPaths( rATSUStyle, nGlyphId,
+	OSStatus eStatus = ATSUGlyphGetCubicPaths( rATSUStyle, aGlyphId,
 		GgoMoveToProc, GgoLineToProc, GgoCurveToProc, GgoClosePathProc,
 		&aGgoData, &eGgoStatus );
 	if( (eStatus != noErr) ) // TODO: why is (eGgoStatus!=noErr) when curves are involved?
@@ -1894,13 +1894,13 @@ long AquaSalGraphics::GetGraphicsWidth()
 
 // -----------------------------------------------------------------------
 
-sal_Bool AquaSalGraphics::GetGlyphBoundRect( long nGlyphId, Rectangle& rRect )
+bool AquaSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
 {
 	ATSUStyle rATSUStyle = maATSUStyle;	// TODO: handle glyph fallback
-	GlyphID aGlyphId = nGlyphId;
 	ATSGlyphScreenMetrics aGlyphMetrics;
+	GlyphID nAtsGlyphId = aGlyphId;
 	OSStatus eStatus = ATSUGlyphGetScreenMetrics( rATSUStyle,
-		1, &aGlyphId, 0, FALSE, !mbNonAntialiasedText, &aGlyphMetrics );
+		1, &nAtsGlyphId, 0, FALSE, !mbNonAntialiasedText, &aGlyphMetrics );
 	if( eStatus != noErr )
 		return false;
 
@@ -2248,7 +2248,7 @@ static bool GetRawFontData( const ImplFo
 }
 
 sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
-	const ImplFontData* pFontData, long* pGlyphIDs, sal_uInt8* pEncoding,
+	const ImplFontData* pFontData, sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding,
 	sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo )
 {
 	// TODO: move more of the functionality here into the generic subsetter code
@@ -2278,7 +2278,7 @@ sal_Bool AquaSalGraphics::CreateFontSubs
 		// make the subsetter provide the requested subset
 		FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" );
 		bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL,
-			pGlyphIDs, pEncoding, nGlyphCount, pGlyphWidths );
+			pGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
 		fclose( pOutFile );
 		return bRC;
 	}
@@ -2324,21 +2324,21 @@ sal_Bool AquaSalGraphics::CreateFontSubs
     for( int i = 0; i < nGlyphCount; ++i )
     {
         aTempEncs[i] = pEncoding[i];
-        sal_uInt32 nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-        if( pGlyphIDs[i] & GF_ISCHAR )
+        sal_GlyphId aGlyphId( pGlyphIds[i] & GF_IDXMASK);
+        if( pGlyphIds[i] & GF_ISCHAR )
         {
-            bool bVertical = (pGlyphIDs[i] & GF_ROTMASK) != 0;
-            nGlyphIdx = ::MapChar( pSftFont, static_cast<sal_uInt16>(nGlyphIdx), bVertical );
-            if( nGlyphIdx == 0 && pFontData->IsSymbolFont() )
+            bool bVertical = (pGlyphIds[i] & GF_ROTMASK) != 0;
+            aGlyphId = ::MapChar( pSftFont, static_cast<sal_uInt16>(aGlyphId), bVertical );
+            if( aGlyphId == 0 && pFontData->IsSymbolFont() )
             {
                 // #i12824# emulate symbol aliasing U+FXXX <-> U+0XXX
-                nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-                nGlyphIdx = (nGlyphIdx & 0xF000) ? (nGlyphIdx & 0x00FF) : (nGlyphIdx | 0xF000 );
-                nGlyphIdx = ::MapChar( pSftFont, static_cast<sal_uInt16>(nGlyphIdx), bVertical );
+                aGlyphId = pGlyphIds[i] & GF_IDXMASK;
+                aGlyphId = (aGlyphId & 0xF000) ? (aGlyphId & 0x00FF) : (aGlyphId | 0xF000 );
+                aGlyphId = ::MapChar( pSftFont, static_cast<sal_uInt16>(aGlyphId), bVertical );
             }
         }
-        aShortIDs[i] = static_cast<sal_uInt16>( nGlyphIdx );
-        if( !nGlyphIdx )
+        aShortIDs[i] = static_cast<sal_uInt16>( aGlyphId );
+        if( !aGlyphId )
             if( nNotDef < 0 )
                 nNotDef = i; // first NotDef glyph found
     }

Modified: openoffice/trunk/main/vcl/inc/aqua/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/aqua/salgdi.h?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/aqua/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/aqua/salgdi.h Mon Dec 16 16:07:41 2013
@@ -303,7 +303,7 @@ public:
     // as "undefined character"
     virtual sal_Bool			CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData* pFont,
-                                              long* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -339,8 +339,8 @@ public:
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& );
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool                    GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& );
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void					 DrawServerFontLayout( const ServerFontLayout& );

Modified: openoffice/trunk/main/vcl/inc/fontsubset.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/fontsubset.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/fontsubset.hxx (original)
+++ openoffice/trunk/main/vcl/inc/fontsubset.hxx Mon Dec 16 16:07:41 2013
@@ -28,6 +28,7 @@
 #include <tools/string.hxx>
 #include <cstdio>
 
+#include "salglyphid.hxx"
 #include "vcl/dllapi.h"
 
 namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font
@@ -58,7 +59,7 @@ public:
 
 	bool		CreateFontSubset( int nOutFontTypeMask,
 					FILE* pOutFile, const char* pOutFontName,
-					const long* pReqGlyphIds, const sal_uInt8* pEncodedIds,
+					const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncodedIds,
 					int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL );
 
 public: // TODO: make subsetter results private and provide accessor methods instead
@@ -81,7 +82,7 @@ private:
 	int						mnReqFontTypeMask;	// allowed subset-target font types
 	FILE*					mpOutFile;
 	const char*				mpReqFontName;
-	const long*				mpReqGlyphIds;
+	const sal_GlyphId*		mpReqGlyphIds;
 	const sal_uInt8*		mpReqEncodedIds;
 	int						mnReqGlyphCount;
 

Modified: openoffice/trunk/main/vcl/inc/glyphcache.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/glyphcache.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/glyphcache.hxx (original)
+++ openoffice/trunk/main/vcl/inc/glyphcache.hxx Mon Dec 16 16:07:41 2013
@@ -80,7 +80,7 @@ private:
     friend class ServerFont;
     // used by ServerFont class only
     void                        AddedGlyph( ServerFont&, GlyphData& );
-    void                        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
+    void                        RemovingGlyph( ServerFont&, GlyphData&, sal_GlyphId );
     void                        UsingGlyph( ServerFont&, GlyphData& );
     void                        GrowNotify();
 
@@ -188,16 +188,16 @@ public:
     virtual const ImplFontCharMap* GetImplFontCharMap() const = 0;
     Point                       TransformPoint( const Point& ) const;
 
-    GlyphData&                  GetGlyphData( int nGlyphIndex );
-    const GlyphMetric&          GetGlyphMetric( int nGlyphIndex )
-                                { return GetGlyphData( nGlyphIndex ).GetMetric(); }
+    GlyphData&                  GetGlyphData( sal_GlyphId );
+    const GlyphMetric&          GetGlyphMetric( sal_GlyphId aGlyphId )
+                                { return GetGlyphData( aGlyphId ).GetMetric(); }
 
-    virtual int                 GetGlyphIndex( sal_UCS4 ) const = 0;
-    virtual bool                GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const = 0;
+    virtual sal_GlyphId         GetGlyphIndex( sal_UCS4 ) const = 0;
+    virtual bool                GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& ) const = 0;
     virtual bool                GetAntialiasAdvice( void ) const = 0;
-    bool                        IsGlyphInvisible( int nGlyphIndex );
-    virtual bool                GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const = 0;
-    virtual bool                GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const = 0;
+    bool                        IsGlyphInvisible( sal_GlyphId );
+    virtual bool                GetGlyphBitmap1( sal_GlyphId, RawBitmap& ) const = 0;
+    virtual bool                GetGlyphBitmap8( sal_GlyphId, RawBitmap& ) const = 0;
 
     void                        SetExtended( int nInfo, void* ppVoid );
     int                         GetExtInfo() { return mnExtInfo; }
@@ -214,7 +214,7 @@ protected:
     long                        Release() const;
     sal_uLong                       GetByteCount() const { return mnBytesUsed; }
 
-    virtual void                InitGlyphData( int nGlyphIndex, GlyphData& ) const = 0;
+    virtual void                InitGlyphData( sal_GlyphId, GlyphData& ) const = 0;
     virtual void                GarbageCollect( long );
     void                        ReleaseFromGarbageCollect();
 

Modified: openoffice/trunk/main/vcl/inc/graphite_layout.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/graphite_layout.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/graphite_layout.hxx (original)
+++ openoffice/trunk/main/vcl/inc/graphite_layout.hxx Mon Dec 16 16:07:41 2013
@@ -48,12 +48,6 @@
 #include <vcl/dllapi.h>
 // Module
 
-// For backwards compatibility with 2.4.x
-#if (SUPD == 680)
-typedef sal_Int32 sal_GlyphId;
-#endif
-
-
 // Module type definitions and forward declarations.
 //
 class TextSourceAdaptor;

Modified: openoffice/trunk/main/vcl/inc/os2/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/os2/salgdi.h?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/os2/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/os2/salgdi.h Mon Dec 16 16:07:41 2013
@@ -288,7 +288,7 @@ public:
     // as "undefined character"
     virtual sal_Bool			CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData* pFont,
-                                              long* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -324,8 +324,8 @@ public:
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool                    GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& );
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void					 DrawServerFontLayout( const ServerFontLayout& );

Modified: openoffice/trunk/main/vcl/inc/salgdi.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/salgdi.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/salgdi.hxx (original)
+++ openoffice/trunk/main/vcl/inc/salgdi.hxx Mon Dec 16 16:07:41 2013
@@ -29,6 +29,7 @@
 #include "vcl/sv.h"
 #include "vcl/dllapi.h"
 #include "vcl/salgtype.hxx"
+#include "salglyphid.hxx"
 #include "vos/thread.hxx"
 #include "vcl/outdev.hxx"
 #include "vcl/salnativewidgets.hxx"
@@ -264,7 +265,7 @@ public:
     // as "undefined character"
     virtual sal_Bool			CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData* pFont,
-                                              sal_Int32* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -306,8 +307,8 @@ public:
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc ) = 0;
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& ) = 0;
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0;
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& ) = 0;
+    virtual bool                    GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) = 0;
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
     virtual void					 DrawServerFontLayout( const ServerFontLayout& ) = 0;

Added: openoffice/trunk/main/vcl/inc/salglyphid.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/salglyphid.hxx?rev=1551244&view=auto
==============================================================================
--- openoffice/trunk/main/vcl/inc/salglyphid.hxx (added)
+++ openoffice/trunk/main/vcl/inc/salglyphid.hxx Mon Dec 16 16:07:41 2013
@@ -0,0 +1,49 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SV_SALGLYPHID_HXX
+#define _SV_SALGLYPHID_HXX
+
+// TODO: sal_GlyphId should become a class...
+typedef sal_uInt32 sal_GlyphId;
+
+// Glyph Flags
+#define GF_NONE     0x00000000
+#define GF_FLAGMASK 0xFF800000
+#define GF_IDXMASK  ~GF_FLAGMASK
+#define GF_ISCHAR   0x00800000
+#define GF_ROTL     0x01000000
+// caution !!!
+#define GF_VERT     0x02000000
+// GF_VERT is only for windows implementation
+// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx)
+// don't use this elsewhere !!!
+#define GF_ROTR     0x03000000
+#define GF_ROTMASK  0x03000000
+#define GF_UNHINTED 0x04000000
+#define GF_GSUB     0x08000000
+#define GF_FONTMASK 0xF0000000
+#define GF_FONTSHIFT 28
+
+#define GF_DROPPED  0xFFFFFFFF
+
+#endif // _SV_SALGLYPHID_HXX
+

Modified: openoffice/trunk/main/vcl/inc/sallayout.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/sallayout.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/sallayout.hxx (original)
+++ openoffice/trunk/main/vcl/inc/sallayout.hxx Mon Dec 16 16:07:41 2013
@@ -38,6 +38,7 @@ typedef unsigned short LanguageType;
 
 // for typedef sal_UCS4
 #include <vcl/vclenum.hxx>
+#include "salglyphid.hxx"
 
 class SalGraphics;
 class ImplFontData;
@@ -146,28 +147,6 @@ VCL_PLUGIN_PUBLIC const char* GetAutofal
 // - SalLayout -
 // -------------
 
-typedef sal_uInt32 sal_GlyphId;
-
-// Glyph Flags
-#define GF_NONE     0x00000000
-#define GF_FLAGMASK 0xFF800000
-#define GF_IDXMASK  ~GF_FLAGMASK
-#define GF_ISCHAR   0x00800000
-#define GF_ROTL     0x01000000
-// caution !!!
-#define GF_VERT     0x02000000
-// GF_VERT is only for windows implementation
-// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx)
-// don't use this elsewhere !!!
-#define GF_ROTR     0x03000000
-#define GF_ROTMASK  0x03000000
-#define GF_UNHINTED 0x04000000
-#define GF_GSUB     0x08000000
-#define GF_FONTMASK 0xF0000000
-#define GF_FONTSHIFT 28
-
-#define GF_DROPPED  0xFFFFFFFF
-
 // all positions/widths are in font units
 // one exception: drawposition is in pixel units
 
@@ -306,17 +285,17 @@ struct GlyphItem
     int     mnCharPos;      // index in string
     int     mnOrigWidth;    // original glyph width
     int     mnNewWidth;     // width after adjustments
-    sal_GlyphId mnGlyphIndex;
+    sal_GlyphId maGlyphId;
     Point   maLinearPos;    // absolute position of non rotated string
 
 public:
             GlyphItem() {}
 
-            GlyphItem( int nCharPos, sal_GlyphId nGlyphIndex, const Point& rLinearPos,
+            GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& rLinearPos,
                 long nFlags, int nOrigWidth )
             :   mnFlags(nFlags), mnCharPos(nCharPos),
                 mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth),
-                mnGlyphIndex(nGlyphIndex), maLinearPos(rLinearPos)
+                maGlyphId(aGlyphId), maLinearPos(rLinearPos)
             {}
 
     enum{ FALLBACK_MASK=0xFF, IS_IN_CLUSTER=0x100, IS_RTL_GLYPH=0x200, IS_DIACRITIC=0x400 };

Modified: openoffice/trunk/main/vcl/inc/unx/pspgraphics.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/unx/pspgraphics.h?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/unx/pspgraphics.h (original)
+++ openoffice/trunk/main/vcl/inc/unx/pspgraphics.h Mon Dec 16 16:07:41 2013
@@ -104,7 +104,7 @@ public:
     virtual bool			AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
     virtual sal_Bool			CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData*,
-                                              sal_Int32* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -121,8 +121,8 @@ public:
                                             bool bVertical,
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
-    virtual sal_Bool			GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool			GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool			GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool			GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& );
     virtual SalLayout*		GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void			DrawServerFontLayout( const ServerFontLayout& );
     virtual bool            supportsOperation( OutDevSupportType ) const;

Modified: openoffice/trunk/main/vcl/inc/unx/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/unx/salgdi.h?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/unx/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/unx/salgdi.h Mon Dec 16 16:07:41 2013
@@ -251,7 +251,7 @@ public:
     virtual bool			AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
     virtual sal_Bool			CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData*,
-                                              sal_Int32* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -268,8 +268,8 @@ public:
                                             bool bVertical,
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
-    virtual sal_Bool			GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool			GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool			GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+    virtual bool			GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
     virtual SalLayout*		GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void			DrawServerFontLayout( const ServerFontLayout& );
     virtual bool            supportsOperation( OutDevSupportType ) const;

Modified: openoffice/trunk/main/vcl/inc/vcl/fontmanager.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/vcl/fontmanager.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/vcl/fontmanager.hxx (original)
+++ openoffice/trunk/main/vcl/inc/vcl/fontmanager.hxx Mon Dec 16 16:07:41 2013
@@ -32,6 +32,7 @@
 
 #include "vcl/dllapi.h"
 #include "vcl/helper.hxx"
+#include "salglyphid.hxx"
 
 #include "com/sun/star/lang/Locale.hpp"
 
@@ -643,7 +644,7 @@ public:
     bool createFontSubset( FontSubsetInfo&,
                            fontID nFont,
                            const rtl::OUString& rOutFile,
-                           sal_Int32* pGlyphIDs,
+                           sal_GlyphId* pGlyphIds,
                            sal_uInt8* pNewEncoding,
                            sal_Int32* pWidths,
                            int nGlyphs,

Modified: openoffice/trunk/main/vcl/inc/win/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/win/salgdi.h?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/win/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/win/salgdi.h Mon Dec 16 16:07:41 2013
@@ -318,7 +318,7 @@ public:
     // as "undefined character"
     virtual sal_Bool			CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData*,
-                                              long* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -354,8 +354,8 @@ public:
                                             Ucs2UIntMap& rUnicodeEnc );
 	virtual int             GetMinKashidaWidth();
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool                    GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& );
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void					 DrawServerFontLayout( const ServerFontLayout& );

Modified: openoffice/trunk/main/vcl/os2/source/gdi/os2layout.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/os2/source/gdi/os2layout.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/os2/source/gdi/os2layout.cxx (original)
+++ openoffice/trunk/main/vcl/os2/source/gdi/os2layout.cxx Mon Dec 16 16:07:41 2013
@@ -507,7 +507,7 @@ bool Os2SalLayout::LayoutText( ImplLayou
 
 // -----------------------------------------------------------------------
 
-int Os2SalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int& nStart,
+int Os2SalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIds, Point& rPos, int& nStart,
     sal_Int32* pGlyphAdvances, int* pCharIndexes ) const
 {
     // return zero if no more glyph found
@@ -527,29 +527,29 @@ int Os2SalLayout::GetNextGlyphs( int nLe
     int nCount = 0;
     while( nCount < nLen )
     {
-        // update return values {nGlyphIndex,nCharPos,nGlyphAdvance}
-        long nGlyphIndex = mpOutGlyphs[ nStart ];
+        // update return values {aGlyphId,nCharPos,nGlyphAdvance}
+        sal_GlyphId aGlyphId = mpOutGlyphs[ nStart ];
         if( mbDisableGlyphs )
         {
             if( mnLayoutFlags & SAL_LAYOUT_VERTICAL )
             {
-                sal_Unicode cChar = (sal_Unicode)(nGlyphIndex & GF_IDXMASK);
+                sal_Unicode cChar = (sal_Unicode)(aGlyphId & GF_IDXMASK);
 #ifdef GNG_VERT_HACK
                 if( mrOs2FontData.HasGSUBstitutions( mhPS )
                 &&  mrOs2FontData.IsGSUBstituted( cChar ) )
-                    nGlyphIndex |= GF_ROTL | GF_GSUB;
+                    aGlyphId |= GF_ROTL | GF_GSUB;
                 else
 #endif // GNG_VERT_HACK
                 {
-                    nGlyphIndex |= GetVerticalFlags( cChar );
-                    if( !(nGlyphIndex & GF_ROTMASK) )
-                        nGlyphIndex |= GF_VERT;
+                    aGlyphId |= GetVerticalFlags( cChar );
+                    if( !(aGlyphId & GF_ROTMASK) )
+                        aGlyphId |= GF_VERT;
                 }
             }
-            nGlyphIndex |= GF_ISCHAR;
+            aGlyphId |= GF_ISCHAR;
         }
         ++nCount;
-        *(pGlyphs++) = nGlyphIndex;
+        *(pGlyphIds++) = aGlyphId;
         if( pGlyphAdvances )
             *(pGlyphAdvances++) = mpGlyphAdvances[ nStart ];
         if( pCharIndexes )

Modified: openoffice/trunk/main/vcl/os2/source/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/os2/source/gdi/salgdi3.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/os2/source/gdi/salgdi3.cxx (original)
+++ openoffice/trunk/main/vcl/os2/source/gdi/salgdi3.cxx Mon Dec 16 16:07:41 2013
@@ -1198,7 +1198,7 @@ void Os2SalGraphics::GetDevFontSubstList
 
 // -----------------------------------------------------------------------
 
-sal_Bool Os2SalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
+bool Os2SalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
 {
     // use unity matrix
     MAT2 aMat;
@@ -1206,13 +1206,13 @@ sal_Bool Os2SalGraphics::GetGlyphBoundRe
     aMat.eM12 = aMat.eM21 = FixedFromDouble( 0.0 );
 
     UINT nGGOFlags = GGO_METRICS;
-    if( !(nIndex & GF_ISCHAR) )
+    if( !(aGlyphId & GF_ISCHAR) )
         nGGOFlags |= GGO_GLYPH_INDEX;
-    nIndex &= GF_IDXMASK;
+    aGlyphId &= GF_IDXMASK;
 
     GLYPHMETRICS aGM;
     DWORD nSize = FT2_ERROR;
-    nSize = Ft2GetGlyphOutline( mhPS, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat );
+    nSize = Ft2GetGlyphOutline( mhPS, aGlyphId, nGGOFlags, &aGM, 0, NULL, &aMat );
     if( nSize == FT2_ERROR )
         return false;
 
@@ -1227,7 +1227,7 @@ sal_Bool Os2SalGraphics::GetGlyphBoundRe
 
 // -----------------------------------------------------------------------
 
-sal_Bool Os2SalGraphics::GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& rB2DPolyPoly )
+bool Os2SalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, ::basegfx::B2DPolyPolygon& rB2DPolyPoly )
 {
 #if OSL_DEBUG_LEVEL>0
 	debug_printf("Os2SalGraphics::GetGlyphOutline\n");
@@ -1242,13 +1242,13 @@ sal_Bool Os2SalGraphics::GetGlyphOutline
     aMat.eM12 = aMat.eM21 = FixedFromDouble( 0.0 );
 
     UINT nGGOFlags = GGO_NATIVE;
-    if( !(nIndex & GF_ISCHAR) )
+    if( !(aGlyphId & GF_ISCHAR) )
         nGGOFlags |= GGO_GLYPH_INDEX;
-    nIndex &= GF_IDXMASK;
+    aGlyphId &= GF_IDXMASK;
 
     GLYPHMETRICS aGlyphMetrics;
     DWORD nSize1 = FT2_ERROR;
-    nSize1 = Ft2GetGlyphOutline( mhPS, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat );
+    nSize1 = Ft2GetGlyphOutline( mhPS, aGlyphId, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat );
 
     if( !nSize1 )       // blank glyphs are ok
         bRet = TRUE;
@@ -1257,7 +1257,7 @@ sal_Bool Os2SalGraphics::GetGlyphOutline
         PM_BYTE*   pData = new PM_BYTE[ nSize1 ];
         ULONG   nTotalCount = 0;
         DWORD   nSize2;
-        nSize2 = Ft2GetGlyphOutline( mhPS, nIndex, nGGOFlags,
+        nSize2 = Ft2GetGlyphOutline( mhPS, aGlyphId, nGGOFlags,
                 &aGlyphMetrics, nSize1, pData, &aMat );
 
         if( nSize1 == nSize2 )
@@ -1497,7 +1497,7 @@ int ScopedTrueTypeFont::open(void * pBuf
 }
 
 sal_Bool Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
-	const ImplFontData* pFont, long* pGlyphIDs, sal_uInt8* pEncoding,
+	const ImplFontData* pFont, sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding,
 	sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo )
 {
 	// TODO: use more of the central font-subsetting code, move stuff there if needed
@@ -1536,25 +1536,25 @@ sal_Bool Os2SalGraphics::CreateFontSubse
 	const RawFontData aRawCffData( mhPS, nCffTag );
 	if( aRawCffData.get() )
 	{
-		long nRealGlyphIds[ 256 ];
+		sal_GlyphId aRealGlyphIds[ 256 ];
 		for( int i = 0; i < nGlyphCount; ++i )
 		{
 			// TODO: remap notdef glyph if needed
 			// TODO: use GDI's GetGlyphIndices instead? Does it handle GSUB properly?
-			sal_uInt32 nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-			if( pGlyphIDs[i] & GF_ISCHAR ) // remaining pseudo-glyphs need to be translated
-				nGlyphIdx = pImplFontCharMap->GetGlyphIndex( nGlyphIdx );
-			if( (pGlyphIDs[i] & (GF_ROTMASK|GF_GSUB)) != 0)	// TODO: vertical substitution
+			sal_uInt32 aGlyphIdx = pGlyphIds[i] & GF_IDXMASK;
+			if( pGlyphIds[i] & GF_ISCHAR ) // remaining pseudo-glyphs need to be translated
+				aGlyphId = pImplFontCharMap->GetGlyphIndex( aGlyphId );
+			if( (pGlyphIds[i] & (GF_ROTMASK|GF_GSUB)) != 0)	// TODO: vertical substitution
 				{/*####*/}
 
-			nRealGlyphIds[i] = nGlyphIdx;
+			aRealGlyphIds[i] = aGlyphId;
 		}
 
 		// provide a font subset from the CFF-table
 		FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" );
 		rInfo.LoadFont( FontSubsetInfo::CFF_FONT, aRawCffData.get(), aRawCffData.size() );
 		bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL,
-				nRealGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
+				aRealGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
 		fclose( pOutFile );
 		return bRC;
 	}
@@ -1594,21 +1594,21 @@ sal_Bool Os2SalGraphics::CreateFontSubse
 	for( i = 0; i < nGlyphCount; ++i )
 	{
 		aTempEncs[i] = pEncoding[i];
-		sal_uInt32 nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-		if( pGlyphIDs[i] & GF_ISCHAR )
+		sal_GlyphId aGlyphId = pGlyphIds[i] & GF_IDXMASK;
+		if( pGlyphIds[i] & GF_ISCHAR )
 		{
-			sal_Unicode cChar = static_cast<sal_Unicode>(nGlyphIdx); // TODO: sal_UCS4
-			const bool bVertical = ((pGlyphIDs[i] & (GF_ROTMASK|GF_GSUB)) != 0);
-			nGlyphIdx = ::MapChar( aSftTTF.get(), cChar, bVertical );
-			if( (nGlyphIdx == 0) && pFont->IsSymbolFont() )
+			sal_Unicode cChar = static_cast<sal_Unicode>(aGlyphId); // TODO: sal_UCS4
+			const bool bVertical = ((pGlyphIds[i] & (GF_ROTMASK|GF_GSUB)) != 0);
+			aGlyphId = ::MapChar( aSftTTF.get(), cChar, bVertical );
+			if( (aGlyphId == 0) && pFont->IsSymbolFont() )
 			{
 				// #i12824# emulate symbol aliasing U+FXXX <-> U+0XXX
 				cChar = (cChar & 0xF000) ? (cChar & 0x00FF) : (cChar | 0xF000);
-				nGlyphIdx = ::MapChar( aSftTTF.get(), cChar, bVertical );
+				aGlyphId = ::MapChar( aSftTTF.get(), cChar, bVertical );
 			}
 		}
-		aShortIDs[i] = static_cast<USHORT>( nGlyphIdx );
-		if( !nGlyphIdx )
+		aShortIDs[i] = static_cast<USHORT>( aGlyphId );
+		if( !aGlyphId )
 			if( nNotDef < 0 )
 				nNotDef = i; // first NotDef glyph found
 	}

Modified: openoffice/trunk/main/vcl/source/fontsubset/cff.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/fontsubset/cff.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/fontsubset/cff.cxx (original)
+++ openoffice/trunk/main/vcl/source/fontsubset/cff.cxx Mon Dec 16 16:07:41 2013
@@ -28,7 +28,7 @@
 #include <cstring>
 #include <assert.h>
 
-#include <fontsubset.hxx>
+#include "fontsubset.hxx"
 
 #include <vcl/strhelper.hxx>
 
@@ -358,7 +358,7 @@ class SubsetterContext
 public:
 	virtual ~SubsetterContext( void);
 	virtual bool emitAsType1( class Type1Emitter&,
-				const long* pGlyphIDs, const U8* pEncoding,
+				const sal_GlyphId* pGlyphIds, const U8* pEncoding,
 				GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ) = 0;
 };
 
@@ -383,7 +383,7 @@ public:
 
 	void	initialCffRead( void);
 	bool	emitAsType1( class Type1Emitter&,
-				const long* pGlyphIDs, const U8* pEncoding,
+				const sal_GlyphId* pGlyphIds, const U8* pEncoding,
 				GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& );
 
 	// used by charstring converter
@@ -2081,7 +2081,7 @@ void Type1Emitter::emitValVector( const 
 // --------------------------------------------------------------------
 
 bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
-	const long* pReqGlyphIDs, const U8* pReqEncoding,
+	const sal_GlyphId* pReqGlyphIds, const U8* pReqEncoding,
 	GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rFSInfo)
 {
 	// prepare some fontdirectory details
@@ -2163,7 +2163,7 @@ bool CffSubsetterContext::emitAsType1( T
 		"/Encoding 256 array\n"
 		"0 1 255 {1 index exch /.notdef put} for\n");
 	for( int i = 1; (i < nGlyphCount) && (i < 256); ++i) {
-		const char* pGlyphName = getGlyphName( pReqGlyphIDs[i]);
+		const char* pGlyphName = getGlyphName( pReqGlyphIds[i]);
 		pOut += sprintf( pOut, "dup %d /%s put\n", pReqEncoding[i], pGlyphName);
 	}
 	pOut += sprintf( pOut, "readonly def\n");
@@ -2314,20 +2314,20 @@ bool CffSubsetterContext::emitAsType1( T
 		"2 index /CharStrings %d dict dup begin\n", nGlyphCount);
 	rEmitter.emitAllCrypted();
 	for( int i = 0; i < nGlyphCount; ++i) {
-		const int nGlyphId = pReqGlyphIDs[i];
-		assert( (nGlyphId >= 0) && (nGlyphId < mnCharStrCount));
+		const int nCffGlyphId = pReqGlyphIds[i];
+		assert( (nCffGlyphId >= 0) && (nCffGlyphId < mnCharStrCount));
 		// get privdict context matching to the glyph
-		const int nFDSelect = getFDSelect( nGlyphId);
+		const int nFDSelect = getFDSelect( nCffGlyphId);
 		if( nFDSelect < 0)
 			continue;
 		mpCffLocal = &maCffLocal[ nFDSelect];
 		// convert the Type2op charstring to its Type1op counterpart
-		const int nT2Len = seekIndexData( mnCharStrBase, nGlyphId);
+		const int nT2Len = seekIndexData( mnCharStrBase, nCffGlyphId);
 		assert( nT2Len > 0);
 		U8 aType1Ops[ MAX_T1OPS_SIZE]; // TODO: dynamic allocation
 		const int nT1Len = convert2Type1Ops( mpCffLocal, mpReadPtr, nT2Len, aType1Ops);
 		// get the glyph name
-		const char* pGlyphName = getGlyphName( nGlyphId);
+		const char* pGlyphName = getGlyphName( nCffGlyphId);
 		// emit the encrypted Type1op charstring
 		pOut += sprintf( pOut, "/%s %d RD ", pGlyphName, nT1Len);
 		memcpy( pOut, aType1Ops, nT1Len);

Modified: openoffice/trunk/main/vcl/source/fontsubset/fontsubset.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/fontsubset/fontsubset.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/fontsubset/fontsubset.cxx (original)
+++ openoffice/trunk/main/vcl/source/fontsubset/fontsubset.cxx Mon Dec 16 16:07:41 2013
@@ -77,7 +77,7 @@ bool FontSubsetInfo::LoadFont( vcl::_Tru
 bool FontSubsetInfo::CreateFontSubset(
 	int nReqFontTypeMask,
 	FILE* pOutFile, const char* pReqFontName,
-	const long* pReqGlyphIds, const sal_uInt8* pReqEncodedIds, int nReqGlyphCount,
+	const sal_GlyphId* pReqGlyphIds, const sal_uInt8* pReqEncodedIds, int nReqGlyphCount,
 	sal_Int32* pOutGlyphWidths)
 {
 	// prepare request details needed by all underlying subsetters

Modified: openoffice/trunk/main/vcl/source/gdi/outdev3.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/gdi/outdev3.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/gdi/outdev3.cxx (original)
+++ openoffice/trunk/main/vcl/source/gdi/outdev3.cxx Mon Dec 16 16:07:41 2013
@@ -4165,12 +4165,12 @@ void OutputDevice::ImplDrawTextLines( Sa
         for( int nStart = 0;;)
         {
             // iterate through the layouted glyphs
-            sal_GlyphId nGlyphIndex;
-            if( !rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) )
+            sal_GlyphId aGlyphId;
+            if( !rSalLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
                 break;
 
             // calculate the boundaries of each word
-            if( !rSalLayout.IsSpacingGlyph( nGlyphIndex ) )
+            if( !rSalLayout.IsSpacingGlyph( aGlyphId ) )
             {
                 if( !nWidth )
                 {
@@ -4490,14 +4490,14 @@ void OutputDevice::ImplDrawEmphasisMarks
     Rectangle aRectangle;
     for( int nStart = 0;;)
     {
-        sal_GlyphId nGlyphIndex;
-        if( !rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aOutPoint, nStart ) )
+        sal_GlyphId aGlyphId;
+        if( !rSalLayout.GetNextGlyphs( 1, &aGlyphId, aOutPoint, nStart ) )
             break;
 
-        if( !mpGraphics->GetGlyphBoundRect( nGlyphIndex, aRectangle ) )
+        if( !mpGraphics->GetGlyphBoundRect( aGlyphId, aRectangle ) )
             continue;
 
-        if( !rSalLayout.IsSpacingGlyph( nGlyphIndex ) )
+        if( !rSalLayout.IsSpacingGlyph( aGlyphId ) )
         {
             Point aAdjPoint = aOffset;
             aAdjPoint.X() += aRectangle.Left() + (aRectangle.GetWidth() - nEmphasisWidth) / 2;

Modified: openoffice/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx (original)
+++ openoffice/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx Mon Dec 16 16:07:41 2013
@@ -3155,12 +3155,12 @@ std::map< sal_Int32, sal_Int32 > PDFWrit
         
         OUString aTmpName;
         osl_createTempFile( NULL, NULL, &aTmpName.pData );
-        sal_Int32 pGlyphIDs[ 256 ];
+        sal_GlyphId aGlyphIds[ 256 ];
         sal_uInt8 pEncoding[ 256 ];
         sal_Ucs   pUnicodes[ 256 ];
         sal_Int32 pDuWidths[ 256 ];
         
-        memset( pGlyphIDs, 0, sizeof( pGlyphIDs ) );
+        memset( aGlyphIds, 0, sizeof( aGlyphIds ) );
         memset( pEncoding, 0, sizeof( pEncoding ) );
         memset( pUnicodes, 0, sizeof( pUnicodes ) );
         memset( pDuWidths, 0, sizeof( pDuWidths ) );
@@ -3169,12 +3169,12 @@ std::map< sal_Int32, sal_Int32 > PDFWrit
         {
             pUnicodes[c] = c;
             pEncoding[c] = c;
-            pGlyphIDs[c] = 0;
+            aGlyphIds[c] = 0;
             if( aUnicodeMap.find( c ) != aUnicodeMap.end() )
                 pWidths[ c ] = aGlyphWidths[ aUnicodeMap[ c ] ];
         }
         
-        m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, pFont, pGlyphIDs, pEncoding, pDuWidths, 256, aInfo );
+        m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, pFont, aGlyphIds, pEncoding, pDuWidths, 256, aInfo );
         osl_removeFile( aTmpName.pData );
     }
     else
@@ -4051,7 +4051,7 @@ bool PDFWriterImpl::emitFonts()
     {
         for( FontEmitList::iterator lit = it->second.m_aSubsets.begin(); lit != it->second.m_aSubsets.end(); ++lit )
         {
-            sal_Int32 pGlyphIDs[ 256 ];
+            sal_GlyphId aGlyphIds[ 256 ];
             sal_Int32 pWidths[ 256 ];
             sal_uInt8 pEncoding[ 256 ];
             sal_Int32 pEncToUnicodeIndex[ 256 ];
@@ -4062,7 +4062,7 @@ bool PDFWriterImpl::emitFonts()
             // fill arrays and prepare encoding index map
             sal_Int32 nToUnicodeStream = 0;
             
-            rtl_zeroMemory( pGlyphIDs, sizeof( pGlyphIDs ) );
+            rtl_zeroMemory( aGlyphIds, sizeof( aGlyphIds ) );
             rtl_zeroMemory( pEncoding, sizeof( pEncoding ) );
             rtl_zeroMemory( pUnicodesPerGlyph, sizeof( pUnicodesPerGlyph ) );
             rtl_zeroMemory( pEncToUnicodeIndex, sizeof( pEncToUnicodeIndex ) );
@@ -4070,10 +4070,10 @@ bool PDFWriterImpl::emitFonts()
             {
                 sal_uInt8 nEnc = fit->second.getGlyphId();
                 
-                DBG_ASSERT( pGlyphIDs[nEnc] == 0 && pEncoding[nEnc] == 0, "duplicate glyph" );
+                DBG_ASSERT( aGlyphIds[nEnc] == 0 && pEncoding[nEnc] == 0, "duplicate glyph" );
                 DBG_ASSERT( nEnc <= lit->m_aMapping.size(), "invalid glyph encoding" );
                 
-                pGlyphIDs[ nEnc ] = fit->first;
+                aGlyphIds[ nEnc ] = fit->first;
                 pEncoding[ nEnc ] = nEnc;
                 pEncToUnicodeIndex[ nEnc ] = static_cast<sal_Int32>(aUnicodes.size());
                 pUnicodesPerGlyph[ nEnc ] = fit->second.countCodes();
@@ -4089,7 +4089,7 @@ bool PDFWriterImpl::emitFonts()
                 }
             }
             FontSubsetInfo aSubsetInfo;
-            if( m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, it->first, pGlyphIDs, pEncoding, pWidths, nGlyphs, aSubsetInfo ) )
+            if( m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, it->first, aGlyphIds, pEncoding, pWidths, nGlyphs, aSubsetInfo ) )
             {
                 // create font stream
                 oslFileHandle aFontFile;
@@ -7575,11 +7575,11 @@ void PDFWriterImpl::drawLayout( SalLayou
             sal_Int32 nWidth = 0, nAdvance=0;
             for( int nStart = 0;;)
             {
-                sal_GlyphId nGlyphIndex;
-                if( !rLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) )
+                sal_GlyphId aGlyphId;
+                if( !rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
                     break;
 
-                if( !rLayout.IsSpacingGlyph( nGlyphIndex ) )
+                if( !rLayout.IsSpacingGlyph( aGlyphId ) )
                 {
                     if( !nWidth )
                         aStartPt = aPos;
@@ -7674,12 +7674,12 @@ void PDFWriterImpl::drawLayout( SalLayou
         for( int nStart = 0;;)
         {
             Point aPos;
-            sal_GlyphId nGlyphIndex;
+            sal_GlyphId aGlyphId;
             sal_Int32 nAdvance;
-            if( !rLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) )
+            if( !rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
                 break;
 
-            if( !rLayout.IsSpacingGlyph( nGlyphIndex ) )
+            if( !rLayout.IsSpacingGlyph( aGlyphId ) )
             {
                 Point aAdjOffset = aOffset;
                 aAdjOffset.X() += (nAdvance - nEmphWidth) / 2;

Modified: openoffice/trunk/main/vcl/source/gdi/sallayout.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/gdi/sallayout.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/gdi/sallayout.cxx (original)
+++ openoffice/trunk/main/vcl/source/gdi/sallayout.cxx Mon Dec 16 16:07:41 2013
@@ -949,10 +949,10 @@ bool SalLayout::IsSpacingGlyph( sal_Glyp
 
 // -----------------------------------------------------------------------
 
-const ImplFontData* SalLayout::GetFallbackFontData( sal_GlyphId /*nGlyphId*/ ) const
+const ImplFontData* SalLayout::GetFallbackFontData( sal_GlyphId /*aGlyphId*/ ) const
 {
 #if 0
-    int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT
+    int nFallbackLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT
     assert( nFallbackLevel == 0 );
 #endif
     return NULL;
@@ -1363,7 +1363,7 @@ void GenericSalLayout::KashidaJustify( l
         if( !pG1->IsRTLGlyph() )
             continue;
         // no kashida-injection for blank justified expansion either
-        if( IsSpacingGlyph( pG1->mnGlyphIndex ) )
+        if( IsSpacingGlyph( pG1->maGlyphId ) )
             continue;
 
         // calculate gap, ignore if too small
@@ -1391,7 +1391,7 @@ void GenericSalLayout::KashidaJustify( l
         if( !pG1->IsRTLGlyph() )
             continue;
         // no kashida-injection for blank justified expansion either
-        if( IsSpacingGlyph( pG1->mnGlyphIndex ) )
+        if( IsSpacingGlyph( pG1->maGlyphId ) )
             continue;
 
         // calculate gap, skip if too small
@@ -1513,12 +1513,12 @@ int GenericSalLayout::GetNextGlyphs( int
     // find more glyphs which can be merged into one drawing instruction
     int nCount = 0;
     long nYPos = pG->maLinearPos.Y();
-    long nOldFlags = pG->mnGlyphIndex;
+    long nOldFlags = pG->maGlyphId;
     for(;;)
     {
         // update return data with glyph info
         ++nCount;
-        *(pGlyphs++) = pG->mnGlyphIndex;
+        *(pGlyphs++) = pG->maGlyphId;
         if( pCharPosAry )
             *(pCharPosAry++) = pG->mnCharPos;
         if( pGlyphAdvAry )
@@ -1557,10 +1557,10 @@ int GenericSalLayout::GetNextGlyphs( int
             break;
 
         // stop when glyph flags change
-        if( (nOldFlags ^ pG->mnGlyphIndex) & GF_FLAGMASK )
+        if( (nOldFlags ^ pG->maGlyphId) & GF_FLAGMASK )
             break;
 
-        nOldFlags = pG->mnGlyphIndex; // &GF_FLAGMASK not needed for test above
+        nOldFlags = pG->maGlyphId; // &GF_FLAGMASK not needed for test above
     }
 
     aRelativePos.X() /= mnUnitsPerPixel;
@@ -1601,7 +1601,7 @@ void GenericSalLayout::DropGlyph( int nS
     if( nStart >= mnGlyphCount )
         return;
     GlyphItem* pG = mpGlyphItems + nStart;
-    pG->mnGlyphIndex = GF_DROPPED;
+    pG->maGlyphId = GF_DROPPED;
     pG->mnCharPos = -1;
 }
 
@@ -1617,7 +1617,7 @@ void GenericSalLayout::Simplify( bool bI
     const GlyphItem* pGEnd = mpGlyphItems + mnGlyphCount;
     for(; pGSrc < pGEnd; ++pGSrc )
     {
-        if( pGSrc->mnGlyphIndex == nDropMarker )
+        if( pGSrc->maGlyphId == nDropMarker )
             continue;
         if( pGDst != pGSrc )
             *pGDst = *pGSrc;
@@ -2097,9 +2097,9 @@ void MultiSalLayout::InitFont() const
 
 // -----------------------------------------------------------------------
 
-const ImplFontData* MultiSalLayout::GetFallbackFontData( sal_GlyphId nGlyphId ) const
+const ImplFontData* MultiSalLayout::GetFallbackFontData( sal_GlyphId aGlyphId ) const
 {
-    int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
+    int nFallbackLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
     return mpFallbackFonts[ nFallbackLevel ];
 }
 

Modified: openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx (original)
+++ openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx Mon Dec 16 16:07:41 2013
@@ -1080,13 +1080,13 @@ void FreetypeServerFont::FetchFontMetric
 
 // -----------------------------------------------------------------------
 
-static inline void SplitGlyphFlags( const FreetypeServerFont& rFont, int& nGlyphIndex, int& nGlyphFlags )
+static inline void SplitGlyphFlags( const FreetypeServerFont& rFont, sal_GlyphId& rGlyphId, int& nGlyphFlags )
 {
-    nGlyphFlags = nGlyphIndex & GF_FLAGMASK;
-    nGlyphIndex &= GF_IDXMASK;
+    nGlyphFlags = rGlyphId & GF_FLAGMASK;
+    rGlyphId &= GF_IDXMASK;
 
-    if( nGlyphIndex & GF_ISCHAR )
-        nGlyphIndex = rFont.GetRawGlyphIndex( nGlyphIndex );
+    if( rGlyphId & GF_ISCHAR )
+        rGlyphId = rFont.GetRawGlyphIndex( rGlyphId );
 }
 
 // -----------------------------------------------------------------------
@@ -1174,7 +1174,7 @@ int FreetypeServerFont::ApplyGlyphTransf
 
 // -----------------------------------------------------------------------
 
-int FreetypeServerFont::GetRawGlyphIndex( sal_UCS4 aChar ) const
+sal_GlyphId FreetypeServerFont::GetRawGlyphIndex( sal_UCS4 aChar ) const
 {
     if( mpFontInfo->IsSymbolFont() )
     {
@@ -1232,12 +1232,12 @@ int FreetypeServerFont::GetRawGlyphIndex
         mpFontInfo->CacheGlyphIndex( aChar, nGlyphIndex );
     }
 
-    return nGlyphIndex;
+    return sal_GlyphId( nGlyphIndex);
 }
 
 // -----------------------------------------------------------------------
 
-int FreetypeServerFont::FixupGlyphIndex( int nGlyphIndex, sal_UCS4 aChar ) const
+sal_GlyphId FreetypeServerFont::FixupGlyphIndex( sal_GlyphId aGlyphId, sal_UCS4 aChar ) const
 {
     int nGlyphFlags = GF_NONE;
 
@@ -1246,21 +1246,21 @@ int FreetypeServerFont::FixupGlyphIndex(
     if( GetFontSelData().mbVertical )
     {
         // TODO: rethink when GSUB is used for non-vertical case
-        GlyphSubstitution::const_iterator it = maGlyphSubstitution.find( nGlyphIndex );
+        GlyphSubstitution::const_iterator it = maGlyphSubstitution.find( aGlyphId );
         if( it == maGlyphSubstitution.end() )
         {
-            int nTemp = GetVerticalChar( aChar );
+            sal_GlyphId nTemp = GetVerticalChar( aChar );
             if( nTemp ) // is substitution possible
                 nTemp = GetRawGlyphIndex( nTemp );
             if( nTemp ) // substitute manually if sensible
-                nGlyphIndex = nTemp | (GF_GSUB | GF_ROTL);
+                aGlyphId = nTemp | (GF_GSUB | GF_ROTL);
             else
                 nGlyphFlags |= GetVerticalFlags( aChar );
         }
         else
         {
             // for vertical GSUB also compensate for nOrientation=2700
-            nGlyphIndex = (*it).second;
+            aGlyphId = (*it).second;
             nGlyphFlags |= GF_GSUB | GF_ROTL;
         }
     }
@@ -1276,20 +1276,20 @@ int FreetypeServerFont::FixupGlyphIndex(
     }
 #endif
 
-    if( nGlyphIndex != 0 )
-        nGlyphIndex |= nGlyphFlags;
+    if( aGlyphId != 0 )
+        aGlyphId |= nGlyphFlags;
 
-    return nGlyphIndex;
+    return aGlyphId;
 }
 
 
 // -----------------------------------------------------------------------
 
-int FreetypeServerFont::GetGlyphIndex( sal_UCS4 aChar ) const
+sal_GlyphId FreetypeServerFont::GetGlyphIndex( sal_UCS4 aChar ) const
 {
-    int nGlyphIndex = GetRawGlyphIndex( aChar );
-    nGlyphIndex = FixupGlyphIndex( nGlyphIndex, aChar );
-    return nGlyphIndex;
+    sal_GlyphId aGlyphId = GetRawGlyphIndex( aChar );
+    aGlyphId = FixupGlyphIndex( aGlyphId, aChar );
+    return aGlyphId;
 }
 
 // -----------------------------------------------------------------------
@@ -1313,13 +1313,13 @@ static int lcl_GetCharWidth( FT_FaceRec_
 
 // -----------------------------------------------------------------------
 
-void FreetypeServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
+void FreetypeServerFont::InitGlyphData( sal_GlyphId aGlyphId, GlyphData& rGD ) const
 {
     if( maSizeFT )
         pFTActivateSize( maSizeFT );
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     int nLoadFlags = mnLoadFlags;
 
@@ -1332,7 +1332,7 @@ void FreetypeServerFont::InitGlyphData( 
     // => first we have to try without hinting
     if( (nLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP)) == 0 )
     {
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags|FT_LOAD_NO_HINTING );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags|FT_LOAD_NO_HINTING );
         if( (rc==FT_Err_Ok) && (maFaceFT->glyph->format!=FT_GLYPH_FORMAT_BITMAP) )
             rc = -1; // mark as "loading embedded bitmap" was unsuccessful
         nLoadFlags |= FT_LOAD_NO_BITMAP;
@@ -1340,7 +1340,7 @@ void FreetypeServerFont::InitGlyphData( 
 
     if( rc != FT_Err_Ok )
 #endif
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
 
     if( rc != FT_Err_Ok )
     {
@@ -1393,13 +1393,13 @@ bool FreetypeServerFont::GetAntialiasAdv
 
 // -----------------------------------------------------------------------
 
-bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap ) const
+bool FreetypeServerFont::GetGlyphBitmap1( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap ) const
 {
     if( maSizeFT )
         pFTActivateSize( maSizeFT );
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     FT_Int nLoadFlags = mnLoadFlags;
     // #i70930# force mono-hinting for monochrome text
@@ -1428,7 +1428,7 @@ bool FreetypeServerFont::GetGlyphBitmap1
     // => first we have to try without hinting
     if( (nLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP)) == 0 )
     {
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags|FT_LOAD_NO_HINTING );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags|FT_LOAD_NO_HINTING );
         if( (rc==FT_Err_Ok) && (maFaceFT->glyph->format != FT_GLYPH_FORMAT_BITMAP) )
             rc = -1; // mark as "loading embedded bitmap" was unsuccessful
         nLoadFlags |= FT_LOAD_NO_BITMAP;
@@ -1436,7 +1436,7 @@ bool FreetypeServerFont::GetGlyphBitmap1
 
     if( rc != FT_Err_Ok )
 #endif
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
     if( rc != FT_Err_Ok )
         return false;
 
@@ -1567,13 +1567,13 @@ bool FreetypeServerFont::GetGlyphBitmap1
 
 // -----------------------------------------------------------------------
 
-bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap ) const
+bool FreetypeServerFont::GetGlyphBitmap8( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap ) const
 {
     if( maSizeFT )
         pFTActivateSize( maSizeFT );
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     FT_Int nLoadFlags = mnLoadFlags;
 
@@ -1597,7 +1597,7 @@ bool FreetypeServerFont::GetGlyphBitmap8
     // => first we have to try without hinting
     if( (nLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP)) == 0 )
     {
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags|FT_LOAD_NO_HINTING );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags|FT_LOAD_NO_HINTING );
         if( (rc==FT_Err_Ok) && (maFaceFT->glyph->format != FT_GLYPH_FORMAT_BITMAP) )
             rc = -1; // mark as "loading embedded bitmap" was unsuccessful
         nLoadFlags |= FT_LOAD_NO_BITMAP;
@@ -1605,7 +1605,7 @@ bool FreetypeServerFont::GetGlyphBitmap8
 
     if( rc != FT_Err_Ok )
 #endif
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
 
     if( rc != FT_Err_Ok )
         return false;
@@ -2273,7 +2273,7 @@ static int FT_cubic_to( FT_Vector_CPtr p
 
 // -----------------------------------------------------------------------
 
-bool FreetypeServerFont::GetGlyphOutline( int nGlyphIndex,
+bool FreetypeServerFont::GetGlyphOutline( sal_GlyphId aGlyphId,
     ::basegfx::B2DPolyPolygon& rB2DPolyPoly ) const
 {
     if( maSizeFT )
@@ -2282,7 +2282,7 @@ bool FreetypeServerFont::GetGlyphOutline
     rB2DPolyPoly.clear();
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     FT_Int nLoadFlags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_TRANSFORM;
 
@@ -2292,7 +2292,7 @@ bool FreetypeServerFont::GetGlyphOutline
         nLoadFlags |= FT_LOAD_TARGET_LIGHT;
 #endif
 
-    FT_Error rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+    FT_Error rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
     if( rc != FT_Err_Ok )
         return false;
 

Modified: openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.hxx (original)
+++ openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.hxx Mon Dec 16 16:07:41 2013
@@ -184,14 +184,14 @@ public:
     virtual void                FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
     virtual const ImplFontCharMap* GetImplFontCharMap( void ) const;
 
-    virtual int                 GetGlyphIndex( sal_UCS4 ) const;
-    int                         GetRawGlyphIndex( sal_UCS4 ) const;
-    int                         FixupGlyphIndex( int nGlyphIndex, sal_UCS4 ) const;
+    virtual sal_GlyphId         GetGlyphIndex( sal_UCS4 ) const;
+    sal_GlyphId                 GetRawGlyphIndex( sal_UCS4 ) const;
+    sal_GlyphId                 FixupGlyphIndex( sal_GlyphId, sal_UCS4 ) const;
 
     virtual bool                GetAntialiasAdvice( void ) const;
-    virtual bool                GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
-    virtual bool                GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
-    virtual bool                GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const;
+    virtual bool                GetGlyphBitmap1( sal_GlyphId, RawBitmap& ) const;
+    virtual bool                GetGlyphBitmap8( sal_GlyphId, RawBitmap& ) const;
+    virtual bool                GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& ) const;
     virtual int                 GetGlyphKernValue( int nLeftGlyph, int nRightGlyph ) const;
     virtual sal_uLong               GetKernPairs( ImplKernPairData** ) const;
 
@@ -204,7 +204,7 @@ protected:
     friend class GlyphCache;
 
     int                         ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_*, bool ) const;
-    virtual void                InitGlyphData( int nGlyphIndex, GlyphData& ) const;
+    virtual void                InitGlyphData( sal_GlyphId, GlyphData& ) const;
     bool                        ApplyGSUB( const ImplFontSelectData& );
     virtual ServerFontLayoutEngine* GetLayoutEngine();
 

Modified: openoffice/trunk/main/vcl/source/glyphs/gcach_layout.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/glyphs/gcach_layout.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/glyphs/gcach_layout.cxx (original)
+++ openoffice/trunk/main/vcl/source/glyphs/gcach_layout.cxx Mon Dec 16 16:07:41 2013
@@ -99,7 +99,7 @@ bool ServerFontLayoutEngine::operator()(
     FreetypeServerFont& rFont = static_cast<FreetypeServerFont&>(rLayout.GetServerFont());
 
     Point aNewPos( 0, 0 );
-    int nOldGlyphId = -1;
+    sal_GlyphId nOldGlyphId( GF_DROPPED);
     int nGlyphWidth = 0;
     GlyphItem aPrevItem;
     bool bRightToLeft;
@@ -116,9 +116,9 @@ bool ServerFontLayoutEngine::operator()(
 
         if( bRightToLeft )
             cChar = GetMirroredChar( cChar );
-        int nGlyphIndex = rFont.GetGlyphIndex( cChar );
+        sal_GlyphId aGlyphId = rFont.GetGlyphIndex( cChar );
         // when glyph fallback is needed update LayoutArgs
-        if( !nGlyphIndex ) {
+        if( !aGlyphId ) {
             rArgs.NeedFallback( nCharPos, bRightToLeft );
 	    if( cChar >= 0x10000 ) // handle surrogate pairs
                 rArgs.NeedFallback( nCharPos+1, bRightToLeft );
@@ -127,26 +127,26 @@ bool ServerFontLayoutEngine::operator()(
         // apply pair kerning to prev glyph if requested
         if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags )
         {
-            int nKernValue = rFont.GetGlyphKernValue( nOldGlyphId, nGlyphIndex );
+            int nKernValue = rFont.GetGlyphKernValue( nOldGlyphId, aGlyphId );
             nGlyphWidth += nKernValue;
             aPrevItem.mnNewWidth = nGlyphWidth;
         }
 
         // finish previous glyph
-        if( nOldGlyphId >= 0 )
+        if( nOldGlyphId != GF_DROPPED )
             rLayout.AppendGlyph( aPrevItem );
         aNewPos.X() += nGlyphWidth;
 
         // prepare GlyphItem for appending it in next round
-        nOldGlyphId = nGlyphIndex;
-        const GlyphMetric& rGM = rFont.GetGlyphMetric( nGlyphIndex );
+        nOldGlyphId = aGlyphId;
+        const GlyphMetric& rGM = rFont.GetGlyphMetric( aGlyphId );
         nGlyphWidth = rGM.GetCharWidth();
         int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0;
-        aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth );
+        aPrevItem = GlyphItem( nCharPos, aGlyphId, aNewPos, nGlyphFlags, nGlyphWidth );
     }
 
     // append last glyph item if any
-    if( nOldGlyphId >= 0 )
+    if( nOldGlyphId != GF_DROPPED )
         rLayout.AppendGlyph( aPrevItem );
 
     return true;

Modified: openoffice/trunk/main/vcl/source/glyphs/glyphcache.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/glyphs/glyphcache.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/glyphs/glyphcache.cxx (original)
+++ openoffice/trunk/main/vcl/source/glyphs/glyphcache.cxx Mon Dec 16 16:07:41 2013
@@ -384,9 +384,9 @@ void GlyphCache::GrowNotify()
 
 // -----------------------------------------------------------------------
 
-inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGlyphIndex )
+inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, sal_GlyphId aGlyphId )
 {
-    mrPeer.RemovingGlyph( rSF, rGD, nGlyphIndex );
+    mrPeer.RemovingGlyph( rSF, rGD, aGlyphId );
     mnBytesUsed -= sizeof( GlyphData );
     --mnGlyphCount;
 }
@@ -451,10 +451,10 @@ long ServerFont::Release() const
 
 // -----------------------------------------------------------------------
 
-GlyphData& ServerFont::GetGlyphData( int nGlyphIndex )
+GlyphData& ServerFont::GetGlyphData( sal_GlyphId aGlyphId )
 {
     // usually the GlyphData is cached
-    GlyphList::iterator it = maGlyphList.find( nGlyphIndex );
+    GlyphList::iterator it = maGlyphList.find( aGlyphId );
     if( it != maGlyphList.end() ) {
         GlyphData& rGlyphData = it->second;
         GlyphCache::GetInstance().UsingGlyph( *this, rGlyphData );
@@ -462,9 +462,9 @@ GlyphData& ServerFont::GetGlyphData( int
     }
 
     // sometimes not => we need to create and initialize it ourselves
-    GlyphData& rGlyphData = maGlyphList[ nGlyphIndex ];
+    GlyphData& rGlyphData = maGlyphList[ aGlyphId ];
     mnBytesUsed += sizeof( GlyphData );
-    InitGlyphData( nGlyphIndex, rGlyphData );
+    InitGlyphData( aGlyphId, rGlyphData );
     GlyphCache::GetInstance().AddedGlyph( *this, rGlyphData );
     return rGlyphData;
 }
@@ -503,7 +503,7 @@ Point ServerFont::TransformPoint( const 
     return Point( nX, nY );
 }
 
-bool ServerFont::IsGlyphInvisible( int nGlyphIndex )
+bool ServerFont::IsGlyphInvisible( sal_GlyphId aGlyphId )
 {
     if (!mbCollectedZW)
     {
@@ -512,9 +512,9 @@ bool ServerFont::IsGlyphInvisible( int n
         mbCollectedZW = true;
     }
 
-    if( !nGlyphIndex ) // don't hide the NotDef glyph
+    if( !aGlyphId ) // don't hide the NotDef glyph
         return false;
-    if( (nGlyphIndex == mnZWNJ) || (nGlyphIndex == mnZWJ) )
+    if( (aGlyphId == mnZWNJ) || (aGlyphId == mnZWJ) )
         return true;
 
     return false;

Modified: openoffice/trunk/main/vcl/source/glyphs/graphite_layout.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/glyphs/graphite_layout.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/glyphs/graphite_layout.cxx (original)
+++ openoffice/trunk/main/vcl/source/glyphs/graphite_layout.cxx Mon Dec 16 16:07:41 2013
@@ -955,7 +955,7 @@ long GraphiteLayout::FillDXArray( sal_In
             assert( (mvChar2BaseGlyph[i] == -1) ||
                 ((signed)(mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK) < (signed)mvGlyphs.size()));
             if (mvChar2BaseGlyph[i] != -1 &&
-                mvGlyphs[mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK].mnGlyphIndex == GF_DROPPED)
+                mvGlyphs[mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK].maGlyphId == GF_DROPPED)
             {
                 // when used in MultiSalLayout::GetTextBreak dropped glyphs
                 // must have zero width
@@ -1165,7 +1165,7 @@ void GraphiteLayout::ApplyDXArray(ImplLa
 #endif
             assert((nLastGlyph > -1) && (nLastGlyph < (signed)mvGlyphs.size()));
             mvGlyphs[nLastGlyph].mnNewWidth += nDWidth;
-            if (gi.mnGlyphIndex != GF_DROPPED)
+            if (gi.maGlyphId != GF_DROPPED)
                 mvGlyphs[nLastGlyph].mnNewWidth += nDWidth;
             else
                 nDGlyphOrigin += nDWidth;
@@ -1226,7 +1226,7 @@ void GraphiteLayout::kashidaJustify(std:
             continue;
         }
         // no kashida-injection for blank justified expansion either
-        if( IsSpacingGlyph( (*i).mnGlyphIndex ) )
+        if( IsSpacingGlyph( (*i).maGlyphId ) )
         {
             ++i;
             continue;
@@ -1241,7 +1241,7 @@ void GraphiteLayout::kashidaJustify(std:
         }
         nKashidaCount = 1 + (nGapWidth / nKashidaWidth);
 #ifdef GRLAYOUT_DEBUG
-        printf("inserting %d kashidas at %u\n", nKashidaCount, (*i).mnGlyphIndex);
+        printf("inserting %d kashidas at %u\n", nKashidaCount, (*i).maGlyphId);
 #endif
         GlyphItem glyphItem = *i;
         Point aPos(0, 0);
@@ -1296,7 +1296,7 @@ void GraphiteLayout::GetCaretPositions( 
             int nChar2Base = mvChar2BaseGlyph[nCharSlot] & GLYPH_INDEX_MASK;
             assert((mvChar2BaseGlyph[nCharSlot] > -1) && (nChar2Base < (signed)mvGlyphs.size()));
             GlyphItem gi = mvGlyphs[nChar2Base];
-            if (gi.mnGlyphIndex == GF_DROPPED)
+            if (gi.maGlyphId == GF_DROPPED)
             {
                 continue;
             }
@@ -1412,7 +1412,7 @@ int GraphiteLayout::GetNextGlyphs( int l
   assert(glyph_slot >= 0);
   // Find the first glyph in the substring.
   for (; glyph_slot < signed(mvGlyphs.size()) &&
-          ((mvGlyphs.begin() + glyph_slot)->mnGlyphIndex == GF_DROPPED);
+          ((mvGlyphs.begin() + glyph_slot)->maGlyphId == GF_DROPPED);
           ++glyph_slot) {};
 
   // Update the length
@@ -1448,7 +1448,7 @@ int GraphiteLayout::GetNextGlyphs( int l
      }
      // Copy out this glyphs data.
      ++glyph_slot;
-     *glyph_out++ = glyph_itr->mnGlyphIndex;
+     *glyph_out++ = glyph_itr->maGlyphId;
 
      // Find the actual advance - this must be correct if called from
      // MultiSalLayout::AdjustLayout which requests one glyph at a time.
@@ -1477,13 +1477,13 @@ int GraphiteLayout::GetNextGlyphs( int l
        break;
 
      // Stop if glyph dropped
-     if (glyph_itr->mnGlyphIndex == GF_DROPPED)
+     if (glyph_itr->maGlyphId == GF_DROPPED)
        break;
   }
   int numGlyphs = glyph_slot - glyph_slot_begin;
   // move the next glyph_slot to a glyph that hasn't been dropped
   while (glyph_slot < static_cast<int>(mvGlyphs.size()) &&
-         (mvGlyphs.begin() + glyph_slot)->mnGlyphIndex == GF_DROPPED)
+         (mvGlyphs.begin() + glyph_slot)->maGlyphId == GF_DROPPED)
          ++glyph_slot;
   return numGlyphs;
 }
@@ -1495,7 +1495,7 @@ void GraphiteLayout::MoveGlyph( int nGly
     // needs to be done carefully so the glyph/char maps are maintained
     // If a glyph has been dropped then it wasn't returned by GetNextGlyphs, so
     // the index here may be wrong
-    while ((mvGlyphs[nGlyphIndex].mnGlyphIndex == GF_DROPPED) &&
+    while ((mvGlyphs[nGlyphIndex].maGlyphId == GF_DROPPED) &&
            (nGlyphIndex < (signed)mvGlyphs.size()))
     {
         nGlyphIndex++;
@@ -1522,7 +1522,7 @@ void GraphiteLayout::DropGlyph( int nGly
         return;
 
     GlyphItem & glyph = mvGlyphs[nGlyphIndex];
-    glyph.mnGlyphIndex = GF_DROPPED;
+    glyph.maGlyphId = GF_DROPPED;
 #ifdef GRLAYOUT_DEBUG
     fprintf(grLog(),"Dropped %d\n", nGlyphIndex);
 #endif
@@ -1538,7 +1538,7 @@ void GraphiteLayout::Simplify( bool isBa
   long deltaX = 0;
   while (gi != mvGlyphs.end())
   {
-      if (gi->mnGlyphIndex == dropMarker)
+      if (gi->maGlyphId == dropMarker)
       {
         deltaX += gi->mnNewWidth;
         gi->mnNewWidth = 0;

Modified: openoffice/trunk/main/vcl/unx/generic/fontmanager/fontmanager.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/fontmanager/fontmanager.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/fontmanager/fontmanager.cxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/fontmanager/fontmanager.cxx Mon Dec 16 16:07:41 2013
@@ -3626,7 +3626,7 @@ bool PrintFontManager::createFontSubset(
                                         FontSubsetInfo& rInfo,
                                         fontID nFont,
                                         const OUString& rOutFile,
-                                        sal_Int32* pGlyphIDs,
+                                        sal_GlyphId* pGlyphIds,
                                         sal_uInt8* pNewEncoding,
                                         sal_Int32* pWidths,
                                         int nGlyphs,
@@ -3666,11 +3666,11 @@ bool PrintFontManager::createFontSubset(
         }
         else
         {
-            DBG_ASSERT( !(pGlyphIDs[i] & 0x007f0000), "overlong glyph id" );
+            DBG_ASSERT( !(pGlyphIds[i] & 0x007f0000), "overlong glyph id" );
             DBG_ASSERT( (int)pNewEncoding[i] < nGlyphs, "encoding wrong" );
             DBG_ASSERT( pEnc[pNewEncoding[i]] == 0 && pGID[pNewEncoding[i]] == 0, "duplicate encoded glyph" );
             pEnc[ pNewEncoding[i] ] = pNewEncoding[i];
-            pGID[ pNewEncoding[i] ] = (sal_uInt16)pGlyphIDs[ i ];
+            pGID[ pNewEncoding[i] ] = (sal_uInt16)pGlyphIds[ i ];
             pOldIndex[ pNewEncoding[i] ] = i;
             nChar++;
         }
@@ -3700,9 +3700,9 @@ bool PrintFontManager::createFontSubset(
 	{
 		rInfo.LoadFont( FontSubsetInfo::CFF_FONT, pCffBytes, nCffLength );
 #if 1 // TODO: remove 16bit->long conversion when related methods handle non-16bit glyphids
-		long aRequestedGlyphs[256];
+		sal_GlyphId aRequestedGlyphIds[256];
 		for( int i = 0; i < nGlyphs; ++i )
-			aRequestedGlyphs[i] = pGID[i];
+			aRequestedGlyphIds[i] = pGID[i];
 #endif
 	    // create subset file at requested path
 		FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" );
@@ -3711,7 +3711,7 @@ bool PrintFontManager::createFontSubset(
 		const bool bOK = rInfo.CreateFontSubset(
 			FontSubsetInfo::TYPE1_PFB,
 			pOutFile, pGlyphSetName,
-			aRequestedGlyphs, pEnc, nGlyphs, pWidths );
+			aRequestedGlyphIds, pEnc, nGlyphs, pWidths );
 		fclose( pOutFile );
 		// cleanup before early return
 		CloseTTFont( pTTFont );
@@ -3820,9 +3820,9 @@ void PrintFontManager::getGlyphWidths( f
 							break;
 #endif
 						// get the matching glyph index
-						const sal_uInt32 nGlyphId = aCharMap.GetGlyphIndex( c );
+						const sal_GlyphId aGlyphId = aCharMap.GetGlyphIndex( c );
 						// update the requested map
-						rUnicodeEnc[ (sal_Unicode)c ] = nGlyphId;
+						rUnicodeEnc[ (sal_Unicode)c ] = aGlyphId;
 					}
 				}
 			}

Modified: openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.cxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.cxx Mon Dec 16 16:07:41 2013
@@ -327,7 +327,7 @@ void X11GlyphPeer::RemovingFont( ServerF
 // ---------------------------------------------------------------------------
 
 // notification to clean up GlyphPeer resources for this glyph
-void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyphData, int /*nGlyphIndex*/ )
+void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyphData, sal_GlyphId /*aGlyphId*/ )
 {
     // nothing to do if the GlyphPeer hasn't allocated resources for the glyph
     if( rGlyphData.ExtDataRef().meInfo == INFO_EMPTY )
@@ -364,8 +364,8 @@ void X11GlyphPeer::RemovingGlyph( Server
                     mnBytesUsed -= nHeight * ((nWidth + 7) >> 3);
                 }
                 delete pMSGlyph->mpRawBitmap;
-                // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer();
-                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId );
+                // XRenderGlyph nXRGlyph = (XRenderGlyph)rGlyphData.GetExtPointer();
+                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nXRGlyph );
                 delete[] pMSGlyph; // it was allocated with new char[]
             }
             break;
@@ -384,8 +384,8 @@ void X11GlyphPeer::RemovingGlyph( Server
 
         case INFO_XRENDER:
             {
-                // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer();
-                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId );
+                // XRenderGlyph nXRGlyph = (XRenderGlyph)rGlyphData.GetExtPointer();
+                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nXRGlyph );
                 mnBytesUsed -= nHeight * ((nWidth + 3) & ~3);
             }
             break;
@@ -449,17 +449,17 @@ GlyphSet X11GlyphPeer::GetGlyphSet( Serv
 
 // ---------------------------------------------------------------------------
 
-Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nReqScreen )
+Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, sal_GlyphId aGlyphId, int nReqScreen )
 {
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
+    if( rServerFont.IsGlyphInvisible( aGlyphId ) )
         return None;
 
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
+    GlyphData& rGlyphData = rServerFont.GetGlyphData( aGlyphId );
     Pixmap aPixmap = GetPixmap( rGlyphData, nReqScreen );
     if( aPixmap == NO_PIXMAP )
     {
         aPixmap = None;
-        if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) )
+        if( rServerFont.GetGlyphBitmap1( aGlyphId, maRawBitmap ) )
         {
             // #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163
             sal_uLong nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1;
@@ -541,7 +541,7 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFo
         else
         {
             // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
+            if( aGlyphId != 0 )  // recurse only once
                 aPixmap = GetPixmap( rServerFont, 0, nReqScreen );
 
             if( aPixmap == NO_PIXMAP )
@@ -554,19 +554,18 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFo
 
 // ---------------------------------------------------------------------------
 
-const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
-    int nGlyphIndex )
+const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont, sal_GlyphId aGlyphId )
 {
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
+    if( rServerFont.IsGlyphInvisible( aGlyphId ) )
         return NO_RAWBMP;
 
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
+    GlyphData& rGlyphData = rServerFont.GetGlyphData( aGlyphId );
 
     const RawBitmap* pRawBitmap = GetRawBitmap( rGlyphData );
     if( pRawBitmap == NO_RAWBMP )
     {
         RawBitmap* pNewBitmap = new RawBitmap;
-        if( rServerFont.GetGlyphBitmap8( nGlyphIndex, *pNewBitmap ) )
+        if( rServerFont.GetGlyphBitmap8( aGlyphId, *pNewBitmap ) )
         {
             pRawBitmap = pNewBitmap;
             mnBytesUsed += pNewBitmap->mnScanlineSize * pNewBitmap->mnHeight;
@@ -576,7 +575,7 @@ const RawBitmap* X11GlyphPeer::GetRawBit
         {
             delete pNewBitmap;
             // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
+            if( aGlyphId != 0 )  // recurse only once
                 pRawBitmap = GetRawBitmap( rServerFont, 0 );
         }
 
@@ -588,18 +587,18 @@ const RawBitmap* X11GlyphPeer::GetRawBit
 
 // ---------------------------------------------------------------------------
 
-Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
+XRenderGlyph X11GlyphPeer::GetXRGlyph( ServerFont& rServerFont, sal_GlyphId aGlyphId )
 {
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
+    if( rServerFont.IsGlyphInvisible( aGlyphId ) )
         return NO_GLYPHID;
 
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
+    GlyphData& rGlyphData = rServerFont.GetGlyphData( aGlyphId );
 
-    Glyph aGlyphId = GetRenderGlyph( rGlyphData );
-    if( aGlyphId == NO_GLYPHID )
+    XRenderGlyph nXRGlyph = GetRenderGlyph( rGlyphData );
+    if( nXRGlyph == NO_GLYPHID )
     {
         // prepare GlyphInfo and Bitmap
-        if( rServerFont.GetGlyphBitmap8( nGlyphIndex, maRawBitmap ) )
+        if( rServerFont.GetGlyphBitmap8( aGlyphId, maRawBitmap ) )
         {
             XGlyphInfo aGlyphInfo;
             aGlyphInfo.width    = maRawBitmap.mnWidth;
@@ -617,23 +616,23 @@ Glyph X11GlyphPeer::GetGlyphId( ServerFo
             // upload glyph bitmap to server
             GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 );
 
-            aGlyphId = nGlyphIndex & 0x00FFFFFF;
+            nXRGlyph = aGlyphId & 0x00FFFFFF;
             const sal_uLong nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
-            XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId,
+            XRenderPeer::GetInstance().AddGlyph( aGlyphSet, nXRGlyph,
                 aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes );
             mnBytesUsed += nBytes;
         }
         else
         {
             // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
-                aGlyphId = GetGlyphId( rServerFont, 0 );
+            if( nXRGlyph != 0 )  // recurse only once
+                nXRGlyph = GetXRGlyph( rServerFont, 0 );
         }
 
-        SetRenderGlyph( rGlyphData, aGlyphId );
+        SetRenderGlyph( rGlyphData, nXRGlyph );
     }
 
-    return aGlyphId;
+    return nXRGlyph;
 }
 
 // ===========================================================================