diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2006-05-04 14:11:24 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2006-05-04 14:11:24 +0000 |
commit | c8f89ae96a91d7647ce6792a5a2546be06a361ca (patch) | |
tree | 1de0309fbb275be6816e173addcd653823e71d7e /vcl/source | |
parent | 9509315c45bf8b834475d0f60425330b31dd1786 (diff) |
INTEGRATION: CWS perform07 (1.11.14); FILE MERGED
2005/11/03 15:34:59 pl 1.11.14.3: #i56265# bye bye FontSubstConfigItem, welcome FontSubstConfiguration
2005/10/31 17:15:26 mt 1.11.14.2: #i56788# Font::Merge: Don't use access methods which might start AskConfig()
2005/10/31 10:19:08 mt 1.11.14.1: #i56788# GetFontAttributes
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/font.cxx | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 4bb14313a314..1c125d1581ed 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -4,9 +4,9 @@ * * $RCSfile: font.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: rt $ $Date: 2005-10-17 14:49:34 $ + * last change: $Author: rt $ $Date: 2006-05-04 15:11:24 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -176,7 +176,7 @@ void Impl_Font::AskConfig() mbConfigLookup = true; // prepare the FontSubst configuration lookup - const vcl::FontSubstConfigItem* pFontSubst = vcl::FontSubstConfigItem::get(); + const vcl::FontSubstConfiguration* pFontSubst = vcl::FontSubstConfiguration::get(); String aShortName; String aFamilyName; @@ -185,7 +185,7 @@ void Impl_Font::AskConfig() FontWidth eWidthType = WIDTH_DONTKNOW; String aMapName = maFamilyName; ImplGetEnglishSearchFontName( aMapName ); - vcl::FontSubstConfigItem::getMapName( aMapName, + vcl::FontSubstConfiguration::getMapName( aMapName, aShortName, aFamilyName, eWeight, eWidthType, nType ); // lookup the font name in the configuration @@ -706,21 +706,25 @@ void Font::Merge( const Font& rFont ) { SetName( rFont.GetName() ); SetStyleName( rFont.GetStyleName() ); - SetFamily( rFont.GetFamily() ); SetCharSet( GetCharSet() ); SetLanguage( rFont.GetLanguage() ); SetCJKContextLanguage( rFont.GetCJKContextLanguage() ); - SetPitch( rFont.GetPitch() ); + // don't use access methods here, might lead to AskConfig(), if DONTKNOW + SetFamily( rFont.mpImplFont->meFamily ); + SetPitch( rFont.mpImplFont->mePitch ); } - if ( rFont.GetSize().Height() ) - SetSize( rFont.GetSize() ); - if ( rFont.GetWeight() != WEIGHT_DONTKNOW ) + // don't use access methods here, might lead to AskConfig(), if DONTKNOW + if ( rFont.mpImplFont->meWeight != WEIGHT_DONTKNOW ) SetWeight( rFont.GetWeight() ); - if ( rFont.GetWidthType() != WIDTH_DONTKNOW ) - SetWidthType( rFont.GetWidthType() ); - if ( rFont.GetItalic() != ITALIC_DONTKNOW ) + if ( rFont.mpImplFont->meItalic != ITALIC_DONTKNOW ) SetItalic( rFont.GetItalic() ); + if ( rFont.mpImplFont->meWidthType != WIDTH_DONTKNOW ) + SetWidthType( rFont.GetWidthType() ); + + + if ( rFont.GetSize().Height() ) + SetSize( rFont.GetSize() ); if ( rFont.GetUnderline() != UNDERLINE_DONTKNOW ) { SetUnderline( rFont.GetUnderline() ); @@ -742,6 +746,20 @@ void Font::Merge( const Font& rFont ) SetRelief( rFont.GetRelief() ); } +void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const +{ + // #i56788# Use members directly, don't risc config access. + rAttrs.maName = mpImplFont->maFamilyName; + rAttrs.maStyleName = mpImplFont->maStyleName; + rAttrs.meFamily = mpImplFont->meFamily; + rAttrs.mePitch = mpImplFont->mePitch; + rAttrs.meItalic = mpImplFont->meItalic; + rAttrs.meWeight = mpImplFont->meWeight; + rAttrs.meWidthType = WIDTH_DONTKNOW; + rAttrs.mbSymbolFlag= (mpImplFont->meCharSet == RTL_TEXTENCODING_SYMBOL); +} + + // ----------------------------------------------------------------------- SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font ) |