filters

#include <excel.h>

Inheritance diagram for Swinder::FontRecord:
Swinder::Record

Public Types

enum  { Normal = 0 , Superscript = 1 , Subscript = 2 }
 
enum  {
  None = 0 , Single = 1 , Double = 2 , SingleAccounting = 0x21 ,
  DoubleAccounting = 0x22
}
 

Public Member Functions

unsigned int rtti ()
 
 FontRecord ()
 
 FontRecord (const FontRecord &fr)
 
FontRecord & operator= (const FontRecord &fr)
 
virtual ~FontRecord ()
 
unsigned height () const
 
void setHeight (unsigned h)
 
UString fontName () const
 
void setFontName (const UString &fn)
 
unsigned fontFamily () const
 
void setFontFamily (unsigned f)
 
unsigned characterSet () const
 
void setCharacterSet (unsigned s)
 
unsigned colorIndex () const
 
void setColorIndex (unsigned c)
 
unsigned boldness () const
 
void setBoldness (unsigned b)
 
bool italic () const
 
void setItalic (bool i)
 
bool strikeout () const
 
void setStrikeout (bool s)
 
unsigned escapement () const
 
void setEscapement (unsigned s)
 
unsigned underline () const
 
void setUnderline (unsigned u)
 
virtual void setData (unsigned size, const unsigned char *data)
 
virtual const char * name ()
 
virtual void dump (std::ostream &out) const
 
- Public Member Functions inherited from Swinder::Record
 Record ()
 
virtual ~Record ()
 
void setVersion (unsigned v)
 
unsigned version ()
 
void setPosition (unsigned pos)
 
unsigned position () const
 

Static Public Attributes

static const unsigned int id = 0x0031
 
- Static Public Attributes inherited from Swinder::Record
static const unsigned int id = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from Swinder::Record
static Record * create (unsigned type)
 
- Protected Attributes inherited from Swinder::Record
unsigned stream_position
 
unsigned ver
 

Detailed Description

Font information.

Class FontRecord represents Font record, which has the information about specific font used in the document. Several Font records creates a font table, whose index will be referred in XFormat records.

A note about weirdness: font index #4 is never used. Hence, the first Font record will be index #0, the second is #1, the third is #2, the fourth is #3, but the fourth will be index #5.

See also
XFRecord

Definition at line 1276 of file excel.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 1306 of file excel.h.

◆ anonymous enum

anonymous enum

Definition at line 1311 of file excel.h.

Constructor & Destructor Documentation

◆ FontRecord() [1/2]

FontRecord::FontRecord ( )

Creates a new Font record.

Definition at line 2566 of file excel.cpp.

◆ FontRecord() [2/2]

FontRecord::FontRecord ( const FontRecord &  fr)

Creates a copy of another Font record.

Definition at line 2586 of file excel.cpp.

◆ ~FontRecord()

FontRecord::~FontRecord ( )
virtual

Destroy the record.

Definition at line 2581 of file excel.cpp.

Member Function Documentation

◆ boldness()

unsigned FontRecord::boldness ( ) const

Returns the boldness of the font.

Standard values are 400 for normal and 700 for bold.

See also
setBoldness

Definition at line 2657 of file excel.cpp.

◆ characterSet()

unsigned FontRecord::characterSet ( ) const

Definition at line 2637 of file excel.cpp.

◆ colorIndex()

unsigned FontRecord::colorIndex ( ) const

Returns index of the color of the font.

See also
setColorIndex

Definition at line 2647 of file excel.cpp.

◆ dump()

void FontRecord::dump ( std::ostream &  out) const
virtual

Dumps record information to output stream.

For debugging only.

Reimplemented from Swinder::Record.

Definition at line 2734 of file excel.cpp.

◆ escapement()

unsigned FontRecord::escapement ( ) const

Returns Font::Superscript if superscript is set, or Font::Subscript if subscript is set, or Font::Normal in other case.

See also
setEscapement

