summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-03-22 14:21:09 +0000
committerOliver Bolte <obo@openoffice.org>2006-03-22 14:21:09 +0000
commit6d036b06fa079f04cd16cbb4b243fa7b5be3ebc3 (patch)
tree30e5e8bd9228706f7c7355c179eb3dd40a6d1ceb /vcl/win
parent49743920cae5eaf214fb6f3dc25c447d86bfe064 (diff)
INTEGRATION: CWS gcnolk (1.69.144); FILE MERGED
2006/02/17 15:52:59 hdu 1.69.144.3: RESYNC: (1.74-1.75); FILE MERGED 2005/11/25 17:03:27 hdu 1.69.144.2: RESYNC: (1.69-1.74); FILE MERGED 2005/08/09 09:18:24 hdu 1.69.144.1: #i50546# release physical fonts when done
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 2c9b070c6458..02f0bf98b0ed 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: salgdi3.cxx,v $
*
- * $Revision: 1.75 $
+ * $Revision: 1.76 $
*
- * last change: $Author: hr $ $Date: 2006-01-27 13:50:33 $
+ * last change: $Author: obo $ $Date: 2006-03-22 15:21:09 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1060,6 +1060,18 @@ static void ImplGetLogFontFromFontSelect( HDC hDC,
USHORT WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel )
{
+ // return early if there is no new font
+ if( !pFont )
+ {
+ for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
+ {
+ if( mhFonts[ i ] )
+ DeleteFont( mhFonts[ i ] );
+ mhFonts[ i ] = 0;
+ }
+ return 0;
+ }
+
DBG_ASSERT( pFont->mpFontData, "WinSalGraphics mpFontData==NULL");
mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<ImplWinFontEntry*>( pFont->mpFontEntry );
mpWinFontData[ nFallbackLevel ] = reinterpret_cast<ImplWinFontData*>( pFont->mpFontData );