XclExpFontBuffer Class Reference

Stores the data of all fonts used in the document. More...

#include <xestyle.hxx>

Inheritance diagram for XclExpFontBuffer:

Inheritance graph
[legend]
Collaboration diagram for XclExpFontBuffer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 XclExpFontBuffer (const XclExpRoot &rRoot)
const XclExpFontGetFont (sal_uInt16 nXclFont) const
 Returns the specified font from font list.
const XclFontDataGetAppFontData () const
 Returns the application font data of this file, needed e.g.
sal_uInt16 Insert (const XclFontData &rFontData, XclExpColorType eColorType, bool bAppFont=false)
 Inserts a new font with the passed font data into the buffer if not present.
sal_uInt16 Insert (const Font &rFont, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the font into the buffer if not present.
sal_uInt16 Insert (const SvxFont &rFont, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the SvxFont into the buffer if not present, e.g.
sal_uInt16 Insert (const SfxItemSet &rItemSet, sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the font contained in the passed item set into the buffer, if not present.
sal_uInt16 Insert (const ScPatternAttr &rPattern, sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the font contained in rPattern into the buffer if not present.
virtual void Save (XclExpStream &rStrm)
 Writes all FONT records contained in this buffer.
virtual void SaveXml (XclExpXmlStream &rStrm)
 XclExpFontBuffer (const XclExpRoot &rRoot)
const XclExpFontGetFont (sal_uInt16 nXclFont) const
 Returns the specified font from font list.
const XclFontDataGetAppFontData () const
 Returns the application font data of this file, needed e.g.
sal_uInt16 Insert (const XclFontData &rFontData, XclExpColorType eColorType, bool bAppFont=false)
 Inserts a new font with the passed font data into the buffer if not present.
sal_uInt16 Insert (const Font &rFont, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the font into the buffer if not present.
sal_uInt16 Insert (const SvxFont &rFont, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the SvxFont into the buffer if not present, e.g.
sal_uInt16 Insert (const SfxItemSet &rItemSet, sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the font contained in the passed item set into the buffer, if not present.
sal_uInt16 Insert (const ScPatternAttr &rPattern, sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont=false)
 Inserts the font contained in rPattern into the buffer if not present.
virtual void Save (XclExpStream &rStrm)
 Writes all FONT records contained in this buffer.
virtual void SaveXml (XclExpXmlStream &rStrm)

Static Public Member Functions

static sal_Int16 GetFirstUsedScript (const SfxItemSet &rItemSet)
 Returns the script type of the first font item found in the item set and its parents.
static Font GetFontFromItemSet (const SfxItemSet &rItemSet, sal_Int16 nScript)
 Returns a VCL font object filled from the passed item set.
static bool CheckItems (const SfxItemSet &rItemSet, sal_Int16 nScript, bool bDeep)
 Returns true, if at least one font related item is set in the passed item set.

Private Types

typedef XclExpRecordList
< XclExpFont
XclExpFontList
typedef
XclExpFontList::RecordRefType 
XclExpFontRef
typedef XclExpRecordList
< XclExpFont
XclExpFontList
typedef
XclExpFontList::RecordRefType 
XclExpFontRef

Private Member Functions

void InitDefaultFonts ()
 Initializes the default fonts for the current BIFF version.
size_t Find (const XclFontData &rFontData)
 Tries to find the passed font and returns the current list index.
void InitDefaultFonts ()
 Initializes the default fonts for the current BIFF version.
size_t Find (const XclFontData &rFontData)
 Tries to find the passed font and returns the current list index.

Private Attributes

XclExpFontList maFontList
size_t mnXclMaxSize
 List of all FONT records.


Detailed Description

Stores the data of all fonts used in the document.

Definition at line 221 of file inc/xestyle.hxx.


Member Typedef Documentation

Definition at line 270 of file inc/xestyle.hxx.

Definition at line 271 of file inc/xestyle.hxx.

Definition at line 248 of file xlsx/xestyle.hxx.

Definition at line 249 of file xlsx/xestyle.hxx.


Constructor & Destructor Documentation

XclExpFontBuffer::XclExpFontBuffer ( const XclExpRoot rRoot  )  [explicit]

XclExpFontBuffer::XclExpFontBuffer ( const XclExpRoot rRoot  )  [explicit]


Member Function Documentation

const XclExpFont * XclExpFontBuffer::GetFont ( sal_uInt16  nXclFont  )  const

Returns the specified font from font list.

Definition at line 1050 of file xestyle.cxx.

References XclExpRecordList< RecType >::GetRecord(), and maFontList.

Referenced by XclExpChFontBase::ConvertFontBase(), and XclExpString::WriteXml().

const XclFontData & XclExpFontBuffer::GetAppFontData (  )  const

Returns the application font data of this file, needed e.g.

for column width.

Definition at line 1055 of file xestyle.cxx.

References EXC_FONT_APP, XclExpRecordList< RecType >::GetRecord(), and maFontList.

Referenced by lclGetCorrectedColWidth().

sal_uInt16 XclExpFontBuffer::Insert ( const XclFontData rFontData,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts a new font with the passed font data into the buffer if not present.

Parameters:
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

Definition at line 1060 of file xestyle.cxx.

References XclExpRecordList< RecType >::AppendNewRecord(), EXC_FONT_APP, EXC_FONTLIST_NOTFOUND, Find(), XclExpRoot::GetRoot(), XclExpRecordList< RecType >::GetSize(), maFontList, mnXclMaxSize, nPos, XclExpRecordList< RecType >::ReplaceRecord(), and XclRoot::SetCharWidth().

Referenced by XclExpChRoot::ConvertFont(), XclExpXF::Init(), Insert(), and lclCreateFormattedString().

sal_uInt16 XclExpFontBuffer::Insert ( const Font rFont,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the font into the buffer if not present.

Parameters:
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

Definition at line 1092 of file xestyle.cxx.

References Insert().

sal_uInt16 XclExpFontBuffer::Insert ( const SvxFont rFont,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the SvxFont into the buffer if not present, e.g.

where escapements are used.

Parameters:
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

Definition at line 1098 of file xestyle.cxx.

References Insert().

sal_uInt16 XclExpFontBuffer::Insert ( const SfxItemSet rItemSet,
sal_Int16  nScript,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the font contained in the passed item set into the buffer, if not present.

Parameters:
nScript The script type of the font properties to be used.
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

Definition at line 1104 of file xestyle.cxx.

References XclExpFontHelper::GetFontFromItemSet(), XclExpRoot::GetRoot(), and Insert().

sal_uInt16 XclExpFontBuffer::Insert ( const ScPatternAttr rPattern,
sal_Int16  nScript,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the font contained in rPattern into the buffer if not present.

Parameters:
nScript The script type of the font properties to be used.
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

Definition at line 1112 of file xestyle.cxx.

References SfxSetItem::GetItemSet(), and Insert().

void XclExpFontBuffer::Save ( XclExpStream rStrm  )  [virtual]

Writes all FONT records contained in this buffer.

Reimplemented from XclExpRecordBase.

Definition at line 1118 of file xestyle.cxx.

References maFontList, and XclExpRecordList< RecType >::Save().

void XclExpFontBuffer::SaveXml ( XclExpXmlStream rStrm  )  [virtual]

void XclExpFontBuffer::InitDefaultFonts (  )  [private]

size_t XclExpFontBuffer::Find ( const XclFontData rFontData  )  [private]

Tries to find the passed font and returns the current list index.

Definition at line 1186 of file xestyle.cxx.

References EXC_FONTLIST_NOTFOUND, XclExpRecordList< RecType >::GetRecord(), XclExpRecordList< RecType >::GetSize(), lclCalcHash(), maFontList, and nPos.

Referenced by Insert().

const XclExpFont* XclExpFontBuffer::GetFont ( sal_uInt16  nXclFont  )  const

Returns the specified font from font list.

const XclFontData& XclExpFontBuffer::GetAppFontData (  )  const

Returns the application font data of this file, needed e.g.

for column width.

sal_uInt16 XclExpFontBuffer::Insert ( const XclFontData rFontData,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts a new font with the passed font data into the buffer if not present.

Parameters:
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

sal_uInt16 XclExpFontBuffer::Insert ( const Font rFont,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the font into the buffer if not present.

Parameters:
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

sal_uInt16 XclExpFontBuffer::Insert ( const SvxFont rFont,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the SvxFont into the buffer if not present, e.g.

where escapements are used.

Parameters:
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

sal_uInt16 XclExpFontBuffer::Insert ( const SfxItemSet rItemSet,
sal_Int16  nScript,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the font contained in the passed item set into the buffer, if not present.

Parameters:
nScript The script type of the font properties to be used.
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

sal_uInt16 XclExpFontBuffer::Insert ( const ScPatternAttr rPattern,
sal_Int16  nScript,
XclExpColorType  eColorType,
bool  bAppFont = false 
)

Inserts the font contained in rPattern into the buffer if not present.

Parameters:
nScript The script type of the font properties to be used.
bAppFont true = Sets the application font; false = Inserts a new font.
Returns:
The resulting Excel font index.

virtual void XclExpFontBuffer::Save ( XclExpStream rStrm  )  [virtual]

Writes all FONT records contained in this buffer.

Reimplemented from XclExpRecordBase.

virtual void XclExpFontBuffer::SaveXml ( XclExpXmlStream rStrm  )  [virtual]

Reimplemented from XclExpRecordBase.

sal_Int16 XclExpFontBuffer::GetFirstUsedScript ( const SfxItemSet rItemSet  )  [static]

Returns the script type of the first font item found in the item set and its parents.

Definition at line 1036 of file xlsx-xestyle.cxx.

References ATTR_CJK_FONT, ATTR_CTL_FONT, ATTR_FONT, ScfTools::CheckItem(), and SfxItemSet::GetParent().

Referenced by CheckItems(), and GetFontFromItemSet().

Font XclExpFontBuffer::GetFontFromItemSet ( const SfxItemSet rItemSet,
sal_Int16  nScript 
) [static]

Returns a VCL font object filled from the passed item set.

Definition at line 1065 of file xlsx-xestyle.cxx.

References GetFirstUsedScript(), ScPatternAttr::GetFont(), SC_AUTOCOL_RAW, SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX, and SCRIPTTYPE_LATIN.

Referenced by lclCreateFormattedString().

bool XclExpFontBuffer::CheckItems ( const SfxItemSet rItemSet,
sal_Int16  nScript,
bool  bDeep 
) [static]

void XclExpFontBuffer::InitDefaultFonts (  )  [private]

Initializes the default fonts for the current BIFF version.

size_t XclExpFontBuffer::Find ( const XclFontData rFontData  )  [private]

Tries to find the passed font and returns the current list index.


Member Data Documentation

Definition at line 273 of file inc/xestyle.hxx.

Referenced by Find(), GetAppFontData(), GetFont(), InitDefaultFonts(), Insert(), Save(), and SaveXml().

List of all FONT records.

Definition at line 274 of file inc/xestyle.hxx.

Referenced by Insert(), and XclExpFontBuffer().


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

Generated on Thu Apr 29 18:50:58 2010 for ooo-build Module sc (ooo/OOO320_m15) by  doxygen 1.5.6