LibreOffice Module sc (master)  1
Public Member Functions | Public Attributes | List of all members
XclFontData Struct Reference

This struct helps reading and writing Excel fonts. More...

#include <xlstyle.hxx>

Collaboration diagram for XclFontData:
[legend]

Public Member Functions

 XclFontData ()
 true = Shadowed. More...
 
 XclFontData (const vcl::Font &rFont)
 Constructs a font data structure and fills it with the passed font attributes (except color). More...
 
 XclFontData (const SvxFont &rFont)
 As directly above but also fills in the escapement member. More...
 
void Clear ()
 Resets all members to default (empty) values. More...
 
void FillFromVclFont (const vcl::Font &rFont)
 Fills all members (except color and escapement) from the passed font. More...
 
void FillFromSvxFont (const SvxFont &rFont)
 Fills all members (except color) from the passed SVX font. More...
 
FontFamily GetScFamily (rtl_TextEncoding eDefTextEnc) const
 Returns the Calc font family. More...
 
rtl_TextEncoding GetFontEncoding () const
 Returns the font text encoding. More...
 
FontItalic GetScPosture () const
 Returns the Calc font posture. More...
 
FontWeight GetScWeight () const
 Returns the Calc font weight. More...
 
FontLineStyle GetScUnderline () const
 Returns the Calc font underline style. More...
 
SvxEscapement GetScEscapement () const
 Returns the Calc escapement style. More...
 
FontStrikeout GetScStrikeout () const
 Returns the Calc strike-out style. More...
 
void SetScHeight (sal_Int32 nTwips)
 Sets the Calc font height (in twips). More...
 
void SetScFamily (FontFamily eScFamily)
 Sets the Calc font family. More...
 
void SetFontEncoding (rtl_TextEncoding eFontEnc)
 Sets the font text encoding. More...
 
void SetScPosture (FontItalic eScPosture)
 Sets the Calc font posture. More...
 
void SetScWeight (FontWeight eScWeight)
 Sets the Calc font weight. More...
 
void SetScUnderline (FontLineStyle eScUnderl)
 Sets the Calc underline style. More...
 
void SetScEscapement (short nScEscapem)
 Sets the Calc escapement style. More...
 
void SetScStrikeout (FontStrikeout eScStrikeout)
 Sets the Calc strike-out style. More...
 
float GetApiHeight () const
 Returns the API font height. More...
 
sal_Int16 GetApiFamily () const
 Returns the API font family. More...
 
sal_Int16 GetApiFontEncoding () const
 Returns the API font text encoding. More...
 
css::awt::FontSlant GetApiPosture () const
 Returns the API font posture. More...
 
float GetApiWeight () const
 Returns the API font weight. More...
 
sal_Int16 GetApiUnderline () const
 Returns the API font underline style. More...
 
sal_Int16 GetApiEscapement () const
 Returns the API escapement style. More...
 
sal_Int16 GetApiStrikeout () const
 Returns the API font strike-out style. More...
 
void SetApiHeight (float fPoint)
 Sets the API font height. More...
 
void SetApiFamily (sal_Int16 nApiFamily)
 Sets the API font family. More...
 
void SetApiPosture (css::awt::FontSlant eApiPosture)
 Sets the API font posture. More...
 
void SetApiWeight (float fApiWeight)
 Sets the API font weight. More...
 
void SetApiUnderline (sal_Int16 nApiUnderl)
 Sets the API font underline style. More...
 
void SetApiEscapement (sal_Int16 nApiEscapem)
 Sets the API escapement style. More...
 
void SetApiStrikeout (sal_Int16 nApiStrikeout)
 Sets the API font strike-out style. More...
 

Public Attributes

OUString maName
 
OUString maStyle
 Font name. More...
 
Color maColor
 String with styles (bold, italic). More...
 
sal_uInt16 mnHeight
 Font color. More...
 
sal_uInt16 mnWeight
 Font height in twips (1/20 of a point). More...
 
sal_uInt16 mnEscapem
 Boldness: 400=normal, 700=bold. More...
 
sal_uInt8 mnFamily
 Escapement type. More...
 
sal_uInt8 mnCharSet
 Windows font family. More...
 
sal_uInt8 mnUnderline
 Windows character set. More...
 
bool mbItalic
 Underline style. More...
 
bool mbStrikeout
 true = Italic. More...
 
bool mbOutline
 true = Struck out. More...
 
bool mbShadow
 true = Outlined. More...
 

Detailed Description

This struct helps reading and writing Excel fonts.

It stores all Excel compatible properties of a font. In detail this is the name, family, character set, height, color, boldness, posture, script, underline, strikeout, outline and shadow of the font.

Definition at line 285 of file xlstyle.hxx.

Constructor & Destructor Documentation

XclFontData::XclFontData ( )
explicit

true = Shadowed.

Constructs an empty font data structure.

Definition at line 174 of file xlstyle.cxx.

References Clear().

XclFontData::XclFontData ( const vcl::Font rFont)
explicit

Constructs a font data structure and fills it with the passed font attributes (except color).

Definition at line 179 of file xlstyle.cxx.

References Clear(), and FillFromVclFont().

XclFontData::XclFontData ( const SvxFont rFont)
explicit

As directly above but also fills in the escapement member.

Definition at line 185 of file xlstyle.cxx.

References FillFromSvxFont().

Member Function Documentation

void XclFontData::Clear ( )
void XclFontData::FillFromSvxFont ( const SvxFont rFont)

Fills all members (except color) from the passed SVX font.

Definition at line 221 of file xlstyle.cxx.

References FillFromVclFont(), SvxFont::GetEscapement(), and SetScEscapement().

Referenced by XclFontData().

void XclFontData::FillFromVclFont ( const vcl::Font rFont)
sal_Int16 XclFontData::GetApiEscapement ( ) const

Returns the API escapement style.

Definition at line 441 of file xlstyle.cxx.

References EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

Referenced by XclFontPropSetHelper::WriteFontProperties().

sal_Int16 XclFontData::GetApiFamily ( ) const

Returns the API font family.

Definition at line 397 of file xlstyle.cxx.

References FAMILY_DECORATIVE, FAMILY_MODERN, FAMILY_ROMAN, FAMILY_SCRIPT, FAMILY_SWISS, FAMILY_SYSTEM, and mnFamily.

Referenced by XclFontPropSetHelper::WriteFontProperties().

sal_Int16 XclFontData::GetApiFontEncoding ( ) const

Returns the API font text encoding.

Definition at line 412 of file xlstyle.cxx.

References GetFontEncoding().

Referenced by XclFontPropSetHelper::WriteFontProperties().

float XclFontData::GetApiHeight ( ) const

Returns the API font height.

Definition at line 392 of file xlstyle.cxx.

References mnHeight, o3tl::pt, and o3tl::twip.

Referenced by XclFontPropSetHelper::WriteFontProperties().

Awt::FontSlant XclFontData::GetApiPosture ( ) const

Returns the API font posture.

Definition at line 418 of file xlstyle.cxx.

References mbItalic.

Referenced by XclFontPropSetHelper::WriteFontProperties().

sal_Int16 XclFontData::GetApiStrikeout ( ) const

Returns the API font strike-out style.

Definition at line 452 of file xlstyle.cxx.

References mbStrikeout, and condformat::dialog::NONE.

Referenced by XclFontPropSetHelper::WriteFontProperties().

sal_Int16 XclFontData::GetApiUnderline ( ) const
float XclFontData::GetApiWeight ( ) const

Returns the API font weight.

Definition at line 423 of file xlstyle.cxx.

References vcl::unohelper::ConvertFontWeight(), and GetScWeight().

Referenced by XclFontPropSetHelper::WriteFontProperties().

rtl_TextEncoding XclFontData::GetFontEncoding ( ) const

Returns the font text encoding.

Definition at line 249 of file xlstyle.cxx.

References mnCharSet.

Referenced by XclImpFont::FillToItemSet(), GetApiFontEncoding(), XclImpFont::GetFontEncoding(), and XclRoot::SetCharWidth().

SvxEscapement XclFontData::GetScEscapement ( ) const

Returns the Calc escapement style.

Definition at line 292 of file xlstyle.cxx.

References EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

Referenced by XclImpFont::FillToItemSet(), XclXmlUtils::WriteFontData(), and XclFontPropSetHelper::WriteFontProperties().

FontFamily XclFontData::GetScFamily ( rtl_TextEncoding  eDefTextEnc) const
FontItalic XclFontData::GetScPosture ( ) const

Returns the Calc font posture.

Definition at line 255 of file xlstyle.cxx.

References ITALIC_NONE, ITALIC_NORMAL, and mbItalic.

Referenced by XclImpFont::FillToItemSet().

FontStrikeout XclFontData::GetScStrikeout ( ) const

Returns the Calc strike-out style.

Definition at line 303 of file xlstyle.cxx.

References mbStrikeout, STRIKEOUT_NONE, and STRIKEOUT_SINGLE.

