diff options
author | Herbert Dürr <hdu@apache.org> | 2013-12-16 16:07:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-06 14:32:30 +0000 |
commit | a16aacd6474f02307341646ec08f9e1608a8615d (patch) | |
tree | 23d5a086d982d77329f2de6196c97c3139d9bdbf /vcl/unx/generic/gdi/salgdi3.cxx | |
parent | 8723bf714b6156396f30ac71c0268e5a51c76337 (diff) |
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/unx/generic/gdi/salgdi3.cxx')
-rw-r--r-- | vcl/unx/generic/gdi/salgdi3.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index 8362c883fc7d..e150ebca23d6 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -615,18 +615,18 @@ X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel ) // --------------------------------------------------------------------------- -sal_Bool X11SalGraphics::GetGlyphBoundRect( sal_GlyphId 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_IDXMASK; - const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); + aGlyphId &= GF_IDXMASK; + const GlyphMetric& rGM = pSF->GetGlyphMetric(aGlyphId); Rectangle aRect( rGM.GetOffset(), rGM.GetSize() ); if ( pSF->mnCos != 0x10000 && pSF->mnSin != 0 ) @@ -642,27 +642,27 @@ sal_Bool X11SalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& else rRect = aRect; - return sal_True; + return true; } // --------------------------------------------------------------------------- -sal_Bool X11SalGraphics::GetGlyphOutline( sal_GlyphId 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; + return false; - nGlyphIndex &= GF_IDXMASK; - if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) ) - return sal_True; + aGlyphId &= GF_IDXMASK; + if( pSF->GetGlyphOutline( aGlyphId, rPolyPoly ) ) + return true; - return sal_False; + return false; } //-------------------------------------------------------------------------- @@ -719,7 +719,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const sal_Bool X11SalGraphics::CreateFontSubset( const OUString& rToFile, const PhysicalFontFace* pFont, - sal_Int32* pGlyphIDs, + sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding, sal_Int32* pWidths, int nGlyphCount, @@ -737,7 +737,7 @@ sal_Bool X11SalGraphics::CreateFontSubset( bool bSuccess = rMgr.createFontSubset( rInfo, aFont, rToFile, - pGlyphIDs, + pGlyphIds, pEncoding, pWidths, nGlyphCount ); |