diff options
author | Oliver Bolte <obo@openoffice.org> | 2003-11-12 16:15:19 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2003-11-12 16:15:19 +0000 |
commit | b43bcbc3213fa9b5d9369d7a6dd54048c90bd962 (patch) | |
tree | 403d7e099ad246fa5f300e52d40b0e3a2f398bda /vcl/source/gdi | |
parent | 2b4cf487a6d7b232f94e773327897684d1264dfb (diff) |
INTEGRATION: CWS texteng02 (1.156.38); FILE MERGED
2003/11/06 11:27:10 mt 1.156.38.2: RESYNC: (1.156-1.157); FILE MERGED
2003/11/04 15:38:15 mt 1.156.38.1: #109019# Optimizations for text color changes, no ImplNewFont
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index b4e5ec9a2925..af4cd5db05ef 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: outdev3.cxx,v $ * - * $Revision: 1.157 $ + * $Revision: 1.158 $ * - * last change: $Author: kz $ $Date: 2003-10-15 10:02:49 $ + * last change: $Author: obo $ $Date: 2003-11-12 17:15:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -4972,8 +4972,13 @@ void OutputDevice::SetFont( const Font& rNewFont ) if ( !maFont.IsSameInstance( aFont ) ) { - if ( maFont.GetColor() != aFont.GetColor() ) + // Optimization MT/HDU: COL_TRANSPARENT means SetFont should ignore the font color, + // because SetTextColor() is used for this. + if ( ( aFont.GetColor() != COL_TRANSPARENT ) && ( maFont.GetColor() != aFont.GetColor() ) ) + { + maTextColor = aFont.GetColor(); mbInitTextColor = TRUE; + } maFont = aFont; mbNewFont = TRUE; } @@ -5044,9 +5049,9 @@ void OutputDevice::SetTextColor( const Color& rColor ) if ( mpMetaFile ) mpMetaFile->AddAction( new MetaTextColorAction( aColor ) ); - if ( maFont.GetColor() != aColor ) + if ( maTextColor != aColor ) { - maFont.SetColor( aColor ); + maTextColor = aColor; mbInitTextColor = TRUE; } } |