Referenced by XclImpFont::FillToItemSet().

FontLineStyle XclFontData::GetScUnderline ( ) const
FontWeight XclFontData::GetScWeight ( ) const
void XclFontData::SetApiEscapement ( sal_Int16  nApiEscapem)

Sets the API escapement style.

Definition at line 502 of file xlstyle.cxx.

References EXC_FONTESC_NONE, EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

Referenced by XclFontPropSetHelper::ReadFontProperties().

void XclFontData::SetApiFamily ( sal_Int16  nApiFamily)
void XclFontData::SetApiHeight ( float  fPoint)

Sets the API font height.

Definition at line 457 of file xlstyle.cxx.

References o3tl::convert(), mnHeight, o3tl::pt, and o3tl::twip.

void XclFontData::SetApiPosture ( css::awt::FontSlant  eApiPosture)

Sets the API font posture.

Definition at line 476 of file xlstyle.cxx.

References mbItalic.

void XclFontData::SetApiStrikeout ( sal_Int16  nApiStrikeout)

Sets the API font strike-out style.

Definition at line 512 of file xlstyle.cxx.

References mbStrikeout, and condformat::dialog::NONE.

void XclFontData::SetApiUnderline ( sal_Int16  nApiUnderl)

Sets the API font underline style.

Definition at line 490 of file xlstyle.cxx.

References EXC_FONTUNDERL_DOUBLE, EXC_FONTUNDERL_NONE, EXC_FONTUNDERL_SINGLE, mnUnderline, and condformat::dialog::NONE.

void XclFontData::SetApiWeight ( float  fApiWeight)

Sets the API font weight.

Definition at line 485 of file xlstyle.cxx.

References vcl::unohelper::ConvertFontWeight(), and SetScWeight().

void XclFontData::SetFontEncoding ( rtl_TextEncoding  eFontEnc)

Sets the font text encoding.

Definition at line 330 of file xlstyle.cxx.

References mnCharSet.

Referenced by FillFromVclFont(), XclExpFontBuffer::InitDefaultFonts(), and XclFontPropSetHelper::ReadFontProperties().

void XclFontData::SetScEscapement ( short  nScEscapem)

Sets the Calc escapement style.

Definition at line 372 of file xlstyle.cxx.

References EXC_FONTESC_NONE, EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

Referenced by XclExpHFConverter::AppendPortion(), and FillFromSvxFont().

void XclFontData::SetScFamily ( FontFamily  eScFamily)
void XclFontData::SetScHeight ( sal_Int32  nTwips)

Sets the Calc font height (in twips).

Definition at line 308 of file xlstyle.cxx.

References mnHeight.

Referenced by FillFromVclFont(), and XclExpFontBuffer::InitDefaultFonts().

void XclFontData::SetScPosture ( FontItalic  eScPosture)

Sets the Calc font posture.

Definition at line 336 of file xlstyle.cxx.

References ITALIC_NORMAL, ITALIC_OBLIQUE, and mbItalic.

Referenced by FillFromVclFont(), XclExpFontBuffer::InitDefaultFonts(), and XclImpFont::SetFontData().

void XclFontData::SetScStrikeout ( FontStrikeout  eScStrikeout)

Sets the Calc strike-out style.

Definition at line 382 of file xlstyle.cxx.

References mbStrikeout, STRIKEOUT_BOLD, STRIKEOUT_DOUBLE, STRIKEOUT_SINGLE, STRIKEOUT_SLASH, and STRIKEOUT_X.

Referenced by FillFromVclFont().

void XclFontData::SetScUnderline ( FontLineStyle  eScUnderl)
void XclFontData::SetScWeight ( FontWeight  eScWeight)

Member Data Documentation

Color XclFontData::maColor
OUString XclFontData::maName
OUString XclFontData::maStyle

Font name.

Definition at line 288 of file xlstyle.hxx.

Referenced by XclExpHFConverter::AppendPortion(), Clear(), FillFromVclFont(), and XclImpFont::SetFontData().

bool XclFontData::mbItalic
bool XclFontData::mbOutline
bool XclFontData::mbShadow
bool XclFontData::mbStrikeout
sal_uInt8 XclFontData::mnCharSet
sal_uInt16 XclFontData::mnEscapem
sal_uInt8 XclFontData::mnFamily
sal_uInt16 XclFontData::mnHeight
sal_uInt8 XclFontData::mnUnderline
sal_uInt16 XclFontData::mnWeight

The documentation for this struct was generated from the following files: