Modified: openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.hxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/gdi/gcach_xpeer.hxx Mon Dec 16 
16:07:41 2013
@@ -32,6 +32,7 @@
 
 class SalDisplay;
 struct MultiScreenGlyph;
+typedef Glyph XRenderGlyph;
 
 class X11GlyphPeer
 : public GlyphCachePeer
@@ -40,24 +41,24 @@ public:
                         X11GlyphPeer();
     virtual            ~X11GlyphPeer();
 
-    Pixmap              GetPixmap( ServerFont&, int nGlyphIndex, int nScreen );
-    const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
+    Pixmap              GetPixmap( ServerFont&, sal_GlyphId, int nScreen );
+    const RawBitmap*    GetRawBitmap( ServerFont&, sal_GlyphId );
     bool                ForcedAntialiasing( const ServerFont&, int nScreen ) 
const;
 
     GlyphSet            GetGlyphSet( ServerFont&, int nScreen );
-    Glyph               GetGlyphId( ServerFont&, int nGlyphIndex );
+    XRenderGlyph        GetXRGlyph( ServerFont&, sal_GlyphId );
 
 protected:
     void                InitAntialiasing();
 
     virtual void        RemovingFont( ServerFont& );
-    virtual void        RemovingGlyph( ServerFont&, GlyphData&, int 
nGlyphIndex );
+    virtual void        RemovingGlyph( ServerFont&, GlyphData&, sal_GlyphId );
 
     MultiScreenGlyph*   PrepareForMultiscreen( ExtGlyphData& ) const;
     void                SetRenderGlyph( GlyphData&, Glyph ) const;
     void                SetRawBitmap( GlyphData&, const RawBitmap* ) const;
     void                SetPixmap( GlyphData&, Pixmap, int nScreen ) const;
-    Glyph               GetRenderGlyph( const GlyphData& ) const;
+    XRenderGlyph        GetRenderGlyph( const GlyphData& ) const;
     const RawBitmap*    GetRawBitmap( const GlyphData& ) const;
     Pixmap              GetPixmap( const GlyphData&, int nScreen ) const;
 

Modified: openoffice/trunk/main/vcl/unx/generic/gdi/pspgraphics.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/gdi/pspgraphics.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/gdi/pspgraphics.cxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/gdi/pspgraphics.cxx Mon Dec 16 
16:07:41 2013
@@ -603,7 +603,7 @@ bool PspFontLayout::LayoutText( ImplLayo
     mbVertical = ((rArgs.mnFlags & SAL_LAYOUT_VERTICAL) != 0);
 
     long nUnitsPerPixel = 1;
-    int nOldGlyphId = -1;
+    sal_GlyphId aOldGlyphId( GF_DROPPED);
     long nGlyphWidth = 0;
     int nCharPos = -1;
     Point aNewPos( 0, 0 );
@@ -622,7 +622,7 @@ bool PspFontLayout::LayoutText( ImplLayo
         if( aFontEnc == RTL_TEXTENCODING_SYMBOL )
             if( cChar < 256 )
                 cChar += 0xf000;
-        int nGlyphIndex = cChar;  // printer glyphs = unicode
+        sal_GlyphId aGlyphId( cChar);  // printer glyphs = unicode
 
         // update fallback_runs if needed
         psp::CharacterMetric aMetric;
@@ -633,13 +633,13 @@ bool PspFontLayout::LayoutText( ImplLayo
         // apply pair kerning to prev glyph if requested
         if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags )
         {
-            if( nOldGlyphId > 0 )
+            if( aOldGlyphId > 0 )
             {
                 const std::list< KernPair >& rKernPairs = 
mrPrinterGfx.getKernPairs(mbVertical);
                 for( std::list< KernPair >::const_iterator it = 
rKernPairs.begin();
                      it != rKernPairs.end(); ++it )
                 {
-                    if( it->first == nOldGlyphId && it->second == nGlyphIndex )
+                    if( (it->first == aOldGlyphId) && (it->second == aGlyphId) 
)
                     {
                         int nTextScale = mrPrinterGfx.GetFontWidth();
                         if( ! nTextScale )
@@ -654,25 +654,25 @@ bool PspFontLayout::LayoutText( ImplLayo
         }
 
         // finish previous glyph
-        if( nOldGlyphId >= 0 )
+        if( aOldGlyphId != GF_DROPPED )
             AppendGlyph( aPrevItem );
-        nOldGlyphId = nGlyphIndex;
+        aOldGlyphId = aGlyphId;
         aNewPos.X() += nGlyphWidth;
 
         // prepare GlyphItem for appending it in next round
         nUnitsPerPixel = mrPrinterGfx.GetCharWidth( cChar, cChar, &nGlyphWidth 
);
         int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0;
-        nGlyphIndex |= GF_ISCHAR;
-        aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, 
nGlyphWidth );
+        aGlyphId |= GF_ISCHAR;
+        aPrevItem = GlyphItem( nCharPos, aGlyphId, aNewPos, nGlyphFlags, 
nGlyphWidth );
     }
 
     // append last glyph item if any
-    if( nOldGlyphId >= 0 )
+    if( aOldGlyphId != GF_DROPPED )
         AppendGlyph( aPrevItem );
 
     SetOrientation( mrPrinterGfx.GetFontAngle() );
     SetUnitsPerPixel( nUnitsPerPixel );
-    return (nOldGlyphId >= 0);
+    return (aOldGlyphId != GF_DROPPED);
 }
 
 class PspServerFontLayout : public ServerFontLayout
@@ -721,7 +721,7 @@ void PspServerFontLayout::InitFont() con
 static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& 
rGfx, bool bIsPspServerFontLayout )
 {
     const int nMaxGlyphs = 200;
-    sal_uInt32 aGlyphAry[ nMaxGlyphs ]; // TODO: use sal_GlyphId
+    sal_GlyphId aGlyphAry[ nMaxGlyphs ];
     sal_Int32   aWidthAry[ nMaxGlyphs ];
     sal_Int32   aIdxAry  [ nMaxGlyphs ];
     sal_Unicode aUnicodes[ nMaxGlyphs ];
@@ -769,15 +769,15 @@ static void DrawPrinterLayout( const Sal
         {
             nXOffset += aWidthAry[ i ];
             aIdxAry[ i ] = nXOffset / nUnitsPerPixel;
-            sal_Int32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK);
+            sal_GlyphId aGlyphId = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK);
             if( pText )
                 aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && 
aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0;
             else
-                aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0;
-            aGlyphAry[i] = nGlyphIdx;
+                aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? aGlyphId : 0;
+            aGlyphAry[i] = aGlyphId;
         }
 
-        rGfx.DrawGlyphs( aPos, (sal_uInt32 *)aGlyphAry, aUnicodes, 
nGlyphCount, aIdxAry );
+        rGfx.DrawGlyphs( aPos, aGlyphAry, aUnicodes, nGlyphCount, aIdxAry );
     }
 }
 