Definition at line 2687 of file excel.cpp.

◆ fontFamily()

unsigned FontRecord::fontFamily ( ) const

Definition at line 2627 of file excel.cpp.

◆ fontName()

UString FontRecord::fontName ( ) const

Returns the name of font, e.g "Arial".

See also
setFontName

Definition at line 2617 of file excel.cpp.

◆ height()

unsigned FontRecord::height ( ) const

Definition at line 2607 of file excel.cpp.

◆ italic()

bool FontRecord::italic ( ) const

Returns true if italic has been set.

See also
setItalic

Definition at line 2667 of file excel.cpp.

◆ name()

virtual const char * Swinder::FontRecord::name ( )
inlinevirtual

Returns the name of the record.

For debugging only.

Reimplemented from Swinder::Record.

Definition at line 1437 of file excel.h.

◆ operator=()

FontRecord & FontRecord::operator= ( const FontRecord &  fr)

Assigns from another Font record.

Definition at line 2592 of file excel.cpp.

◆ rtti()

unsigned int Swinder::FontRecord::rtti ( )
inlinevirtual

Reimplemented from Swinder::Record.

Definition at line 1282 of file excel.h.

◆ setBoldness()

void FontRecord::setBoldness ( unsigned  b)

Sets the boldness of the font.

Standard values are 400 for normal and 700 for bold.

See also
boldness

Definition at line 2662 of file excel.cpp.

◆ setCharacterSet()

void FontRecord::setCharacterSet ( unsigned  s)

Definition at line 2642 of file excel.cpp.

◆ setColorIndex()

void FontRecord::setColorIndex ( unsigned  c)

Sets the index of the color of the font.

See also
colorIndex

Definition at line 2652 of file excel.cpp.

◆ setData()

void FontRecord::setData ( unsigned  size,
const unsigned char *  data 
)
virtual

Sets the data for this record.

Reimplemented from Swinder::Record.

Definition at line 2708 of file excel.cpp.

◆ setEscapement()

void FontRecord::setEscapement ( unsigned  s)

Sets the superscript or subscript.

If s is Font::Superscript, then superscript is set. If s is Font::Subscript, then subscript is set.

See also
escapement

Definition at line 2692 of file excel.cpp.

◆ setFontFamily()

void FontRecord::setFontFamily ( unsigned  f)

Definition at line 2632 of file excel.cpp.

◆ setFontName()

void FontRecord::setFontName ( const UString &  fn)

Sets the name of the font.

See also
fontName

Definition at line 2622 of file excel.cpp.

◆ setHeight()

void FontRecord::setHeight ( unsigned  h)

Definition at line 2612 of file excel.cpp.

◆ setItalic()

void FontRecord::setItalic ( bool  i)

If i is true, italic is set on; otherwise italic is set off.

See also
italic

Definition at line 2672 of file excel.cpp.

◆ setStrikeout()

void FontRecord::setStrikeout ( bool  s)

If s is true, strikeout is set on; otherwise strikeout is set off.

See also
strikeout

Definition at line 2682 of file excel.cpp.

◆ setUnderline()

void FontRecord::setUnderline ( unsigned  u)

Sets the underline style of the font.

Possible values are Font::None, Font::Single, Font::Double, Font::SingleAccounting and Font::DoubleAccounting.

See also
underline

Definition at line 2702 of file excel.cpp.

◆ strikeout()

bool FontRecord::strikeout ( ) const

Returns true if strikeout has been set.

See also
setStrikeout

Definition at line 2677 of file excel.cpp.

◆ underline()

unsigned FontRecord::underline ( ) const

Returns the underline style of the font.

Possible values are Font::None, Font::Single, Font::Double, Font::SingleAccounting and Font::DoubleAccounting.

See also
setUnderline

Definition at line 2697 of file excel.cpp.

Member Data Documentation

◆ id

const unsigned int FontRecord::id = 0x0031
static

Definition at line 1280 of file excel.h.


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