diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/quartz/salgdi.cxx | 8 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 6 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 14 |
4 files changed, 15 insertions, 15 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 0d39e962e70e..7aa50af968c1 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -61,7 +61,7 @@ CoreTextFontFace::CoreTextFontFace( const CoreTextFontFace& rSrc ) , mbHasOs2Table( rSrc.mbHasOs2Table ) , mbCmapEncodingRead( rSrc.mbCmapEncodingRead ) { - if( rSrc.mxCharMap ) + if( rSrc.mxCharMap.Is() ) mxCharMap = rSrc.mxCharMap; } @@ -77,7 +77,7 @@ CoreTextFontFace::CoreTextFontFace( const FontAttributes& rDFA, sal_IntPtr nFont CoreTextFontFace::~CoreTextFontFace() { - if( mxCharMap ) + if( mxCharMap.Is() ) { mxCharMap = nullptr; } @@ -93,7 +93,7 @@ static unsigned GetUShort( const unsigned char* p ){return((p[0]<<8)+p[1]);} const FontCharMapRef CoreTextFontFace::GetFontCharMap() const { // return the cached charmap - if( mxCharMap ) + if( mxCharMap.Is() ) return mxCharMap; // set the default charmap @@ -741,7 +741,7 @@ void AquaSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFontData, bool bV } FontCharMapRef xFCMap = mpFontData->GetFontCharMap(); - SAL_WARN_IF( !xFCMap || !xFCMap->GetCharCount(), "vcl", "no charmap" ); + SAL_WARN_IF( !xFCMap.Is() || !xFCMap->GetCharCount(), "vcl", "no charmap" ); // get unicode<->glyph encoding // TODO? avoid sft mapping by using the xFCMap itself diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 36f1602de603..1492fb70164b 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -250,7 +250,7 @@ bool OutputDevice::GetFontCharMap( FontCharMapRef& rxFontCharMap ) const return false; FontCharMapRef xFontCharMap ( mpGraphics->GetFontCharMap() ); - if (!xFontCharMap) + if (!xFontCharMap.Is()) { FontCharMapRef xDefaultMap( new FontCharMap() ); rxFontCharMap = xDefaultMap; diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 55df59ef0bab..bc46febae7da 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -222,8 +222,8 @@ FreetypeFontInfo::FreetypeFontInfo( const FontAttributes& rDevFontAttributes, FreetypeFontInfo::~FreetypeFontInfo() { - if( mxFontCharMap ) - mxFontCharMap = nullptr; + if( mxFontCharMap.Is() ) + mxFontCharMap.Clear(); delete mpChar2Glyph; delete mpGlyph2Char; #if ENABLE_GRAPHITE @@ -979,7 +979,7 @@ const FontCharMapRef ServerFont::GetFontCharMap() const const FontCharMapRef& FreetypeFontInfo::GetFontCharMap() { // check if the charmap is already cached - if( mxFontCharMap ) + if( mxFontCharMap.Is() ) return mxFontCharMap; // get the charmap and cache it diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index ee3ea8342853..b76102176969 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -307,7 +307,7 @@ bool WinGlyphFallbackSubstititution::HasMissingChars( PhysicalFontFace* pFace, c { WinFontFace* pWinFont = static_cast< WinFontFace* >(pFace); FontCharMapRef xFontCharMap = pWinFont->GetFontCharMap(); - if( !xFontCharMap ) + if( !xFontCharMap.Is() ) { // construct a Size structure as the parameter of constructor of class FontSelectPattern const Size aSize( pFace->GetWidth(), pFace->GetHeight() ); @@ -334,7 +334,7 @@ bool WinGlyphFallbackSubstititution::HasMissingChars( PhysicalFontFace* pFace, c } // avoid fonts with unknown CMAP subtables for glyph fallback - if( !xFontCharMap || xFontCharMap->IsDefaultMap() ) + if( !xFontCharMap.Is() || xFontCharMap->IsDefaultMap() ) return false; int nMatchCount = 0; @@ -899,7 +899,7 @@ WinFontFace::WinFontFace( const FontAttributes& rDFS, WinFontFace::~WinFontFace() { - if( mxUnicodeMap ) + if( mxUnicodeMap.Is() ) mxUnicodeMap = 0; #if ENABLE_GRAPHITE if (mpGraphiteData) @@ -922,7 +922,7 @@ static inline DWORD CalcTag( const char p[4]) { return (p[0]+(p[1]<<8)+(p[2]<<16 void WinFontFace::UpdateFromHDC( HDC hDC ) const { // short circuit if already initialized - if( mxUnicodeMap != NULL ) + if( mxUnicodeMap.Is() ) return; ReadCmapTable( hDC ); @@ -1036,7 +1036,7 @@ void WinFontFace::ReadGsubTable( HDC hDC ) const void WinFontFace::ReadCmapTable( HDC hDC ) const { - if( mxUnicodeMap != NULL ) + if( mxUnicodeMap.Is() ) return; bool bIsSymbolFont = (meWinCharSet == SYMBOL_CHARSET); @@ -1055,7 +1055,7 @@ void WinFontFace::ReadCmapTable( HDC hDC ) const } } - if( !mxUnicodeMap ) + if( !mxUnicodeMap.Is() ) { mxUnicodeMap = FontCharMap::GetDefaultMap( bIsSymbolFont ); } @@ -2403,7 +2403,7 @@ void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, } const WinFontFace* pWinFont = static_cast<const WinFontFace*>(pFont); FontCharMapRef xFCMap = pWinFont->GetFontCharMap(); - SAL_WARN_IF( !xFCMap || !xFCMap->GetCharCount(), "vcl", "no map" ); + SAL_WARN_IF( !xFCMap.Is() || !xFCMap->GetCharCount(), "vcl", "no map" ); int nCharCount = xFCMap->GetCharCount(); sal_uInt32 nChar = xFCMap->GetFirstChar(); |