@@ -964,38 +964,36 @@ sal_uLong PspGraphics::GetKernPairs( sal
     return nHavePairs;
 }
 
-sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+bool PspGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
-        return sal_False;
+        return false;
 
     ServerFont* pSF = m_pServerFont[ nLevel ];
     if( !pSF )
-        return sal_False;
+        return false;
 
-    nGlyphIndex &= ~GF_FONTMASK;
-    const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
+    aGlyphId &= ~GF_FONTMASK;
+    const GlyphMetric& rGM = pSF->GetGlyphMetric( aGlyphId );
     rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
-    return sal_True;
+    return true;
 }
 
-sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
+bool PspGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
     ::basegfx::B2DPolyPolygon& rB2DPolyPoly )
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
-        return sal_False;
+        return false;
 
     ServerFont* pSF = m_pServerFont[ nLevel ];
     if( !pSF )
-        return sal_False;
+        return false;
 
-    nGlyphIndex &= ~GF_FONTMASK;
-    if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
-        return sal_True;
-
-    return sal_False;
+    aGlyphId &= ~GF_FONTMASK;
+    bool bOK = pSF->GetGlyphOutline( aGlyphId, rB2DPolyPoly );
+    return bOK;
 }
 
 SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int 
nFallbackLevel )
@@ -1037,7 +1035,7 @@ SalLayout* PspGraphics::GetTextLayout( I
 sal_Bool PspGraphics::CreateFontSubset(
                                    const rtl::OUString& rToFile,
                                    const ImplFontData* pFont,
-                                   sal_Int32* pGlyphIDs,
+                                   sal_GlyphId* pGlyphIds,
                                    sal_uInt8* pEncoding,
                                    sal_Int32* pWidths,
                                    int nGlyphCount,
@@ -1055,7 +1053,7 @@ sal_Bool PspGraphics::CreateFontSubset(
     bool bSuccess = rMgr.createFontSubset( rInfo,
                                  aFont,
                                  rToFile,
-                                 pGlyphIDs,
+                                 pGlyphIds,
                                  pEncoding,
                                  pWidths,
                                  nGlyphCount );

Modified: openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/gdi/salgdi3.cxx Mon Dec 16 16:07:41 
2013
@@ -638,7 +638,7 @@ void X11SalGraphics::DrawServerAAFontStr
 
         unsigned int aRenderAry[ MAXGLYPHS ];
         for( int i = 0; i < nGlyphs; ++i )
-             aRenderAry[ i ] = rGlyphPeer.GetGlyphId( rFont, aGlyphAry[i] );
+             aRenderAry[ i ] = rGlyphPeer.GetXRGlyph( rFont, aGlyphAry[i] );
         rRenderPeer.CompositeString32( rEntry.m_aPicture, aDstPic,
            aGlyphSet, aPos.X(), aPos.Y(), aRenderAry, nGlyphs );
     }
@@ -1231,40 +1231,38 @@ X11SalGraphics::GetKernPairs( sal_uLong 
 
 // ---------------------------------------------------------------------------
 
-sal_Bool X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect 
)
+bool X11SalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect 
)
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
-        return sal_False;
+        return false;
 
     ServerFont* pSF = mpServerFont[ nLevel ];
     if( !pSF )
-        return sal_False;
+        return false;
 
-    nGlyphIndex &= ~GF_FONTMASK;
-    const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
+    aGlyphId &= ~GF_FONTMASK;
+    const GlyphMetric& rGM = pSF->GetGlyphMetric( aGlyphId );
     rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
-    return sal_True;
+    return true;
 }
 
 // ---------------------------------------------------------------------------
 
-sal_Bool X11SalGraphics::GetGlyphOutline( long nGlyphIndex,
+bool X11SalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
     ::basegfx::B2DPolyPolygon& rPolyPoly )
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
-        return sal_False;
+        return false;
 
     ServerFont* pSF = mpServerFont[ nLevel ];
     if( !pSF )
-        return sal_False;
-
-    nGlyphIndex &= ~GF_FONTMASK;
-    if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) )
-        return sal_True;
+        return false;
 
-    return sal_False;
+    aGlyphId &= ~GF_FONTMASK;
+    bool bOK = pSF->GetGlyphOutline( aGlyphId, rPolyPoly );
+    return bOK;
 }
 
 //--------------------------------------------------------------------------
@@ -1328,7 +1326,7 @@ SystemFontData X11SalGraphics::GetSysFon
 sal_Bool X11SalGraphics::CreateFontSubset(
                                    const rtl::OUString& rToFile,
                                    const ImplFontData* pFont,
-                                   sal_Int32* pGlyphIDs,
+                                   sal_GlyphId* pGlyphIds,
                                    sal_uInt8* pEncoding,
                                    sal_Int32* pWidths,
                                    int nGlyphCount,
@@ -1346,7 +1344,7 @@ sal_Bool X11SalGraphics::CreateFontSubse
     bool bSuccess = rMgr.createFontSubset( rInfo,
                                  aFont,
                                  rToFile,
-                                 pGlyphIDs,
+                                 pGlyphIds,
                                  pEncoding,
                                  pWidths,
                                  nGlyphCount );

Modified: openoffice/trunk/main/vcl/unx/generic/gdi/xrender_peer.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/gdi/xrender_peer.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/gdi/xrender_peer.hxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/gdi/xrender_peer.hxx Mon Dec 16 
16:07:41 2013
@@ -32,6 +32,8 @@ struct _XTrap; // on some older systems 
 #include <vcl/salgtype.hxx>
 #include <osl/module.h>
 
+typedef Glyph XRenderGlyph;
+
 class XRenderPeer
 {
 public:
@@ -70,9 +72,9 @@ public:
 
     GlyphSet    CreateGlyphSet() const;
     void        FreeGlyphSet( GlyphSet ) const;
-    void        AddGlyph( GlyphSet, Glyph nGlyphId, const XGlyphInfo&,
+    void        AddGlyph( GlyphSet, XRenderGlyph nXRGlyph, const XGlyphInfo&,
                     const char* pBuffer, int nBufSize ) const;
-    void        FreeGlyph( GlyphSet, Glyph nGlyphId ) const;
+    void        FreeGlyph( GlyphSet, XRenderGlyph nXRGlyphId ) const;
     void        CompositeString32( Picture aSrc, Picture aDst, GlyphSet,
                     int nDstX, int nDstY, const unsigned* pText, int nTextLen 
) const;
     void        FillRectangle( int nOp, Picture aDst, const XRenderColor*,
@@ -253,21 +255,21 @@ inline void XRenderPeer::FreeGlyphSet( G
 #endif
 }
 
-inline void XRenderPeer::AddGlyph( GlyphSet aGS, Glyph nGlyphId,
+inline void XRenderPeer::AddGlyph( GlyphSet aGS, XRenderGlyph nXRGlyph,
     const XGlyphInfo& rGI, const char* pBuffer, int nBufSize ) const
 {
 #ifdef XRENDER_LINK
-    XRenderAddGlyphs( mpDisplay, aGS, &nGlyphId, &rGI, 1,
+    XRenderAddGlyphs( mpDisplay, aGS, &nXRGlyph, &rGI, 1,
                       const_cast<char*>(pBuffer), nBufSize );
 #else
-    (*mpXRenderAddGlyphs)( mpDisplay, aGS, &nGlyphId, &rGI, 1,
+    (*mpXRenderAddGlyphs)( mpDisplay, aGS, &nXRGlyph, &rGI, 1,
         const_cast<char*>(pBuffer), nBufSize );
 #endif
 }
 
-inline void XRenderPeer::FreeGlyph( GlyphSet aGS, Glyph nGlyphId ) const
+inline void XRenderPeer::FreeGlyph( GlyphSet aGS, XRenderGlyph nXRGlyph ) const
 {
-    (void)aGS; (void)nGlyphId;
+    (void)aGS; (void)nXRGlyph;
 
     // XRenderFreeGlyphs not implemented yet for version<=0.2
     // #108209# disabled because of crash potential,
@@ -277,9 +279,9 @@ inline void XRenderPeer::FreeGlyph( Glyp
     if( mnRenderVersion >= 0x05 )
     {
 #ifdef XRENDER_LINK
-        XRenderFreeGlyphs( mpDisplay, aGS, &nGlyphId, 1 );
+        XRenderFreeGlyphs( mpDisplay, aGS, &nXRGlyph, 1 );
 #else
-        (*mpXRenderFreeGlyphs)( mpDisplay, aGS, &nGlyphId, 1 );
+        (*mpXRenderFreeGlyphs)( mpDisplay, aGS, &nXRGlyph, 1 );
 #endif
     }
 #endif

Modified: openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.cxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.cxx Mon Dec 16 
16:07:41 2013
@@ -121,7 +121,7 @@ GlyphSet::GetCharID (
 
 sal_Bool
 GlyphSet::GetGlyphID (
-                      sal_uInt32 nGlyph,
+                      sal_GlyphId nGlyph,
                       sal_Unicode nUnicode,
                       sal_uChar* nOutGlyphID,
                       sal_Int32* nOutGlyphSetID
@@ -164,7 +164,7 @@ GlyphSet::LookupCharID (
 
 sal_Bool
 GlyphSet::LookupGlyphID (
-                        sal_uInt32 nGlyph, 
+                        sal_GlyphId nGlyph, 
                         sal_uChar* nOutGlyphID,
                         sal_Int32* nOutGlyphSetID
                         )
@@ -298,7 +298,7 @@ GlyphSet::AddCharID (
 
 sal_Bool
 GlyphSet::AddGlyphID (
-                     sal_uInt32 nGlyph,
+                     sal_GlyphId nGlyph,
                      sal_Unicode nUnicode,
                      sal_uChar* nOutGlyphID,
                      sal_Int32* nOutGlyphSetID
@@ -494,7 +494,7 @@ GlyphSet::GetReencodedFontName (sal_Int3
 void GlyphSet::DrawGlyphs(
                           PrinterGfx& rGfx,
                           const Point& rPoint,
-                          const sal_uInt32* pGlyphIds,
+                          const sal_GlyphId* pGlyphIds,
                           const sal_Unicode* pUnicodes,
                           sal_Int16 nLen,
                           const sal_Int32* pDeltaArray )
@@ -814,7 +814,7 @@ static void CreatePSUploadableFont( True
     std::stable_sort( aSorted.begin(), aSorted.end() );
     
     std::vector< sal_uChar > aEncoding( nGlyphCount );
-    std::vector< long > aRequestedGlyphs( nGlyphCount );
+    std::vector< sal_GlyphId> aRequestedGlyphs( nGlyphCount );
 
     for( int i = 0; i < nGlyphCount; i++ )
     {

Modified: openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.hxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/printergfx/glyphset.hxx Mon Dec 16 
16:07:41 2013
@@ -53,7 +53,7 @@ private:
 
     typedef std::hash_map< sal_Unicode, sal_uInt8 > char_map_t;
     typedef std::list< char_map_t > char_list_t;
-    typedef std::hash_map< sal_uInt32, sal_uInt8 > glyph_map_t;
+    typedef std::hash_map< sal_GlyphId, sal_uInt8 > glyph_map_t;
     typedef std::list< glyph_map_t > glyph_list_t;
 
     char_list_t                maCharList;
@@ -75,11 +75,11 @@ private:
     sal_Bool           AddCharID (sal_Unicode nChar, 
                                 sal_uChar* nOutGlyphID,
                                 sal_Int32* nOutGlyphSetID);
-    sal_Bool           GetGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
+    sal_Bool           GetGlyphID( sal_GlyphId nGlyphId, sal_Unicode nUnicode,
                                                                sal_uChar* 
nOutGlyphID, sal_Int32* nOutGlyphSetID);
-    sal_Bool           LookupGlyphID (sal_uInt32 nGlyph, 
+    sal_Bool           LookupGlyphID( sal_GlyphId nGlyphId,
                                    sal_uChar* nOutGlyphID, sal_Int32* 
nOutGlyphSetID);
-    sal_Bool           AddGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
+    sal_Bool           AddGlyphID (sal_GlyphId nGlyphId, sal_Unicode nUnicode,
                                 sal_uChar* nOutGlyphID,
                                 sal_Int32* nOutGlyphSetID);
     void            AddNotdef (char_map_t &rCharMap);
@@ -116,7 +116,7 @@ public:
                               const sal_Int32* pDeltaArray = NULL);
     void                       DrawGlyphs (PrinterGfx& rGfx,
                                 const Point& rPoint,
-                                const sal_uInt32* pGlyphIds,
+                                const sal_GlyphId* pGlyphIds,
                                 const sal_Unicode* pUnicodes,
                                 sal_Int16 nLen,
                                 const sal_Int32* pDeltaArray );

Modified: openoffice/trunk/main/vcl/unx/generic/printergfx/text_gfx.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/generic/printergfx/text_gfx.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/generic/printergfx/text_gfx.cxx (original)
+++ openoffice/trunk/main/vcl/unx/generic/printergfx/text_gfx.cxx Mon Dec 16 
16:07:41 2013
@@ -164,7 +164,7 @@ PrinterGfx::SetFallbackFont ( sal_Int32 
 
 void PrinterGfx::drawGlyphs(
                             const Point& rPoint,
-                            sal_uInt32* pGlyphIds,
+                            sal_GlyphId* pGlyphIds,
                             sal_Unicode* pUnicodes,
                             sal_Int16 nLen,
                             sal_Int32* pDeltaArray
@@ -233,7 +233,7 @@ void PrinterGfx::DrawGlyphs(
         // vertical glyphs can have an additional rotation ... sigh.
         // so break up text in chunks of normal glyphs and print out
         // specially rotated glyphs extra
-        sal_uInt32* pTempGlyphIds = 
(sal_uInt32*)alloca(sizeof(sal_Int32)*nLen);
+        sal_GlyphId* pTempGlyphIds = 
(sal_GlyphId*)alloca(sizeof(sal_Int32)*nLen);
         sal_Int32* pTempDelta = (sal_Int32*)alloca(sizeof(sal_Int32)*nLen);
         sal_Unicode* pTempUnicodes = 
(sal_Unicode*)alloca(sizeof(sal_Unicode)*nLen);
         sal_Int16 nTempLen = 0;

Modified: openoffice/trunk/main/vcl/unx/headless/svpgdi.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/headless/svpgdi.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/headless/svpgdi.hxx (original)
+++ openoffice/trunk/main/vcl/unx/headless/svpgdi.hxx Mon Dec 16 16:07:41 2013
@@ -94,7 +94,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,
@@ -111,8 +111,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/unx/headless/svppspgraphics.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/headless/svppspgraphics.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/headless/svppspgraphics.cxx (original)
+++ openoffice/trunk/main/vcl/unx/headless/svppspgraphics.cxx Mon Dec 16 
16:07:41 2013
@@ -564,7 +564,7 @@ bool PspFontLayout::LayoutText( ImplLayo
         if( aFontEnc == RTL_TEXTENCODING_SYMBOL )
             if( cChar < 256 )
                 cChar += 0xf000;
-        int nGlyphIndex = cChar;  // printer glyphs = unicode
+        sal_GlyphId aGlyphId( cChar);  // printer glyphs = unicode
 
         // update fallback_runs if needed
         psp::CharacterMetric aMetric;
@@ -581,7 +581,7 @@ bool PspFontLayout::LayoutText( ImplLayo
                 for( std::list< KernPair >::const_iterator it = 
rKernPairs.begin();
                      it != rKernPairs.end(); ++it )
                 {
-                    if( it->first == nOldGlyphId && it->second == nGlyphIndex )
+                    if( it->first == nOldGlyphId && it->second == aGlyphId )
                     {
                         int nTextScale = mrPrinterGfx.GetFontWidth();
                         if( ! nTextScale )
@@ -598,14 +598,14 @@ bool PspFontLayout::LayoutText( ImplLayo
         // finish previous glyph
         if( nOldGlyphId >= 0 )
             AppendGlyph( aPrevItem );
-        nOldGlyphId = nGlyphIndex;
+        nOldGlyphId = aGlyphId;
         aNewPos.X() += nGlyphWidth;
 
         // prepare GlyphItem for appending it in next round
         nUnitsPerPixel = mrPrinterGfx.GetCharWidth( cChar, cChar, &nGlyphWidth 
);
         int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0;
-        nGlyphIndex |= GF_ISCHAR;
-        aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, 
nGlyphWidth );
+        aGlyphId |= GF_ISCHAR;
+        aPrevItem = GlyphItem( nCharPos, aGlyphId, aNewPos, nGlyphFlags, 
nGlyphWidth );
     }
 
     // append last glyph item if any
@@ -685,15 +685,15 @@ static void DrawPrinterLayout( const Sal
         {
             nXOffset += aWidthAry[ i ];
             aIdxAry[ i ] = nXOffset / nUnitsPerPixel;
-            sal_Int32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK);
+            sal_GlyphId aGlyphId = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK);
             if( bIsPspServerFontLayout )
                 aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && 
aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0;
             else
-                aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0;
-            aGlyphAry[i] = nGlyphIdx;
+                aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? aGlyphId : 0;
+            aGlyphAry[i] = aGlyphId;
         }
 
-        rGfx.DrawGlyphs( aPos, (sal_uInt32 *)aGlyphAry, aUnicodes, 
nGlyphCount, aIdxAry );
+        rGfx.DrawGlyphs( aPos, aGlyphAry, aUnicodes, nGlyphCount, aIdxAry );
     }
 }
 
@@ -874,26 +874,26 @@ sal_uLong PspGraphics::GetKernPairs( sal
     return nHavePairs;
 }
 
-sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+bool PspGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
-        return sal_False;
+        return false;
 
     ServerFont* pSF = m_pServerFont[ nLevel ];
     if( !pSF )
-        return sal_False;
+        return false;
 
-    nGlyphIndex &= ~GF_FONTMASK;
-    const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
+    aGlyphId &= ~GF_FONTMASK;
+    const GlyphMetric& rGM = pSF->GetGlyphMetric( aGlyphId );
     rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
-    return sal_True;
+    return true;
 }
 
-sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
+bool PspGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
     ::basegfx::B2DPolyPolygon& rB2DPolyPoly )
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
         return sal_False;
 
@@ -901,11 +901,9 @@ sal_Bool PspGraphics::GetGlyphOutline( l
     if( !pSF )
         return sal_False;
 
-    nGlyphIndex &= ~GF_FONTMASK;
-    if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
-        return sal_True;
-
-    return sal_False;
+    aGlyphId &= ~GF_FONTMASK;
+    bool bOK = pSF->GetGlyphOutline( aGlyphId, rB2DPolyPoly );
+    return bOK;
 }
 
 SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int 
nFallbackLevel )
@@ -933,7 +931,7 @@ SalLayout* PspGraphics::GetTextLayout( I
 sal_Bool PspGraphics::CreateFontSubset(
                                    const rtl::OUString& rToFile,
                                    const ImplFontData* pFont,
-                                   sal_Int32* pGlyphIDs,
+                                   sal_GlyphId* pGlyphIds,
                                    sal_uInt8* pEncoding,
                                    sal_Int32* pWidths,
                                    int nGlyphCount,
@@ -951,7 +949,7 @@ sal_Bool PspGraphics::CreateFontSubset(
     bool bSuccess = rMgr.createFontSubset( rInfo,
                                  aFont,
                                  rToFile,
-                                 pGlyphIDs,
+                                 pGlyphIds,
                                  pEncoding,
                                  pWidths,
                                  nGlyphCount );

Modified: openoffice/trunk/main/vcl/unx/headless/svppspgraphics.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/headless/svppspgraphics.hxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/headless/svppspgraphics.hxx (original)
+++ openoffice/trunk/main/vcl/unx/headless/svppspgraphics.hxx Mon Dec 16 
16:07:41 2013
@@ -113,7 +113,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,
@@ -130,8 +130,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/unx/headless/svptext.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/headless/svptext.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/headless/svptext.cxx (original)
+++ openoffice/trunk/main/vcl/unx/headless/svptext.cxx Mon Dec 16 16:07:41 2013
@@ -52,12 +52,12 @@ class SvpGlyphPeer
 public:
     SvpGlyphPeer() {}
 
-    BitmapDeviceSharedPtr GetGlyphBmp( ServerFont&, int nGlyphIndex,
+    BitmapDeviceSharedPtr GetGlyphBmp( ServerFont&, sal_GlyphId,
                             sal_uInt32 nBmpFormat, B2IPoint& rTargetPos );
 
 protected:
     virtual void    RemovingFont( ServerFont& );
-    virtual void    RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
+    virtual void    RemovingGlyph( ServerFont&, GlyphData&, sal_GlyphId );
 
     class SvpGcpHelper
     {
@@ -90,9 +90,9 @@ SvpGlyphCache& SvpGlyphCache::GetInstanc
 // ===========================================================================
 
 BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
-    int nGlyphIndex, sal_uInt32 nBmpFormat, B2IPoint& rTargetPos )
+    sal_GlyphId aGlyphId, sal_uInt32 nBmpFormat, B2IPoint& rTargetPos )
 {
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
+    GlyphData& rGlyphData = rServerFont.GetGlyphData( aGlyphId );
     SvpGcpHelper* pGcpHelper = (SvpGcpHelper*)rGlyphData.ExtDataRef().mpData;
 
     // nothing to do if the GlyphPeer hasn't allocated resources for the glyph
@@ -107,10 +107,10 @@ BitmapDeviceSharedPtr SvpGlyphPeer::GetG
         switch( nBmpFormat )
         {
             case Format::ONE_BIT_LSB_GREY:
-                bFound = rServerFont.GetGlyphBitmap1( nGlyphIndex, 
pGcpHelper->maRawBitmap );
+                bFound = rServerFont.GetGlyphBitmap1( aGlyphId, 
pGcpHelper->maRawBitmap );
                 break;
             case Format::EIGHT_BIT_GREY:
-                bFound = rServerFont.GetGlyphBitmap8( nGlyphIndex, 
pGcpHelper->maRawBitmap );
+                bFound = rServerFont.GetGlyphBitmap8( aGlyphId, 
pGcpHelper->maRawBitmap );
                 break;
             default:
                 DBG_ERROR( "SVP GCP::GetGlyphBmp(): illegal scanline format");
@@ -121,7 +121,7 @@ BitmapDeviceSharedPtr SvpGlyphPeer::GetG
         }
 
         // return .notdef glyph if needed
-        if( !bFound && (nGlyphIndex != 0) )
+        if( !bFound && (aGlyphId != 0) )
         {
             delete pGcpHelper;
             return GetGlyphBmp( rServerFont, 0, nBmpFormat, rTargetPos );
@@ -152,7 +152,7 @@ void SvpGlyphPeer::RemovingFont( ServerF
 
 //--------------------------------------------------------------------------
 
-void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, int 
/*nGlyphIndex*/ )
+void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, 
sal_GlyphId /*aGlyphId*/ )
 {
     if( rGlyphData.ExtDataRef().mpData != Format::NONE )
     {
@@ -338,7 +338,7 @@ bool SvpSalGraphics::AddTempDevFont( Imp
 sal_Bool SvpSalGraphics::CreateFontSubset(
     const rtl::OUString& rToFile,
     const ImplFontData* pFont,
-    sal_Int32* pGlyphIDs,
+    sal_GlyphId* pGlyphIds,
     sal_uInt8* pEncoding,
     sal_Int32* pWidths,
     int nGlyphCount,
@@ -356,7 +356,7 @@ sal_Bool SvpSalGraphics::CreateFontSubse
     bool bSuccess = rMgr.createFontSubset( rInfo,
                                  aFont,
                                  rToFile,
-                                 pGlyphIDs,
+                                 pGlyphIds,
                                  pEncoding,
                                  pWidths,
                                  nGlyphCount );
@@ -418,39 +418,37 @@ void SvpSalGraphics::GetGlyphWidths( con
 
 // ---------------------------------------------------------------------------
 
-sal_Bool SvpSalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect 
)
+bool SvpSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect 
)
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
-        return sal_False;
+        return false;
 
     ServerFont* pSF = m_pServerFont[ nLevel ];
     if( !pSF )
-        return sal_False;
+        return false;
 
-    nGlyphIndex &= ~GF_FONTMASK;
-    const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
+    aGlyphId &= ~GF_FONTMASK;
+    const GlyphMetric& rGM = pSF->GetGlyphMetric( aGlyphId );
     rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
-    return sal_True;
+    return true;
 }
 
 // ---------------------------------------------------------------------------
 
-sal_Bool SvpSalGraphics::GetGlyphOutline( long nGlyphIndex, B2DPolyPolygon& 
rPolyPoly )
+bool SvpSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, B2DPolyPolygon& 
rPolyPoly )
 {
-    int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+    const int nLevel = aGlyphId >> GF_FONTSHIFT;
     if( nLevel >= MAX_FALLBACK )
-        return sal_False;
+        return false;
 
     const ServerFont* pSF = m_pServerFont[ nLevel ];
     if( !pSF )
-        return sal_False;
+        return false;
 
-    nGlyphIndex &= ~GF_FONTMASK;
-    if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) )
-        return sal_True;
-
-    return sal_False;
+    aGlyphId &= ~GF_FONTMASK;
+    bool bOK = pSF->GetGlyphOutline( aGlyphId, rPolyPoly );
+    return bOK;
 }
 
 // ---------------------------------------------------------------------------
@@ -471,21 +469,21 @@ void SvpSalGraphics::DrawServerFontLayou
 {
     // iterate over all glyphs in the layout
     Point aPos;
-    sal_GlyphId nGlyphIndex;
+    sal_GlyphId aGlyphId;
     SvpGlyphPeer& rGlyphPeer = SvpGlyphCache::GetInstance().GetPeer();
-    for( int nStart = 0; rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, 
nStart ); )
+    for( int nStart = 0; rSalLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart 
); )
     {
-        int nLevel = nGlyphIndex >> GF_FONTSHIFT;
+        int nLevel = aGlyphId >> GF_FONTSHIFT;
         DBG_ASSERT( nLevel < MAX_FALLBACK, "SvpGDI: invalid glyph fallback 
level" );
         ServerFont* pSF = m_pServerFont[ nLevel ];
         if( !pSF )
             continue;
 
         // get the glyph's alpha mask and adjust the drawing position
-        nGlyphIndex &= ~GF_FONTMASK;
+        aGlyphId &= ~GF_FONTMASK;
         B2IPoint aDstPoint( aPos.X(), aPos.Y() );
         BitmapDeviceSharedPtr aAlphaMask
-            = rGlyphPeer.GetGlyphBmp( *pSF, nGlyphIndex, m_eTextFmt, aDstPoint 
);
+            = rGlyphPeer.GetGlyphBmp( *pSF, aGlyphId, m_eTextFmt, aDstPoint );
         if( !aAlphaMask )   // ignore empty glyphs
             continue;
 

Modified: openoffice/trunk/main/vcl/win/source/gdi/salgdi3.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/win/source/gdi/salgdi3.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/win/source/gdi/salgdi3.cxx (original)
+++ openoffice/trunk/main/vcl/win/source/gdi/salgdi3.cxx Mon Dec 16 16:07:41 
2013
@@ -2426,7 +2426,7 @@ void WinSalGraphics::GetDevFontSubstList
 
 // -----------------------------------------------------------------------
 
-sal_Bool WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
+bool WinSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect 
)
 {
     HDC hDC = getHDC();
 
@@ -2436,14 +2436,14 @@ sal_Bool WinSalGraphics::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;
     aGM.gmptGlyphOrigin.x = aGM.gmptGlyphOrigin.y = 0;
     aGM.gmBlackBoxX = aGM.gmBlackBoxY = 0;
-    DWORD nSize = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGM, 0, NULL, 
&aMat );
+    DWORD nSize = ::GetGlyphOutlineW( hDC, aGlyphId, nGGOFlags, &aGM, 0, NULL, 
&aMat );
     if( nSize == GDI_ERROR )
         return false;
 
@@ -2458,7 +2458,7 @@ sal_Bool WinSalGraphics::GetGlyphBoundRe
 
 // -----------------------------------------------------------------------
 
-sal_Bool WinSalGraphics::GetGlyphOutline( long nIndex,
+bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
     ::basegfx::B2DPolyPolygon& rB2DPolyPoly )
 {
     rB2DPolyPoly.clear();
@@ -2471,23 +2471,23 @@ sal_Bool WinSalGraphics::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;
-    const DWORD nSize1 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, 
&aGlyphMetrics, 0, NULL, &aMat );
+    const DWORD nSize1 = ::GetGlyphOutlineW( hDC, aGlyphId, nGGOFlags, 
&aGlyphMetrics, 0, NULL, &aMat );
     if( !nSize1 )       // blank glyphs are ok
-        return TRUE;
+        return true;
     else if( nSize1 == GDI_ERROR )
-        return FALSE;
+        return false;
 
-    BYTE*   pData = new BYTE[ nSize1 ];
-    const DWORD nSize2 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags,
+    BYTE* pData = new BYTE[ nSize1 ];
+    const DWORD nSize2 = ::GetGlyphOutlineW( hDC, aGlyphId, nGGOFlags,
               &aGlyphMetrics, nSize1, pData, &aMat );
 
     if( nSize1 != nSize2 )
-        return FALSE;
+        return false;
 
     // TODO: avoid tools polygon by creating B2DPolygon directly
     int     nPtSize = 512;
@@ -2637,7 +2637,7 @@ sal_Bool WinSalGraphics::GetGlyphOutline
                
rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fFactor, 
fFactor));
     }
 
-    return TRUE;
+    return true;
 }
 
 // -----------------------------------------------------------------------
@@ -2701,7 +2701,7 @@ int ScopedTrueTypeFont::open(void * pBuf
 }
 
 sal_Bool WinSalGraphics::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
@@ -2744,18 +2744,18 @@ sal_Bool WinSalGraphics::CreateFontSubse
                const ImplFontCharMap* pCharMap = 
pWinFontData->GetImplFontCharMap();
                pCharMap->AddReference();
                
-               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 = pCharMap->GetGlyphIndex( nGlyphIdx 
);
-                       if( (pGlyphIDs[i] & (GF_ROTMASK|GF_GSUB)) != 0) // 
TODO: vertical substitution
+                       sal_GlyphId aGlyphId = pGlyphIds[i] & GF_IDXMASK;
+                       if( pGlyphIds[i] & GF_ISCHAR ) // remaining 
pseudo-glyphs need to be translated
+                               aGlyphId = pCharMap->GetGlyphIndex( aGlyphId );
+                       if( (pGlyphIds[i] & (GF_ROTMASK|GF_GSUB)) != 0) // 
TODO: vertical substitution
                                {/*####*/}
 
-                       nRealGlyphIds[i] = nGlyphIdx;
+                       aRealGlyphIds[i] = aGlyphId;
                }
 
                pCharMap->DeReference(); // TODO: and and use a RAII object
@@ -2764,7 +2764,7 @@ sal_Bool WinSalGraphics::CreateFontSubse
                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;
        }
@@ -2804,21 +2804,21 @@ sal_Bool WinSalGraphics::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<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/win/source/gdi/winlayout.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/win/source/gdi/winlayout.cxx?rev=1551244&r1=1551243&r2=1551244&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/win/source/gdi/winlayout.cxx (original)
+++ openoffice/trunk/main/vcl/win/source/gdi/winlayout.cxx Mon Dec 16 16:07:41 
2013
@@ -570,7 +570,7 @@ bool SimpleWinLayout::LayoutText( ImplLa
 
 // -----------------------------------------------------------------------
 
-int SimpleWinLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& 
rPos, int& nStart,
+int SimpleWinLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIds, Point& 
rPos, int& nStart,
     long* pGlyphAdvances, int* pCharIndexes ) const
 {
     // return zero if no more glyph found
@@ -590,27 +590,27 @@ int SimpleWinLayout::GetNextGlyphs( int 
     int nCount = 0;
     while( nCount < nLen )
     {
-        // update return values {nGlyphIndex,nCharPos,nGlyphAdvance}
-        sal_GlyphId nGlyphIndex = mpOutGlyphs[ nStart ];
+        // update return values {aGlyphId,nCharPos,nGlyphAdvance}
+        sal_GlyphId aGlyphId = mpOutGlyphs[ nStart ];
         if( mbDisableGlyphs )
         {
             if( mnLayoutFlags & SAL_LAYOUT_VERTICAL )
             {
-                const sal_UCS4 cChar = static_cast<sal_UCS4>(nGlyphIndex & 
GF_IDXMASK);
+                const sal_UCS4 cChar = static_cast<sal_UCS4>(aGlyphId & 
GF_IDXMASK);
                 if( mrWinFontData.HasGSUBstitutions( mhDC )
                 &&  mrWinFontData.IsGSUBstituted( cChar ) )
-                    nGlyphIndex |= GF_GSUB | GF_ROTL;
+                    aGlyphId |= GF_GSUB | GF_ROTL;
                 else
                 {
-                    nGlyphIndex |= GetVerticalFlags( cChar );
-                    if( (nGlyphIndex & GF_ROTMASK) == 0 )
-                        nGlyphIndex |= GF_VERT;
+                    aGlyphId |= GetVerticalFlags( cChar );
+                    if( (aGlyphId & GF_ROTMASK) == 0 )
+                        aGlyphId |= GF_VERT;
                 }
             }
-            nGlyphIndex |= GF_ISCHAR;
+            aGlyphId |= GF_ISCHAR;
         }
         ++nCount;
-        *(pGlyphs++) = nGlyphIndex;
+        *(pGlyphIds++) = aGlyphId;
         if( pGlyphAdvances )
             *(pGlyphAdvances++) = mpGlyphAdvances[ nStart ];
         if( pCharIndexes )


Reply via email to