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 ()
 Font color. More...
 
 XclFontData (const vcl::Font &rFont, model::ComplexColor const &rComplexColor)
 Constructs a font data structure and fills it with the passed font attributes (except color). More...
 
 XclFontData (const SvxFont &rFont, model::ComplexColor const &rComplexColor)
 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, model::ComplexColor const &rComplexColor)
 Fills all members (except color and escapement) from the passed font. More...
 
void FillFromSvxFont (const SvxFont &rFont, model::ComplexColor const &rComplexColor)
 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...
 
sal_uInt16 mnHeight
 String with styles (bold, italic). 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...
 
model::ComplexColor maComplexColor
 true = Shadowed. 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 284 of file xlstyle.hxx.

Constructor & Destructor Documentation

◆ XclFontData() [1/3]

XclFontData::XclFontData ( )
explicit

Font color.

Constructs an empty font data structure.

Definition at line 172 of file xlstyle.cxx.

References Clear().

◆ XclFontData() [2/3]

XclFontData::XclFontData ( const vcl::Font rFont,
model::ComplexColor const &  rComplexColor 
)
explicit

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

Definition at line 177 of file xlstyle.cxx.

References Clear(), and FillFromVclFont().

◆ XclFontData() [3/3]

XclFontData::XclFontData ( const SvxFont rFont,
model::ComplexColor const &  rComplexColor 
)
explicit

As directly above but also fills in the escapement member.

Definition at line 183 of file xlstyle.cxx.

References FillFromSvxFont().

Member Function Documentation

◆ Clear()

void XclFontData::Clear ( )

◆ FillFromSvxFont()

void XclFontData::FillFromSvxFont ( const SvxFont rFont,
model::ComplexColor const &  rComplexColor 
)

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

Definition at line 220 of file xlstyle.cxx.

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

Referenced by XclFontData().

◆ FillFromVclFont()

void XclFontData::FillFromVclFont ( const vcl::Font rFont,
model::ComplexColor const &  rComplexColor 
)

◆ GetApiEscapement()

sal_Int16 XclFontData::GetApiEscapement ( ) const

Returns the API escapement style.

Definition at line 440 of file xlstyle.cxx.

References EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

Referenced by XclFontPropSetHelper::WriteFontProperties().

◆ GetApiFamily()

sal_Int16 XclFontData::GetApiFamily ( ) const

Returns the API font family.

Definition at line 396 of file xlstyle.cxx.

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

Referenced by XclFontPropSetHelper::WriteFontProperties().

◆ GetApiFontEncoding()

sal_Int16 XclFontData::GetApiFontEncoding ( ) const

Returns the API font text encoding.

Definition at line 411 of file xlstyle.cxx.

References GetFontEncoding().

Referenced by XclFontPropSetHelper::WriteFontProperties().

◆ GetApiHeight()

float XclFontData::GetApiHeight ( ) const

Returns the API font height.

Definition at line 391 of file xlstyle.cxx.

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

Referenced by XclFontPropSetHelper::WriteFontProperties().

◆ GetApiPosture()

Awt::FontSlant XclFontData::GetApiPosture ( ) const

Returns the API font posture.

Definition at line 417 of file xlstyle.cxx.

References mbItalic.

Referenced by XclFontPropSetHelper::WriteFontProperties().

◆ GetApiStrikeout()

sal_Int16 XclFontData::GetApiStrikeout ( ) const

Returns the API font strike-out style.

Definition at line 451 of file xlstyle.cxx.

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

Referenced by XclFontPropSetHelper::WriteFontProperties().

◆ GetApiUnderline()

sal_Int16 XclFontData::GetApiUnderline ( ) const

◆ GetApiWeight()

float XclFontData::GetApiWeight ( ) const

Returns the API font weight.

Definition at line 422 of file xlstyle.cxx.

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

Referenced by XclFontPropSetHelper::WriteFontProperties().

◆ GetFontEncoding()

rtl_TextEncoding XclFontData::GetFontEncoding ( ) const

Returns the font text encoding.

Definition at line 248 of file xlstyle.cxx.

References mnCharSet.

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

◆ GetScEscapement()

SvxEscapement XclFontData::GetScEscapement ( ) const

Returns the Calc escapement style.

Definition at line 291 of file xlstyle.cxx.

References EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

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

◆ GetScFamily()

FontFamily XclFontData::GetScFamily ( rtl_TextEncoding  eDefTextEnc) const

◆ GetScPosture()

FontItalic XclFontData::GetScPosture ( ) const

Returns the Calc font posture.

Definition at line 254 of file xlstyle.cxx.

References ITALIC_NONE, ITALIC_NORMAL, and mbItalic.

Referenced by XclImpFont::FillToItemSet().

◆ GetScStrikeout()

FontStrikeout XclFontData::GetScStrikeout ( ) const

Returns the Calc strike-out style.

Definition at line 302 of file xlstyle.cxx.

References mbStrikeout, STRIKEOUT_NONE, and STRIKEOUT_SINGLE.

Referenced by XclImpFont::FillToItemSet().

◆ GetScUnderline()

FontLineStyle XclFontData::GetScUnderline ( ) const

◆ GetScWeight()

FontWeight XclFontData::GetScWeight ( ) const

◆ SetApiEscapement()

void XclFontData::SetApiEscapement ( sal_Int16  nApiEscapem)

Sets the API escapement style.

Definition at line 501 of file xlstyle.cxx.

References EXC_FONTESC_NONE, EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

Referenced by XclFontPropSetHelper::ReadFontProperties().

◆ SetApiFamily()

void XclFontData::SetApiFamily ( sal_Int16  nApiFamily)

◆ SetApiHeight()

void XclFontData::SetApiHeight ( float  fPoint)

Sets the API font height.

Definition at line 456 of file xlstyle.cxx.

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

◆ SetApiPosture()

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

Sets the API font posture.

Definition at line 475 of file xlstyle.cxx.

References mbItalic.

◆ SetApiStrikeout()

void XclFontData::SetApiStrikeout ( sal_Int16  nApiStrikeout)

Sets the API font strike-out style.

Definition at line 511 of file xlstyle.cxx.

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

◆ SetApiUnderline()

void XclFontData::SetApiUnderline ( sal_Int16  nApiUnderl)

Sets the API font underline style.

Definition at line 489 of file xlstyle.cxx.

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

◆ SetApiWeight()

void XclFontData::SetApiWeight ( float  fApiWeight)

Sets the API font weight.

Definition at line 484 of file xlstyle.cxx.

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

◆ SetFontEncoding()

void XclFontData::SetFontEncoding ( rtl_TextEncoding  eFontEnc)

Sets the font text encoding.

Definition at line 329 of file xlstyle.cxx.

References mnCharSet.

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

◆ SetScEscapement()

void XclFontData::SetScEscapement ( short  nScEscapem)

Sets the Calc escapement style.

Definition at line 371 of file xlstyle.cxx.

References EXC_FONTESC_NONE, EXC_FONTESC_SUB, EXC_FONTESC_SUPER, and mnEscapem.

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

◆ SetScFamily()

void XclFontData::SetScFamily ( FontFamily  eScFamily)

◆ SetScHeight()

void XclFontData::SetScHeight ( sal_Int32  nTwips)

Sets the Calc font height (in twips).

Definition at line 307 of file xlstyle.cxx.

References mnHeight.

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

◆ SetScPosture()

void XclFontData::SetScPosture ( FontItalic  eScPosture)

Sets the Calc font posture.

Definition at line 335 of file xlstyle.cxx.

References ITALIC_NORMAL, ITALIC_OBLIQUE, and mbItalic.

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

◆ SetScStrikeout()

void XclFontData::SetScStrikeout ( FontStrikeout  eScStrikeout)

Sets the Calc strike-out style.

Definition at line 381 of file xlstyle.cxx.

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

Referenced by FillFromVclFont().

◆ SetScUnderline()

void XclFontData::SetScUnderline ( FontLineStyle  eScUnderl)

◆ SetScWeight()

void XclFontData::SetScWeight ( FontWeight  eScWeight)

Member Data Documentation

◆ maComplexColor

model::ComplexColor XclFontData::maComplexColor

◆ maName

OUString XclFontData::maName

◆ maStyle

OUString XclFontData::maStyle

Font name.

Definition at line 287 of file xlstyle.hxx.

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

◆ mbItalic

bool XclFontData::mbItalic

◆ mbOutline

bool XclFontData::mbOutline

◆ mbShadow

bool XclFontData::mbShadow

◆ mbStrikeout

bool XclFontData::mbStrikeout

◆ mnCharSet

sal_uInt8 XclFontData::mnCharSet

◆ mnEscapem

sal_uInt16 XclFontData::mnEscapem

◆ mnFamily

sal_uInt8 XclFontData::mnFamily

◆ mnHeight

sal_uInt16 XclFontData::mnHeight

◆ mnUnderline

sal_uInt8 XclFontData::mnUnderline

◆ mnWeight

sal_uInt16 XclFontData::mnWeight

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