#include <xestyle.hxx>


Public Member Functions | |
| XclExpFontBuffer (const XclExpRoot &rRoot) | |
| const XclExpFont * | GetFont (sal_uInt16 nXclFont) const |
| Returns the specified font from font list. | |
| const XclFontData & | GetAppFontData () 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 XclExpFont * | GetFont (sal_uInt16 nXclFont) const |
| Returns the specified font from font list. | |
| const XclFontData & | GetAppFontData () 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. | |
Definition at line 221 of file inc/xestyle.hxx.
typedef XclExpRecordList< XclExpFont > XclExpFontBuffer::XclExpFontList [private] |
Definition at line 270 of file inc/xestyle.hxx.
typedef XclExpFontList::RecordRefType XclExpFontBuffer::XclExpFontRef [private] |
Definition at line 271 of file inc/xestyle.hxx.
typedef XclExpRecordList< XclExpFont > XclExpFontBuffer::XclExpFontList [private] |
Definition at line 248 of file xlsx/xestyle.hxx.
typedef XclExpFontList::RecordRefType XclExpFontBuffer::XclExpFontRef [private] |
Definition at line 249 of file xlsx/xestyle.hxx.
| XclExpFontBuffer::XclExpFontBuffer | ( | const XclExpRoot & | rRoot | ) | [explicit] |
Definition at line 1036 of file xestyle.cxx.
References DBG_ERROR_BIFF, EXC_BIFF4, EXC_BIFF5, EXC_BIFF8, EXC_FONT_MAXCOUNT4, EXC_FONT_MAXCOUNT5, EXC_FONT_MAXCOUNT8, XclRoot::GetBiff(), InitDefaultFonts(), and mnXclMaxSize.
| XclExpFontBuffer::XclExpFontBuffer | ( | const XclExpRoot & | rRoot | ) | [explicit] |
| 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.
| bAppFont | true = Sets the application font; false = Inserts a new font. |
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.
| bAppFont | true = Sets the application font; false = Inserts a new font. |
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.
| bAppFont | true = Sets the application font; false = Inserts a new font. |
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.
| nScript | The script type of the font properties to be used. | |
| bAppFont | true = Sets the application font; false = Inserts a new font. |
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.
| nScript | The script type of the font properties to be used. | |
| bAppFont | true = Sets the application font; false = Inserts a new font. |
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] |
Reimplemented from XclExpRecordBase.
Definition at line 1123 of file xestyle.cxx.
References XclExpXmlStream::GetCurrentStream(), XclExpRecordList< RecType >::GetSize(), getStr(), XclExpRecordList< RecType >::IsEmpty(), maFontList, and XclExpRecordList< RecType >::SaveXml().
| void XclExpFontBuffer::InitDefaultFonts | ( | ) | [private] |
Initializes the default fonts for the current BIFF version.
Definition at line 1140 of file xestyle.cxx.
References XclExpRecordList< RecType >::AppendNewRecord(), XclExpRecordList< RecType >::AppendRecord(), DBG_ERROR_BIFF, EXC_BIFF5, EXC_BIFF8, EXC_COLOR_CELLTEXT, EXC_OUTPUT_BINARY, FAMILY_DONTKNOW, XclRoot::GetBiff(), XclRoot::GetOutput(), XclExpRoot::GetRoot(), ScfTools::GetSystemTextEncoding(), ITALIC_NONE, ITALIC_NORMAL, maFontList, XclFontData::maName, XclFontData::SetFontEncoding(), XclFontData::SetScFamily(), XclFontData::SetScHeight(), XclFontData::SetScPosture(), XclFontData::SetScWeight(), WEIGHT_BOLD, and WEIGHT_NORMAL.
Referenced by XclExpFontBuffer().
| 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.
| bAppFont | true = Sets the application font; false = Inserts a new font. |
| sal_uInt16 XclExpFontBuffer::Insert | ( | const Font & | rFont, | |
| XclExpColorType | eColorType, | |||
| bool | bAppFont = false | |||
| ) |
Inserts the font into the buffer if not present.
| bAppFont | true = Sets the application font; false = Inserts a new font. |
| 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.
| bAppFont | true = Sets the application font; false = Inserts a new font. |
| 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.
| nScript | The script type of the font properties to be used. | |
| bAppFont | true = Sets the application font; false = Inserts a new font. |
| 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.
| nScript | The script type of the font properties to be used. | |
| bAppFont | true = Sets the application font; false = Inserts a new font. |
| virtual void XclExpFontBuffer::Save | ( | XclExpStream & | rStrm | ) | [virtual] |
| 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] |
Returns true, if at least one font related item is set in the passed item set.
| bDeep | true = Searches in parent item sets too. |
Definition at line 1089 of file xlsx-xestyle.cxx.
References ATTR_CJK_FONT, ATTR_CJK_FONT_HEIGHT, ATTR_CJK_FONT_POSTURE, ATTR_CJK_FONT_WEIGHT, ATTR_CTL_FONT, ATTR_CTL_FONT_HEIGHT, ATTR_CTL_FONT_POSTURE, ATTR_CTL_FONT_WEIGHT, ATTR_FONT, ATTR_FONT_COLOR, ATTR_FONT_CONTOUR, ATTR_FONT_CROSSEDOUT, ATTR_FONT_HEIGHT, ATTR_FONT_LANGUAGE, ATTR_FONT_POSTURE, ATTR_FONT_SHADOWED, ATTR_FONT_UNDERLINE, ATTR_FONT_WEIGHT, ScfTools::CheckItems(), and GetFirstUsedScript().
| 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.
XclExpFontList XclExpFontBuffer::maFontList [private] |
Definition at line 273 of file inc/xestyle.hxx.
Referenced by Find(), GetAppFontData(), GetFont(), InitDefaultFonts(), Insert(), Save(), and SaveXml().
size_t XclExpFontBuffer::mnXclMaxSize [private] |
List of all FONT records.
Definition at line 274 of file inc/xestyle.hxx.
Referenced by Insert(), and XclExpFontBuffer().
1.5.6