diff options
Diffstat (limited to 'vcl/unx/source/gdi/xlfd_attr.hxx')
-rw-r--r-- | vcl/unx/source/gdi/xlfd_attr.hxx | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/vcl/unx/source/gdi/xlfd_attr.hxx b/vcl/unx/source/gdi/xlfd_attr.hxx index 18386a314e4b..dbeed8228cd7 100644 --- a/vcl/unx/source/gdi/xlfd_attr.hxx +++ b/vcl/unx/source/gdi/xlfd_attr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,39 +34,39 @@ struct Attribute { - const char* mpName; + const char* mpName; unsigned short mnLength; - unsigned short mnValue; - unsigned short mnFeature; - String* mpAnnotation; - rtl::OString* mpKeyName; + unsigned short mnValue; + unsigned short mnFeature; + String* mpAnnotation; + rtl::OString* mpKeyName; - const char* GetName() const + const char* GetName() const { return mpName; } - unsigned short GetValue() const + unsigned short GetValue() const { return mnValue; } unsigned short GetLength() const { return mnLength; } - Bool HasFeature( unsigned short nFeature ) const + Bool HasFeature( unsigned short nFeature ) const { return ((mnFeature & nFeature) != 0); } const String &GetAnnotation() const { return *mpAnnotation; } const rtl::OString& GetKey(); - void InitKey(); + void InitKey(); - void SetName( const char *p, int nLen ); - void SetValue( unsigned short nIn ) + void SetName( const char *p, int nLen ); + void SetValue( unsigned short nIn ) { mnValue = nIn; } - void SetAnnotation( String *pString ) + void SetAnnotation( String *pString ) { mpAnnotation = pString; } - void SetFeature( unsigned short nFeature ) + void SetFeature( unsigned short nFeature ) { mnFeature = nFeature; } - void TagFeature( unsigned short nFeature ); + void TagFeature( unsigned short nFeature ); - int Compare( const char *p, int nLen ); - Bool ExactMatch( const char *p, int nLen ); - void Release(); + int Compare( const char *p, int nLen ); + Bool ExactMatch( const char *p, int nLen ); + void Release(); }; @@ -79,14 +79,14 @@ extern "C" { typedef rtl_TextEncoding(*AttributeClassifierT)(const char* pStr); } -#define XLFD_FEATURE_NONE 0x0000 -#define XLFD_FEATURE_NARROW 0x0001 -#define XLFD_FEATURE_OL_GLYPH 0x0002 -#define XLFD_FEATURE_OL_CURSOR 0x0004 -#define XLFD_FEATURE_REDUNDANTSTYLE 0x0008 -#define XLFD_FEATURE_APPLICATION_FONT 0x0010 +#define XLFD_FEATURE_NONE 0x0000 +#define XLFD_FEATURE_NARROW 0x0001 +#define XLFD_FEATURE_OL_GLYPH 0x0002 +#define XLFD_FEATURE_OL_CURSOR 0x0004 +#define XLFD_FEATURE_REDUNDANTSTYLE 0x0008 +#define XLFD_FEATURE_APPLICATION_FONT 0x0010 -#define XLFD_FEATURE_INTERFACE_FONT 0x0020 +#define XLFD_FEATURE_INTERFACE_FONT 0x0020 #define XLFD_FEATURE_LQ 0x0040 #define XLFD_FEATURE_MQ 0x0080 #define XLFD_FEATURE_HQ 0x0100 @@ -106,28 +106,28 @@ class AttributeStorage { private: - Attribute* mpList; - unsigned short mnSize; - unsigned short mnCount; + Attribute* mpList; + unsigned short mnSize; + unsigned short mnCount; unsigned short mnLastmatch; unsigned short mnDefaultValue; - void Enlarge(); + void Enlarge(); AttributeStorage(); public: AttributeStorage( unsigned short nDefaultValue ); ~AttributeStorage(); - unsigned short Insert( const char *pString, int nLength ); - Attribute* Retrieve( unsigned short nIndex ) const ; - void AddClassification( Attribute *pClassification, + unsigned short Insert( const char *pString, int nLength ); + Attribute* Retrieve( unsigned short nIndex ) const ; + void AddClassification( Attribute *pClassification, unsigned short nNum ); - void AddClassification( AttributeClassifierT Classify ); - void TagFeature( unsigned short nFeature ); - void AddAnnotation( AttributeAnnotatorT Annotate ); + void AddClassification( AttributeClassifierT Classify ); + void TagFeature( unsigned short nFeature ); + void AddAnnotation( AttributeAnnotatorT Annotate ); #if OSL_DEBUG_LEVEL > 1 - void Dump(); + void Dump(); #endif }; @@ -161,20 +161,20 @@ class AttributeProvider { private: - AttributeStorage* mpField[ eXLFDMaxEntry ]; + AttributeStorage* mpField[ eXLFDMaxEntry ]; - AttributeStorage* GetField( eXLFDAttributeT eXLFDField ) + AttributeStorage* GetField( eXLFDAttributeT eXLFDField ) { return mpField[ eXLFDField]; } public: AttributeProvider (); ~AttributeProvider (); - void AddClassification(); - void AddAnnotation(); - void TagFeature(); + void AddClassification(); + void AddAnnotation(); + void TagFeature(); #if OSL_DEBUG_LEVEL > 1 - void Dump(); + void Dump(); #endif // these are just shortcuts or proxies for the most common used @@ -194,34 +194,34 @@ class AttributeProvider { AttributeStorage* GetCharset() { return GetField(eXLFDCharset); } - Attribute* RetrieveFoundry( unsigned short nIndex ) + Attribute* RetrieveFoundry( unsigned short nIndex ) { return GetFoundry()->Retrieve(nIndex); } - Attribute* RetrieveFamily( unsigned short nIndex ) + Attribute* RetrieveFamily( unsigned short nIndex ) { return GetFamily()->Retrieve(nIndex); } - Attribute* RetrieveWeight( unsigned short nIndex ) + Attribute* RetrieveWeight( unsigned short nIndex ) { return GetWeight()->Retrieve(nIndex); } - Attribute* RetrieveSlant( unsigned short nIndex ) + Attribute* RetrieveSlant( unsigned short nIndex ) { return GetSlant()->Retrieve(nIndex); } - Attribute* RetrieveSetwidth( unsigned short nIndex ) + Attribute* RetrieveSetwidth( unsigned short nIndex ) { return GetSetwidth()->Retrieve(nIndex); } - Attribute* RetrieveAddstyle( unsigned short nIndex ) + Attribute* RetrieveAddstyle( unsigned short nIndex ) { return GetAddstyle()->Retrieve(nIndex); } - Attribute* RetrieveCharset( unsigned short nIndex ) + Attribute* RetrieveCharset( unsigned short nIndex ) { return GetCharset()->Retrieve(nIndex); } - unsigned short InsertFoundry( const char *pString, int nLength ) + unsigned short InsertFoundry( const char *pString, int nLength ) { return GetFoundry()->Insert(pString, nLength); } - unsigned short InsertFamily( const char *pString, int nLength ) + unsigned short InsertFamily( const char *pString, int nLength ) { return GetFamily()->Insert(pString, nLength); } - unsigned short InsertWeight( const char *pString, int nLength ) + unsigned short InsertWeight( const char *pString, int nLength ) { return GetWeight()->Insert(pString, nLength); } - unsigned short InsertSlant( const char *pString, int nLength ) + unsigned short InsertSlant( const char *pString, int nLength ) { return GetSlant()->Insert(pString, nLength); } - unsigned short InsertSetwidth( const char *pString, int nLength ) + unsigned short InsertSetwidth( const char *pString, int nLength ) { return GetSetwidth()->Insert(pString, nLength);} - unsigned short InsertAddstyle( const char *pString, int nLength ) + unsigned short InsertAddstyle( const char *pString, int nLength ) { return GetAddstyle()->Insert(pString, nLength);} - unsigned short InsertCharset( const char *pString, int nLength ) + unsigned short InsertCharset( const char *pString, int nLength ) { return GetCharset()->Insert(pString, nLength); } }; |