summaryrefslogtreecommitdiffstats
path: root/vcl/generic
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-12-16 16:07:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-06 14:32:30 +0000
commita16aacd6474f02307341646ec08f9e1608a8615d (patch)
tree23d5a086d982d77329f2de6196c97c3139d9bdbf /vcl/generic
parentBin mysterious FIXME comment and 'if (0) return 0;' line (diff)
downloadcore-a16aacd6474f02307341646ec08f9e1608a8615d.tar.gz
core-a16aacd6474f02307341646ec08f9e1608a8615d.zip
Resolves: #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. (cherry picked from commit c0a84ad10964fb7a65b6239cbe1cef8698b5d17b) Conflicts: vcl/aqua/source/gdi/salatslayout.cxx vcl/aqua/source/gdi/salgdi.cxx vcl/generic/glyphs/gcach_ftyp.cxx vcl/generic/print/genpspgraphics.cxx vcl/generic/print/glyphset.cxx vcl/generic/print/glyphset.hxx vcl/headless/svptext.cxx vcl/inc/generic/genpspgraphics.h vcl/inc/generic/glyphcache.hxx vcl/inc/os2/salgdi.h vcl/inc/quartz/salgdi.h vcl/inc/salgdi.hxx vcl/inc/sallayout.hxx vcl/inc/unx/salgdi.h vcl/inc/vcl/fontmanager.hxx vcl/inc/win/salgdi.h vcl/os2/source/gdi/os2layout.cxx vcl/os2/source/gdi/salgdi3.cxx vcl/source/gdi/pdfwriter_impl.cxx vcl/source/gdi/sallayout.cxx vcl/source/glyphs/gcach_ftyp.hxx vcl/source/glyphs/gcach_layout.cxx vcl/source/glyphs/glyphcache.cxx vcl/source/glyphs/graphite_layout.cxx vcl/unx/generic/fontmanager/fontmanager.cxx vcl/unx/generic/gdi/gcach_xpeer.cxx vcl/unx/generic/gdi/gcach_xpeer.hxx vcl/unx/generic/gdi/salgdi3.cxx vcl/unx/generic/gdi/xrender_peer.hxx vcl/unx/headless/svpgdi.hxx vcl/unx/headless/svppspgraphics.cxx vcl/unx/headless/svppspgraphics.hxx vcl/win/source/gdi/salgdi3.cxx vcl/win/source/gdi/winlayout.cxx Change-Id: Ic629131950360e2df4c15db30d6a5362193c6330
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontmanager.cxx16
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx62
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx8
-rw-r--r--vcl/generic/print/genpspgraphics.cxx60
-rw-r--r--vcl/generic/print/glyphset.cxx10
-rw-r--r--vcl/generic/print/glyphset.hxx10
-rw-r--r--vcl/generic/print/text_gfx.cxx4
7 files changed, 85 insertions, 85 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 56b724069f43..7f20679d1691 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1935,7 +1935,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,
@@ -1975,11 +1975,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++;
}
@@ -2009,9 +2009,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.getStr(), "wb" );
@@ -2020,7 +2020,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 );
@@ -2129,9 +2129,9 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
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;
}
}
}
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 62d114e3875b..d6017db55f7a 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -810,13 +810,13 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
// -----------------------------------------------------------------------
-static inline void SplitGlyphFlags( const ServerFont& rFont, int& nGlyphIndex, int& nGlyphFlags )
+static inline void SplitGlyphFlags( const ServerFont& 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 );
}
// -----------------------------------------------------------------------
@@ -896,7 +896,7 @@ int ServerFont::ApplyGlyphTransform( int nGlyphFlags,
// -----------------------------------------------------------------------
-int ServerFont::GetRawGlyphIndex(sal_UCS4 aChar, sal_UCS4 aVS) const
+sal_GlyphId ServerFont::GetRawGlyphIndex(sal_UCS4 aChar, sal_UCS4 aVS) const
{
if( mpFontInfo->IsSymbolFont() )
{
@@ -936,12 +936,12 @@ int ServerFont::GetRawGlyphIndex(sal_UCS4 aChar, sal_UCS4 aVS) const
}
}
- return nGlyphIndex;
+ return sal_GlyphId( nGlyphIndex);
}
// -----------------------------------------------------------------------
-int ServerFont::FixupGlyphIndex( int nGlyphIndex, sal_UCS4 aChar ) const
+sal_GlyphId ServerFont::FixupGlyphIndex( sal_GlyphId aGlyphId, sal_UCS4 aChar ) const
{
int nGlyphFlags = GF_NONE;
@@ -950,39 +950,39 @@ int ServerFont::FixupGlyphIndex( int nGlyphIndex, sal_UCS4 aChar ) const
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;
}
}
- if( nGlyphIndex != 0 )
- nGlyphIndex |= nGlyphFlags;
+ if( aGlyphId != 0 )
+ aGlyphId |= nGlyphFlags;
- return nGlyphIndex;
+ return aGlyphId;
}
// -----------------------------------------------------------------------
-int ServerFont::GetGlyphIndex( sal_UCS4 aChar ) const
+sal_GlyphId ServerFont::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;
}
// -----------------------------------------------------------------------
@@ -1002,12 +1002,12 @@ static int lcl_GetCharWidth( FT_FaceRec_* pFaceFT, double fStretch, int nGlyphFl
// -----------------------------------------------------------------------
-void ServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
+void ServerFont::InitGlyphData( sal_GlyphId aGlyphId, GlyphData& rGD ) const
{
FT_Activate_Size( maSizeFT );
int nGlyphFlags;
- SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+ SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
int nLoadFlags = mnLoadFlags;
@@ -1015,7 +1015,7 @@ void ServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
// nLoadFlags |= FT_LOAD_NO_BITMAP;
FT_Error rc = -1;
- rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+ rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
if( rc != FT_Err_Ok )
{
@@ -1066,12 +1066,12 @@ bool ServerFont::GetAntialiasAdvice( void ) const
// -----------------------------------------------------------------------
-bool ServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap ) const
+bool ServerFont::GetGlyphBitmap1( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap ) const
{
FT_Activate_Size( maSizeFT );
int nGlyphFlags;
- SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+ SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
FT_Int nLoadFlags = mnLoadFlags;
// #i70930# force mono-hinting for monochrome text
@@ -1090,7 +1090,7 @@ bool ServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap ) const
nLoadFlags |= FT_LOAD_NO_BITMAP;
FT_Error rc = -1;
- rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+ rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
if( rc != FT_Err_Ok )
return false;
@@ -1208,12 +1208,12 @@ bool ServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap ) const
// -----------------------------------------------------------------------
-bool ServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap ) const
+bool ServerFont::GetGlyphBitmap8( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap ) const
{
FT_Activate_Size( maSizeFT );
int nGlyphFlags;
- SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+ SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
FT_Int nLoadFlags = mnLoadFlags;
@@ -1227,7 +1227,7 @@ bool ServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap ) const
nLoadFlags |= FT_LOAD_NO_BITMAP;
FT_Error rc = -1;
- rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+ rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
if( rc != FT_Err_Ok )
return false;
@@ -1607,7 +1607,7 @@ static int FT_cubic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, FT_Vector_CPtr p3,
// -----------------------------------------------------------------------
-bool ServerFont::GetGlyphOutline( int nGlyphIndex,
+bool ServerFont::GetGlyphOutline( sal_GlyphId aGlyphId,
::basegfx::B2DPolyPolygon& rB2DPolyPoly ) const
{
if( maSizeFT )
@@ -1616,7 +1616,7 @@ bool ServerFont::GetGlyphOutline( int nGlyphIndex,
rB2DPolyPoly.clear();
int nGlyphFlags;
- SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+ SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
FT_Int nLoadFlags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_TRANSFORM;
@@ -1625,7 +1625,7 @@ bool ServerFont::GetGlyphOutline( int nGlyphIndex,
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;
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 5ac5510ffede..4ac5d82a1b9b 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -342,10 +342,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 );
@@ -353,9 +353,9 @@ GlyphData& ServerFont::GetGlyphData( int nGlyphIndex )
}
// 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;
}
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 319ee2aa57f5..938c9083c4c0 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -631,7 +631,7 @@ bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs )
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 );
@@ -653,7 +653,7 @@ bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs )
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;
@@ -662,25 +662,25 @@ bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs )
rArgs.NeedFallback( nCharPos, bRightToLeft );
// 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
@@ -729,7 +729,7 @@ void PspServerFontLayout::InitFont() const
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 SalLayout& rLayout, ::psp::PrinterGfx& rGfx
{
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 );
}
}
@@ -941,38 +941,38 @@ void GenPspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
}
}
-sal_Bool GenPspGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
+bool GenPspGraphics::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_IDXMASK;
- const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
+ aGlyphId &= GF_IDXMASK;
+ const GlyphMetric& rGM = pSF->GetGlyphMetric( aGlyphId );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
- return sal_True;
+ return true;
}
-sal_Bool GenPspGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex,
+bool GenPspGraphics::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_IDXMASK;
- if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
- return sal_True;
+ aGlyphId &= GF_IDXMASK;
+ if( pSF->GetGlyphOutline( aGlyphId, rB2DPolyPoly ) )
+ return true;
- return sal_False;
+ return false;
}
SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
@@ -1010,7 +1010,7 @@ SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
sal_Bool GenPspGraphics::CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace* pFont,
- sal_Int32* pGlyphIDs,
+ sal_GlyphId* pGlyphIds,
sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphCount,
@@ -1028,7 +1028,7 @@ sal_Bool GenPspGraphics::CreateFontSubset(
bool bSuccess = rMgr.createFontSubset( rInfo,
aFont,
rToFile,
- pGlyphIDs,
+ pGlyphIds,
pEncoding,
pWidths,
nGlyphCount );
diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx
index 118a0e2cfb3b..f5d8b03d5d86 100644
--- a/vcl/generic/print/glyphset.cxx
+++ b/vcl/generic/print/glyphset.cxx
@@ -92,7 +92,7 @@ GlyphSet::GetCharID (
sal_Bool
GlyphSet::GetGlyphID (
- sal_uInt32 nGlyph,
+ sal_GlyphId nGlyph,
sal_Unicode nUnicode,
unsigned char* nOutGlyphID,
sal_Int32* nOutGlyphSetID
@@ -135,7 +135,7 @@ GlyphSet::LookupCharID (
sal_Bool
GlyphSet::LookupGlyphID (
- sal_uInt32 nGlyph,
+ sal_GlyphId nGlyph,
unsigned char* nOutGlyphID,
sal_Int32* nOutGlyphSetID
)
@@ -269,7 +269,7 @@ GlyphSet::AddCharID (
sal_Bool
GlyphSet::AddGlyphID (
- sal_uInt32 nGlyph,
+ sal_GlyphId nGlyph,
sal_Unicode nUnicode,
unsigned char* nOutGlyphID,
sal_Int32* nOutGlyphSetID
@@ -460,7 +460,7 @@ GlyphSet::GetReencodedFontName (sal_Int32 nGlyphSetID)
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,
@@ -730,7 +730,7 @@ static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile,
std::stable_sort( aSorted.begin(), aSorted.end() );
std::vector< unsigned char > aEncoding( nGlyphCount );
- std::vector< long > aRequestedGlyphs( nGlyphCount );
+ std::vector< sal_GlyphId > aRequestedGlyphs( nGlyphCount );
for( int i = 0; i < nGlyphCount; i++ )
{
diff --git a/vcl/generic/print/glyphset.hxx b/vcl/generic/print/glyphset.hxx
index 009f2ce40b76..8ceb1213f95e 100644
--- a/vcl/generic/print/glyphset.hxx
+++ b/vcl/generic/print/glyphset.hxx
@@ -49,7 +49,7 @@ private:
typedef boost::unordered_map< sal_Unicode, sal_uInt8 > char_map_t;
typedef std::list< char_map_t > char_list_t;
- typedef boost::unordered_map< sal_uInt32, sal_uInt8 > glyph_map_t;
+ typedef boost::unordered_map< sal_GlyphId, sal_uInt8 > glyph_map_t;
typedef std::list< glyph_map_t > glyph_list_t;
char_list_t maCharList;
@@ -71,11 +71,11 @@ private:
sal_Bool AddCharID (sal_Unicode nChar,
unsigned char* nOutGlyphID,
sal_Int32* nOutGlyphSetID);
- sal_Bool GetGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
+ sal_Bool GetGlyphID (sal_GlyphId nGlyphId, sal_Unicode nUnicode,
unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID);
- sal_Bool LookupGlyphID (sal_uInt32 nGlyph,
+ sal_Bool LookupGlyphID (sal_GlyphId nGlyphId,
unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID);
- sal_Bool AddGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
+ sal_Bool AddGlyphID (sal_GlyphId nGlyphId, sal_Unicode nUnicode,
unsigned char* nOutGlyphID,
sal_Int32* nOutGlyphSetID);
void AddNotdef (char_map_t &rCharMap);
@@ -109,7 +109,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,
diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx
index b8b9439c4a58..0b1d4e65c623 100644
--- a/vcl/generic/print/text_gfx.cxx
+++ b/vcl/generic/print/text_gfx.cxx
@@ -129,7 +129,7 @@ PrinterGfx::SetFont(
void PrinterGfx::drawGlyphs(
const Point& rPoint,
- sal_uInt32* pGlyphIds,
+ sal_GlyphId* pGlyphIds,
sal_Unicode* pUnicodes,
sal_Int16 nLen,
sal_Int32* pDeltaArray
@@ -198,7 +198,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;