LibreOffice Module sc (master)  1
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
XclExpXFBuffer Class Reference

Stores all XF records (cell formats and cell styles) in the document. More...

#include <xestyle.hxx>

Inheritance diagram for XclExpXFBuffer:
[legend]
Collaboration diagram for XclExpXFBuffer:
[legend]

Classes

struct  FindKey
 composite key for the find-map, so we can do partial key searching More...
 
struct  XclExpBuiltInInfo
 Extended info about a built-in XF. More...
 

Public Member Functions

 XclExpXFBuffer (const XclExpRoot &rRoot)
 
void Initialize ()
 Inserts predefined built-in styles and user-defined styles. More...
 
sal_uInt32 Insert (const ScPatternAttr *pPattern, sal_Int16 nScript)
 Finds or creates a cell XF record for the passed item set. More...
 
sal_uInt32 InsertWithFont (const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt16 nForceXclFont, bool bForceLineBreak)
 Finds or creates a cell XF record for the passed item set. More...
 
sal_uInt32 InsertWithNumFmt (const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt32 nForceScNumFmt, bool bForceLineBreak)
 Finds or creates a cell XF record for the passed item set, with custom number format. More...
 
sal_uInt32 InsertStyle (const SfxStyleSheetBase *pStyleSheet)
 Inserts the passed cell style. More...
 
const XclExpXFGetXFById (sal_uInt32 nXFId) const
 Returns an XF record by its unique identifier. More...
 
void Finalize ()
 Reduces the XF record list to the maximum allowed number of records. More...
 
sal_uInt16 GetXFIndex (sal_uInt32 nXFId) const
 Returns the Excel XF index of the XF record with passed XF ID. More...
 
sal_Int32 GetXmlStyleIndex (sal_uInt32 nXFId) const
 
sal_Int32 GetXmlCellIndex (sal_uInt32 nXFId) const
 
virtual void Save (XclExpStream &rStrm) override
 Writes all XF records contained in this buffer. More...
 
virtual void SaveXml (XclExpXmlStream &rStrm) override
 
- Public Member Functions inherited from XclExpRecordBase
 XclExpRecordBase ()
 
 XclExpRecordBase (XclExpRecordBase const &)
 
 XclExpRecordBase (XclExpRecordBase &&)
 
XclExpRecordBaseoperator= (XclExpRecordBase const &)
 
XclExpRecordBaseoperator= (XclExpRecordBase &&) noexcept
 
