Kaydet (Commit) adcd5038 authored tarafından Chris Sherlock's avatar Chris Sherlock

vcl: more harmonization of ImplFont and FontAttributes

+ Added function ImplFont::CompareDeviceIndependentFontAttributes
+ Renamed ImplFont::mbSymbol to ImplFont::mbSymbolFlag

Change-Id: I6325e87a2f38a9949c990453112284c3f8d1fb2f
üst a43b7cc5
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
TextAlign GetAlignment() const { return meAlign; } TextAlign GetAlignment() const { return meAlign; }
rtl_TextEncoding GetCharSet() const { return meCharSet; } rtl_TextEncoding GetCharSet() const { return meCharSet; }
bool IsSymbolFont() const { return mbSymbol; } bool IsSymbolFont() const { return mbSymbolFlag; }
void SetFamilyName( const OUString& sFamilyName ) { maFamilyName = sFamilyName; } void SetFamilyName( const OUString& sFamilyName ) { maFamilyName = sFamilyName; }
void SetStyleName( const OUString& sStyleName ) { maStyleName = sStyleName; } void SetStyleName( const OUString& sStyleName ) { maStyleName = sStyleName; }
...@@ -61,7 +61,9 @@ public: ...@@ -61,7 +61,9 @@ public:
void SetAlignment( const TextAlign eAlignment ) { meAlign = eAlignment; } void SetAlignment( const TextAlign eAlignment ) { meAlign = eAlignment; }
void SetCharSet( const rtl_TextEncoding eCharSet ) { meCharSet = eCharSet; } void SetCharSet( const rtl_TextEncoding eCharSet ) { meCharSet = eCharSet; }
void SetSymbolFlag( const bool bSymbolFlag ) { mbSymbol = bSymbolFlag; } void SetSymbolFlag( const bool bSymbolFlag ) { mbSymbolFlag = bSymbolFlag; }
bool CompareDeviceIndependentFontAttributes(const ImplFont& rOther) const;
// straight properties, no getting them from AskConfig() // straight properties, no getting them from AskConfig()
FontFamily GetFamilyTypeNoAsk() const { return meFamily; } FontFamily GetFamilyTypeNoAsk() const { return meFamily; }
...@@ -128,7 +130,7 @@ private: ...@@ -128,7 +130,7 @@ private:
LanguageTag maCJKLanguageTag; LanguageTag maCJKLanguageTag;
// Flags - device independent // Flags - device independent
bool mbSymbol:1, bool mbSymbolFlag:1,
mbOutline:1, mbOutline:1,
mbConfigLookup:1, // there was a config lookup mbConfigLookup:1, // there was a config lookup
mbShadow:1, mbShadow:1,
......
...@@ -856,7 +856,7 @@ ImplFont::ImplFont() : ...@@ -856,7 +856,7 @@ ImplFont::ImplFont() :
meCharSet( RTL_TEXTENCODING_DONTKNOW ), meCharSet( RTL_TEXTENCODING_DONTKNOW ),
maLanguageTag( LANGUAGE_DONTKNOW ), maLanguageTag( LANGUAGE_DONTKNOW ),
maCJKLanguageTag( LANGUAGE_DONTKNOW ), maCJKLanguageTag( LANGUAGE_DONTKNOW ),
mbSymbol( false ), mbSymbolFlag( false ),
mbOutline( false ), mbOutline( false ),
mbConfigLookup( false ), mbConfigLookup( false ),
mbShadow( false ), mbShadow( false ),
...@@ -893,7 +893,7 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) : ...@@ -893,7 +893,7 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) :
meCharSet( rImplFont.meCharSet ), meCharSet( rImplFont.meCharSet ),
maLanguageTag( rImplFont.maLanguageTag ), maLanguageTag( rImplFont.maLanguageTag ),
maCJKLanguageTag( rImplFont.maCJKLanguageTag ), maCJKLanguageTag( rImplFont.maCJKLanguageTag ),
mbSymbol( rImplFont.mbSymbol ), mbSymbolFlag( rImplFont.mbSymbolFlag ),
mbOutline( rImplFont.mbOutline ), mbOutline( rImplFont.mbOutline ),
mbConfigLookup( rImplFont.mbConfigLookup ), mbConfigLookup( rImplFont.mbConfigLookup ),
mbShadow( rImplFont.mbShadow ), mbShadow( rImplFont.mbShadow ),
...@@ -953,6 +953,35 @@ bool ImplFont::operator==( const ImplFont& rOther ) const ...@@ -953,6 +953,35 @@ bool ImplFont::operator==( const ImplFont& rOther ) const
return true; return true;
} }
bool ImplFont::CompareDeviceIndependentFontAttributes(const ImplFont& rOther) const
{
if (maFamilyName != rOther.maFamilyName)
return false;
if (maStyleName != rOther.maStyleName)
return false;
if (meWeight != rOther.meWeight)
return false;
if (meItalic != rOther.meItalic)
return false;
if (meFamily != rOther.meFamily)
return false;
if (mePitch != rOther.mePitch)
return false;
if (meWidthType != rOther.meWidthType)
return false;
if (mbSymbolFlag != rOther.mbSymbolFlag)
return false;
return true;
}
void ImplFont::AskConfig() void ImplFont::AskConfig()
{ {
if( mbConfigLookup ) if( mbConfigLookup )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment