diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-07-14 11:04:36 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-07-14 11:04:36 +0000 |
commit | d05ef0c72582064ed3adc18dfba323908bdb3b4f (patch) | |
tree | 4e297373713a13ec579d36053e246ca730476833 /vcl | |
parent | 582fd2994aad028677845b9ff54648cf92db9695 (diff) |
INTEGRATION: CWS vgvalgrind (1.123.134); FILE MERGED
2005/06/13 09:19:34 hdu 1.123.134.1: #i50546# merge memleak fix from CWS vcl39
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/source/gdi/salgdi3.cxx | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index f22ec9fed9db..e21d1325f270 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salgdi3.cxx,v $ * - * $Revision: 1.124 $ + * $Revision: 1.125 $ * - * last change: $Author: obo $ $Date: 2005-06-17 09:28:55 $ + * last change: $Author: kz $ $Date: 2005-07-14 12:04:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -646,7 +646,19 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev if( !pEntry->mpFontData ) return false; - // requesting a font provided by builtin rasterizer + // handle the request for a native X11-font + if( ImplX11FontData::CheckFontData( *pEntry->mpFontData ) ) + { + ImplX11FontData* pRequestedFont = static_cast<ImplX11FontData*>( pEntry->mpFontData ); + const ExtendedXlfd& rX11Font = pRequestedFont->GetExtendedXlfd(); + + Size aReqSize( pEntry->mnWidth, pEntry->mnHeight ); + mXFont[ nFallbackLevel ] = GetDisplay()->GetFont( &rX11Font, aReqSize, bFontVertical_ ); + bFontGC_ = FALSE; + return true; + } + + // handle the request for a non-native X11-font => use the GlyphCache ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry ); if( pServerFont != NULL ) { @@ -659,17 +671,7 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev return true; } - // requesting a native X11-font - if( !ImplX11FontData::CheckFontData( *pEntry->mpFontData ) ) - return false; - - ImplX11FontData* pRequestedFont = static_cast<ImplX11FontData*>( pEntry->mpFontData ); - const ExtendedXlfd& rX11Font = pRequestedFont->GetExtendedXlfd(); - - Size aReqSize( pEntry->mnWidth, pEntry->mnHeight ); - mXFont[ nFallbackLevel ] = GetDisplay()->GetFont( &rX11Font, aReqSize, bFontVertical_ ); - bFontGC_ = FALSE; - return true; + return false; } //-------------------------------------------------------------------------- |