virtual ~XclExpRecordBase ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static sal_uInt32 GetXFIdFromIndex (sal_uInt16 nXFIndex)
 Returns the XF identifier representing a fixed Excel XF index (e.g. More...
 
static sal_uInt32 GetDefCellXFId ()
 Returns the XF identifier representing the default cell XF. More...
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static voidoperator new (std::size_t nSize)
 
static voidoperator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 

Private Types

typedef XclExpRecordList< XclExpXFXclExpXFList
 
typedef XclExpXFList::RecordRefType XclExpXFRef
 
typedef ::std::map< sal_uInt32, XclExpBuiltInInfoXclExpBuiltInMap
 
typedef ::std::vector< XclExpCellBorderXclExpBorderList
 
typedef ::std::vector< XclExpCellAreaXclExpFillList
 

Private Member Functions

sal_uInt32 FindXF (const ScPatternAttr &rPattern, sal_uInt32 nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak) const
 Returns the XF ID of the cell XF containing the passed format. More...
 
sal_uInt32 FindXF (const SfxStyleSheetBase &rStyleSheet) const
 Returns the XF ID of the style XF containing the passed style. More...
 
sal_uInt32 FindBuiltInXF (sal_uInt8 nStyleId, sal_uInt8 nLevel) const
 Returns the XF ID of a built-in style XF, searches by style identifier. More...
 
sal_uInt32 InsertCellXF (const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt32 nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak)
 Tries to find the XF record containing the passed format or inserts a new record. More...
 
sal_uInt32 InsertStyleXF (const SfxStyleSheetBase &rStyleSheet)
 Inserts the passed cell style. More...
 
void InsertUserStyles ()
 Inserts an XF and a STYLE record for all user defined style sheets. More...
 
sal_uInt32 AppendBuiltInXF (XclExpXFRef const &xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel=EXC_STYLE_NOLEVEL)
 Inserts a built-in XF record without a STYLE record and returns the XF ID. More...
 
sal_uInt32 AppendBuiltInXFWithStyle (XclExpXFRef const &xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel=EXC_STYLE_NOLEVEL)
 Inserts a built-in XF and STYLE record and returns the XF ID. More...
 
void InsertDefaultRecords ()
 Inserts all default XF and STYLE records. More...
 
void AppendXFIndex (sal_uInt32 nXFId)
 Appends a XF index to the internal ID<->index maps. More...
 
void AddBorderAndFill (const XclExpXF &rXF)
 
void SaveXFXml (XclExpXmlStream &rStrm, XclExpXF &rXF)
 

Static Private Member Functions

static FindKey ToFindKey (XclExpXF const &)
 

Private Attributes

XclExpXFList maXFList
 
std::map< FindKey, std::vector< sal_uInt32 > > maXFFindMap
 List of all XF records. More...
 
XclExpRecordList< XclExpStylemaStyleList
 map of itemset to vector of positions, to speed up find More...
 
XclExpBuiltInMap maBuiltInMap
 List of all STYLE records. More...
 
ScfUInt16Vec maXFIndexVec
 Contained elements describe built-in XFs. More...
 
ScfUInt16Vec maStyleIndexes
 Maps XF IDs to XF indexes. More...
 
ScfUInt16Vec maCellIndexes
 Maps XF IDs to OOXML Style indexes. More...
 
XclExpXFList maSortedXFList
 Maps XF IDs to OOXML Cell indexes. More...
 
XclExpBorderList maBorders
 List of XF records in XF index order. More...
 
XclExpFillList maFills
 List of borders used by XF records. More...
 

Additional Inherited Members

- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Member Functions inherited from XclExpRoot
 XclExpRoot (XclExpRootData &rExpRootData)
 
const XclExpRootGetRoot () const
 Returns this root instance - for code readability in derived classes. More...
 
bool IsRelUrl () const
 Returns true, if URLs should be stored relative to the document location. More...
 
sc::CompileFormulaContextGetCompileFormulaContext () const
 
XclExpTabInfoGetTabInfo () const
 Returns the buffer for Calc->Excel sheet index conversion. More...
 
XclExpAddressConverterGetAddressConverter () const
 Returns the address converter. More...
 
XclExpFormulaCompilerGetFormulaCompiler () const
 Returns the formula compiler to produce formula token arrays. More...
 
XclExpProgressBarGetProgressBar () const
 Returns the export progress bar. More...
 
XclExpSstGetSst () const
 Returns the shared string table. More...
 
XclExpPaletteGetPalette () const
 Returns the color buffer. More...
 
XclExpFontBufferGetFontBuffer () const
 Returns the font buffer. More...
 
XclExpNumFmtBufferGetNumFmtBuffer () const
 Returns the number format buffer. More...
 
XclExpXFBufferGetXFBuffer () const
 Returns the cell formatting attributes buffer. More...
 
XclExpLinkManagerGetGlobalLinkManager () const
 Returns the global link manager for defined names. More...
 
XclExpLinkManagerGetLocalLinkManager () const
 Returns the local link manager for the current sheet. More...
 
XclExpNameManagerGetNameManager () const
 Returns the buffer that contains internal defined names. More...
 
XclExpObjectManagerGetObjectManager () const
 Returns the drawing object manager. More...
 
XclExpFilterManagerGetFilterManager () const
 Returns the filter manager. More...
 
XclExpPivotTableManagerGetPivotTableManager () const
 Returns the pivot table manager. More...
 
XclExpDxfsGetDxfs () const
 Returns the differential formatting list. More...
 
OStringBuffer & GetStringBuf () const
 Clean and return the OStringBuffer. More...
 
XclExpXmlPivotTableManagerGetXmlPivotTableManager ()
 
XclExpTablesManagerGetTablesManager ()
 
void InitializeConvert ()
 Is called when export filter starts to create the Excel document (all BIFF versions). More...
 
void InitializeGlobals ()
 Is called when export filter starts to create the workbook global data (>=BIFF5). More...
 
void InitializeTable (SCTAB nScTab)
 Is called when export filter starts to create data for a single sheet (all BIFF versions). More...
 
void InitializeSave ()
 Is called before export filter starts to write the records to the stream. More...
 
XclExpRecordRef CreateRecord (sal_uInt16 nRecId) const
 Returns the reference to a record (or record list) representing a root object. More...
 
bool IsDocumentEncrypted () const
 
css::uno::Sequence< css::beans::NamedValue > GetEncryptionData () const
 
- Protected Member Functions inherited from XclRoot
 XclRoot (XclRootData &rRootData)
 
 XclRoot (const XclRoot &rRoot)
 
virtual ~XclRoot ()
 
XclRootoperator= (const XclRoot &rRoot)
 
RootDataGetOldRoot () const
 Returns old RootData struct. More...
 
XclBiff GetBiff () const
 Returns the current BIFF version of the importer/exporter. More...
 
XclOutput GetOutput () const
 Returns the current output format of the importer/exporter. More...
 
bool IsImport () const
 Returns true, if currently a document is imported. More...
 
rtl_TextEncoding GetTextEncoding () const
 Returns the text encoding to import/export byte strings. More...
 
LanguageType GetSysLanguage () const
 Returns the system language, i.e. More...
 
LanguageType GetDocLanguage () const
 Returns the document language. More...
 
LanguageType GetUILanguage () const
 Returns the UI language. More...
 
sal_Int16 GetDefApiScript () const
 Returns the default script type, e.g. More...
 
long GetCharWidth () const
 Returns the width of the '0' character (default font) for the current printer (twips). More...
 
bool IsInGlobals () const
 Returns the current Calc sheet index. More...
 
SCTAB GetCurrScTab () const
 Returns the current Calc sheet index. More...
 
sal_Int32 GetHmmFromPixelX (double fPixelX) const
 Calculates the width of the passed number of pixels in 1/100 mm. More...
 
sal_Int32 GetHmmFromPixelY (double fPixelY) const
 Calculates the height of the passed number of pixels in 1/100 mm. More...
 
SfxMediumGetMedium () const
 Returns the medium to import from. More...
 
const OUString & GetDocUrl () const
 Returns the document URL of the imported/exported file. More...
 
const OUString & GetBasePath () const
 Returns the base path of the imported/exported file. More...
 
const OUString & GetUserName () const
 Returns the current user name. More...
 
css::uno::Sequence< css::beans::NamedValue > RequestEncryptionData (::comphelper::IDocPasswordVerifier &rVerifier) const
 Requests and verifies a password from the medium or the user. More...
 
const tools::SvRef< SotStorage > & GetRootStorage () const
 Returns the OLE2 root storage of the imported/exported file. More...
 
bool HasVbaStorage () const
 Returns true, if the document contains a VBA storage. More...
 
tools::SvRef< SotStorageOpenStorage (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrgName) const
 Tries to open a storage as child of the specified storage for reading or writing. More...
 
tools::SvRef< SotStorageOpenStorage (const OUString &rStrgName) const
 Tries to open a storage as child of the root storage for reading or writing. More...
 
tools::SvRef< SotStorageStreamOpenStream (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrmName) const
 Tries to open a new stream in the specified storage for reading or writing. More...
 
tools::SvRef< SotStorageStreamOpenStream (const OUString &rStrmName) const
 Tries to open a new stream in the root storage for reading or writing. More...
 
ScDocumentGetDoc () const
 Returns reference to the destination document (import) or source document (export). More...
 
SfxObjectShellGetDocShell () const
 Returns the object shell of the Calc document. More...
 
ScModelObjGetDocModelObj () const
 Returns the object model of the Calc document. More...
 
OutputDeviceGetPrinter () const
 Returns pointer to the printer of the Calc document. More...
 
ScStyleSheetPoolGetStyleSheetPool () const
 Returns the style sheet pool of the Calc document. More...
 
ScRangeNameGetNamedRanges () const
 Returns the defined names container of the Calc document. More...
 
SdrPageGetSdrPage (SCTAB nScTab) const
 Returns the drawing layer page of the passed sheet, if present. More...
 
SvNumberFormatterGetFormatter () const
 Returns the number formatter of the Calc document. More...
 
DateTime GetNullDate () const
 Returns the null date of the current number formatter. More...
 
sal_uInt16 GetBaseYear () const
 Returns the base year depending on the current null date (1900 or 1904). More...
 
double GetDoubleFromDateTime (const DateTime &rDateTime) const
 Converts a date/time value to a floating-point value. More...
 
DateTime GetDateTimeFromDouble (double fValue) const
 Converts a floating-point value to a date/time value. More...
 
ScEditEngineDefaulterGetEditEngine () const
 Returns the edit engine for import/export of rich strings etc. More...
 
ScHeaderEditEngineGetHFEditEngine () const
 Returns the edit engine for import/export of headers/footers. More...
 
EditEngineGetDrawEditEngine () const
 Returns the edit engine for import/export of drawing text boxes. More...
 
XclFontPropSetHelperGetFontPropSetHelper () const
 Returns the property set helper for fonts. More...
 
XclChPropSetHelperGetChartPropSetHelper () const
 Returns the property set helper for the chart filters. More...
 
ScExtDocOptionsGetExtDocOptions () const
 Returns the extended document options. More...
 
XclTracerGetTracer () const
 Returns the filter tracer. More...
 
const ScAddressGetScMaxPos () const
 Returns the highest possible cell address in a Calc document. More...
 
const ScAddressGetXclMaxPos () const
 Returns the highest possible cell address in an Excel document (using current BIFF version). More...
 
const ScAddressGetMaxPos () const
 Returns the highest possible cell address valid in Calc and Excel (using current BIFF version). More...
 
void SetDocLanguage (LanguageType eLang)
 Sets the document language. More...
 
void SetUILanguage (LanguageType eLang)
 Sets the UI language, i.e. More...
 
void SetTextEncoding (rtl_TextEncoding eTextEnc)
 Sets the text encoding to import/export byte strings. More...
 
void SetCharWidth (const XclFontData &rFontData)
 Sets the width of the '0' character (default font) for the current printer (twips). More...
 
void SetCurrScTab (SCTAB nScTab)
 Sets the current Calc sheet index. More...
 
void IncCurrScTab ()
 Increases the current Calc sheet index by 1. More...
 
- Static Protected Member Functions inherited from XclExpRoot
static css::uno::Sequence< css::beans::NamedValue > GenerateEncryptionData (const OUString &aPass)
 
static css::uno::Sequence< css::beans::NamedValue > GenerateDefaultEncryptionData ()
 
- Static Protected Member Functions inherited from XclRoot
static const OUStringLiteral & GetDefaultPassword ()
 Returns the default password used for stream encryption. More...
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Stores all XF records (cell formats and cell styles) in the document.

Stores also the names of user defined cell styles (STYLE records). Supports reduction to the maximum count of XF records of the current BIFF version.

An instance of this class collects all XF records in the conversion phase of the export, using the Insert() and InsertStyle() functions. It returns a unique identifier for each XF record.

After the entire document is converted, the Finalize() function will reduce the list to the number of XF records supported by the current BIFF version.

Then, in the streaming phase, the function GetXFIndex() returns the real Excel XF index for all XF identifiers.

Definition at line 573 of file xestyle.hxx.

Member Typedef Documentation

typedef ::std::vector< XclExpCellBorder > XclExpXFBuffer::XclExpBorderList
private

Definition at line 684 of file xestyle.hxx.

Definition at line 683 of file xestyle.hxx.

typedef ::std::vector< XclExpCellArea > XclExpXFBuffer::XclExpFillList
private

Definition at line 685 of file xestyle.hxx.

Definition at line 630 of file xestyle.hxx.

Definition at line 631 of file xestyle.hxx.

Constructor & Destructor Documentation

XclExpXFBuffer::XclExpXFBuffer ( const XclExpRoot rRoot)
explicit

Definition at line 2411 of file xestyle.cxx.

Member Function Documentation

void XclExpXFBuffer::AddBorderAndFill ( const XclExpXF rXF)
private

Definition at line 2995 of file xestyle.cxx.

References XclExpXF::GetAreaData(), XclExpXF::GetBorderData(), maBorders, and maFills.

Referenced by AppendXFIndex().

sal_uInt32 XclExpXFBuffer::AppendBuiltInXF ( XclExpXFRef const &  xXF,
sal_uInt8  nStyleId,
sal_uInt8  nLevel = EXC_STYLE_NOLEVEL 
)
private

Inserts a built-in XF record without a STYLE record and returns the XF ID.

Parameters
bCreateStyleRectrue = Creates the related STYLE record.

Definition at line 2884 of file xestyle.cxx.

References XclExpRecordList< RecType >::AppendRecord(), XclExpRecordList< RecType >::GetSize(), maBuiltInMap, maXFFindMap, maXFList, XclExpXFBuffer::XclExpBuiltInInfo::mbPredefined, XclExpXFBuffer::XclExpBuiltInInfo::mnLevel, XclExpXFBuffer::XclExpBuiltInInfo::mnStyleId, and ToFindKey().

Referenced by AppendBuiltInXFWithStyle(), and InsertDefaultRecords().

sal_uInt32 XclExpXFBuffer::AppendBuiltInXFWithStyle ( XclExpXFRef const &  xXF,
sal_uInt8  nStyleId,
sal_uInt8  nLevel = EXC_STYLE_NOLEVEL 
)
private

Inserts a built-in XF and STYLE record and returns the XF ID.

Parameters
bCreateStyleRectrue = Creates the related STYLE record.

Definition at line 2896 of file xestyle.cxx.

References AppendBuiltInXF(), XclExpRecordList< RecType >::AppendNewRecord(), maBuiltInMap, and maStyleList.

Referenced by InsertDefaultRecords(), and InsertStyleXF().

void XclExpXFBuffer::AppendXFIndex ( sal_uInt32  nXFId)
private
void XclExpXFBuffer::Finalize ( )
sal_uInt32 XclExpXFBuffer::FindBuiltInXF ( sal_uInt8  nStyleId,
sal_uInt8  nLevel 
) const
private

Returns the XF ID of a built-in style XF, searches by style identifier.

Definition at line 2737 of file xestyle.cxx.

References EXC_XFID_NOTFOUND, and maBuiltInMap.

Referenced by InsertStyleXF().

sal_uInt32 XclExpXFBuffer::FindXF ( const ScPatternAttr rPattern,
sal_uInt32  nForceScNumFmt,
sal_uInt16  nForceXclFont,
bool  bForceLineBreak 
) const
private

Returns the XF ID of the cell XF containing the passed format.

Definition at line 2679 of file xestyle.cxx.

References XclExpXF::Equals(), EXC_FONT_NOTFOUND, EXC_XFID_NOTFOUND, SfxSetItem::GetItemSet(), XclExpRecordList< RecType >::GetRecord(), maXFFindMap, maXFList, nPos, and NUMBERFORMAT_ENTRY_NOT_FOUND.

Referenced by InsertCellXF(), and InsertStyleXF().

sal_uInt32 XclExpXFBuffer::FindXF ( const SfxStyleSheetBase rStyleSheet) const
private

Returns the XF ID of the style XF containing the passed style.

Definition at line 2723 of file xestyle.cxx.

References XclExpXF::Equals(), EXC_FONT_NOTFOUND, EXC_XFID_NOTFOUND, GetItemSet(), XclExpRecordList< RecType >::GetRecord(), maXFFindMap, maXFList, nPos, and NUMBERFORMAT_ENTRY_NOT_FOUND.

sal_uInt32 XclExpXFBuffer::GetDefCellXFId ( )
static

Returns the XF identifier representing the default cell XF.

Definition at line 2448 of file xestyle.cxx.

References EXC_XF_DEFAULTCELL, and GetXFIdFromIndex().

Referenced by XclExpRow::Finalize(), XclExpMultiCellBase::GetFirstXFId(), and InsertCellXF().

const XclExpXF * XclExpXFBuffer::GetXFById ( sal_uInt32  nXFId) const

Returns an XF record by its unique identifier.

Definition at line 2453 of file xestyle.cxx.

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

Referenced by XclExpLabelCell::Init(), and XclExpXF::SaveXml().

sal_uInt32 XclExpXFBuffer::GetXFIdFromIndex ( sal_uInt16  nXFIndex)
static

Returns the XF identifier representing a fixed Excel XF index (e.g.

for built-in XFs).

Definition at line 2443 of file xestyle.cxx.

Referenced by GetDefCellXFId(), InsertStyle(), and InsertStyleXF().

sal_uInt16 XclExpXFBuffer::GetXFIndex ( sal_uInt32  nXFId) const

Returns the Excel XF index of the XF record with passed XF ID.

Definition at line 2555 of file xestyle.cxx.

References EXC_XF_DEFAULTSTYLE, and maXFIndexVec.

Referenced by XclExpXFId::ConvertXFIndex(), lcl_GetStyleId(), XclExpXF::SaveXml(), and XclExpStyle::SaveXml().

sal_Int32 XclExpXFBuffer::GetXmlCellIndex ( sal_uInt32  nXFId) const

Definition at line 2573 of file xestyle.cxx.

References maCellIndexes.

Referenced by lcl_GetStyleId().

sal_Int32 XclExpXFBuffer::GetXmlStyleIndex ( sal_uInt32  nXFId) const

Definition at line 2565 of file xestyle.cxx.

References maStyleIndexes.

Referenced by XclExpXF::SaveXml(), and XclExpStyle::SaveXml().

void XclExpXFBuffer::Initialize ( )

Inserts predefined built-in styles and user-defined styles.

Definition at line 2416 of file xestyle.cxx.

References InsertDefaultRecords(), and InsertUserStyles().

Referenced by XclExpRoot::InitializeGlobals().

sal_uInt32 XclExpXFBuffer::Insert ( const ScPatternAttr pPattern,
sal_Int16  nScript 
)

Finds or creates a cell XF record for the passed item set.

Returns
A unique XF record ID.

Definition at line 2422 of file xestyle.cxx.

References EXC_FONT_NOTFOUND, InsertCellXF(), and NUMBERFORMAT_ENTRY_NOT_FOUND.

Referenced by XclExpMultiCellBase::AppendXFId(), InsertDefaultRecords(), XclExpColinfo::XclExpColinfo(), and XclExpSingleCellBase::XclExpSingleCellBase().

sal_uInt32 XclExpXFBuffer::InsertCellXF ( const ScPatternAttr pPattern,
sal_Int16  nScript,
sal_uInt32  nForceScNumFmt,
sal_uInt16  nForceXclFont,
bool  bForceLineBreak 
)
private
void XclExpXFBuffer::InsertDefaultRecords ( )
private
sal_uInt32 XclExpXFBuffer::InsertStyle ( const SfxStyleSheetBase pStyleSheet)

Inserts the passed cell style.

Creates a style XF record and a STYLE record.

Returns
A unique XF record ID.

Definition at line 2438 of file xestyle.cxx.

References EXC_XF_DEFAULTSTYLE, GetXFIdFromIndex(), and InsertStyleXF().

Referenced by XclExpXF::XclExpXF().

sal_uInt32 XclExpXFBuffer::InsertStyleXF ( const SfxStyleSheetBase rStyleSheet)
private
void XclExpXFBuffer::InsertUserStyles ( )
private

Inserts an XF and a STYLE record for all user defined style sheets.

Definition at line 2876 of file xestyle.cxx.

References SfxStyleSheetIterator::First(), XclRoot::GetDoc(), XclRoot::GetStyleSheetPool(), InsertStyleXF(), and SfxStyleSheetIterator::Next().

Referenced by Initialize().

sal_uInt32 XclExpXFBuffer::InsertWithFont ( const ScPatternAttr pPattern,
sal_Int16  nScript,
sal_uInt16  nForceXclFont,
bool  bForceLineBreak 
)

Finds or creates a cell XF record for the passed item set.

Parameters
nForceXclFontThe font to be exported. If not equal to EXC_FONT_NOTFOUND, this font index will be used unconditionally and the cell font will be ignored.
bForceLineBreaktrue = Set line break flag unconditionally. This is required for cells that contain multi-line text.
Returns
A unique XF record ID.

Definition at line 2427 of file xestyle.cxx.

References InsertCellXF(), and NUMBERFORMAT_ENTRY_NOT_FOUND.

Referenced by XclExpLabelCell::Init().

sal_uInt32 XclExpXFBuffer::InsertWithNumFmt ( const ScPatternAttr pPattern,
sal_Int16  nScript,
sal_uInt32  nForceScNumFmt,
bool  bForceLineBreak 
)

Finds or creates a cell XF record for the passed item set, with custom number format.

Parameters
nXFFlagsAdditional flags allowing to control the creation of an XF.
nForceScNumFmtThe number format to be exported, e.g. formula result type. This format will always overwrite the cell's number format.
bForceLineBreaktrue = Set line break flag unconditionally. This is required for cells that contain multi-line text.
Returns
A unique XF record ID.

Definition at line 2433 of file xestyle.cxx.

References EXC_FONT_NOTFOUND, and InsertCellXF().

Referenced by XclExpFormulaCell::XclExpFormulaCell().

void XclExpXFBuffer::Save ( XclExpStream rStrm)
overridevirtual

Writes all XF records contained in this buffer.

Reimplemented from XclExpRecordBase.

Definition at line 2581 of file xestyle.cxx.

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

void XclExpXFBuffer::SaveXFXml ( XclExpXmlStream rStrm,
XclExpXF rXF 
)
private
void XclExpXFBuffer::SaveXml ( XclExpXmlStream rStrm)
overridevirtual
XclExpXFBuffer::FindKey XclExpXFBuffer::ToFindKey ( XclExpXF const &  rRec)
staticprivate

Member Data Documentation

XclExpBorderList XclExpXFBuffer::maBorders
private

List of XF records in XF index order.

Definition at line 718 of file xestyle.hxx.

Referenced by AddBorderAndFill(), SaveXFXml(), and SaveXml().

XclExpBuiltInMap XclExpXFBuffer::maBuiltInMap
private

List of all STYLE records.

Definition at line 713 of file xestyle.hxx.

Referenced by AppendBuiltInXF(), AppendBuiltInXFWithStyle(), Finalize(), FindBuiltInXF(), InsertCellXF(), InsertDefaultRecords(), and InsertStyleXF().

ScfUInt16Vec XclExpXFBuffer::maCellIndexes
private

Maps XF IDs to OOXML Style indexes.

Definition at line 716 of file xestyle.hxx.

Referenced by Finalize(), and GetXmlCellIndex().

XclExpFillList XclExpXFBuffer::maFills
private

List of borders used by XF records.

Definition at line 719 of file xestyle.hxx.

Referenced by AddBorderAndFill(), InsertDefaultRecords(), SaveXFXml(), and SaveXml().

XclExpXFList XclExpXFBuffer::maSortedXFList
private

Maps XF IDs to OOXML Cell indexes.

Definition at line 717 of file xestyle.hxx.

Referenced by AppendXFIndex(), Finalize(), Save(), and SaveXml().

ScfUInt16Vec XclExpXFBuffer::maStyleIndexes
private

Maps XF IDs to XF indexes.

Definition at line 715 of file xestyle.hxx.

Referenced by Finalize(), and GetXmlStyleIndex().

XclExpRecordList< XclExpStyle > XclExpXFBuffer::maStyleList
private

map of itemset to vector of positions, to speed up find

Definition at line 712 of file xestyle.hxx.

Referenced by AppendBuiltInXFWithStyle(), InsertStyleXF(), Save(), and SaveXml().

std::map<FindKey, std::vector<sal_uInt32> > XclExpXFBuffer::maXFFindMap
private

List of all XF records.

Definition at line 710 of file xestyle.hxx.

Referenced by AppendBuiltInXF(), FindXF(), InsertCellXF(), InsertDefaultRecords(), and InsertStyleXF().

ScfUInt16Vec XclExpXFBuffer::maXFIndexVec
private

Contained elements describe built-in XFs.

Definition at line 714 of file xestyle.hxx.

Referenced by AppendXFIndex(), Finalize(), and GetXFIndex().

XclExpXFList XclExpXFBuffer::maXFList
private

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