LibreOffice Module sc (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
XclExpRecord Class Reference

Base class for single records with any content. More...

#include <xerecord.hxx>

Inheritance diagram for XclExpRecord:
Collaboration diagram for XclExpRecord:

Public Member Functions

 XclExpRecord (sal_uInt16 nRecId=EXC_ID_UNKNOWN, std::size_t nRecSize=0)
 XclExpRecord (XclExpRecord const &)=default
virtual ~XclExpRecord () override
sal_uInt16 GetRecId () const
 Returns the current record ID. More...
std::size_t GetRecSize () const
 Returns the current record size prediction. More...
void SetRecId (sal_uInt16 nRecId)
 Sets a new record ID. More...
void SetRecSize (std::size_t nRecSize)
 Sets a new record size prediction. More...
void AddRecSize (std::size_t nRecSize)
 Adds a size value to the record size prediction. More...
void SetRecHeader (sal_uInt16 nRecId, std::size_t nRecSize)
 Sets record ID and size with one call. More...
virtual void Save (XclExpStream &rStrm) override
 Writes the record header and calls WriteBody(). More...
- Public Member Functions inherited from XclExpRecordBase
 XclExpRecordBase ()
 XclExpRecordBase (XclExpRecordBase const &)
 XclExpRecordBase (XclExpRecordBase &&)
XclExpRecordBaseoperator= (XclExpRecordBase const &)
XclExpRecordBaseoperator= (XclExpRecordBase &&) noexcept
virtual ~XclExpRecordBase ()
virtual void Save (XclExpStream &rStrm)
 Overwrite this method to do any operation while saving the record. More...
virtual void SaveXml (XclExpXmlStream &rStrm)
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
void acquire ()
void release ()

Protected Member Functions

virtual void WriteBody (XclExpStream &rStrm)
 Writes the body of the record (without record header). More...
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE

Private Attributes

std::size_t mnRecSize
sal_uInt16 mnRecId
 The predicted record size. More...

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
static void * operator 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)
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount

Detailed Description

Base class for single records with any content.

This class handles writing the record header. Derived classes only have to write the record body. Calculating the record size before saving optimizes the write process (the stream does not have to seek back and update the written record size). But it is not required to calculate a valid size (maybe it would be too complex or just impossible until the record is really written).

Definition at line 142 of file xerecord.hxx.

Constructor & Destructor Documentation

◆ XclExpRecord() [1/2]

XclExpRecord::XclExpRecord ( sal_uInt16  nRecId = EXC_ID_UNKNOWN,
std::size_t  nRecSize = 0 
nRecIdThe record ID of this record. May be set later with SetRecId().
nRecSizeThe predicted record size. May be set later with SetRecSize().

Definition at line 130 of file xerecord.cxx.

◆ XclExpRecord() [2/2]

XclExpRecord::XclExpRecord ( XclExpRecord const &  )

◆ ~XclExpRecord()

XclExpRecord::~XclExpRecord ( )

Definition at line 136 of file xerecord.cxx.

Member Function Documentation

◆ AddRecSize()

void XclExpRecord::AddRecSize ( std::size_t  nRecSize)

Adds a size value to the record size prediction.

Definition at line 165 of file xerecord.hxx.

References mnRecSize.

Referenced by XclExpAutofilter::AddCondition(), XclObjAny::Save(), XclExpSingleCellBase::Save(), XclObj::WriteSubRecs(), and XclObjDropDown::XclObjDropDown().

◆ GetRecId()

sal_uInt16 XclExpRecord::GetRecId ( ) const

◆ GetRecSize()

std::size_t XclExpRecord::GetRecSize ( ) const

Returns the current record size prediction.

Definition at line 158 of file xerecord.hxx.

References mnRecSize.

Referenced by XclExpFutureRecord::Save(), XclExpMultiCellBase::Save(), and XclExpDummyRecord::WriteBody().

◆ Save()

void XclExpRecord::Save ( XclExpStream rStrm)

Writes the record header and calls WriteBody().

Reimplemented from XclExpRecordBase.

Reimplemented in ExcRecord, ExcEmptyRec, ExcDummyRec, XclExpObjList, XclObj, XclObjComment, XclTxo, XclObjOle, XclObjAny, ExcEScenarioManager, XclExpFileSharing, ExcXmlRecord, XclExpUserBViewList, XclExpChTrAction, XclExpChGroupBase, XclExpChFutureRecordBase, XclExpChEscherFormat, XclExpChFrame, XclExpChSourceLink, XclExpChLabelRange, XclExpCondfmt, XclExpDval, XclExpChartObj, XclExpNote, XclExpPageBreaks, XclExpPCField, XclExpFutureRecord, XclExpPalette, XclExpBlindFont, XclExpTableop, XclExpSingleCellBase, XclExpFormulaCell, XclExpMultiCellBase, XclExpDefcolwidth, and XclExpRow.

Definition at line 150 of file xerecord.cxx.

References EXC_ID_UNKNOWN, mnRecId, mnRecSize, rStrm, and WriteBody().

Referenced by ExcRecord::Save(), XclObj::Save(), XclExpFileSharing::Save(), XclExpChGroupBase::Save(), XclExpChSourceLink::Save(), XclExpChLabelRange::Save(), XclExpCondfmt::Save(), XclExpDval::Save(), XclExpNote::Save(), XclExpPageBreaks::Save(), XclExpPageSettings::Save(), XclExpChartPageSettings::Save(), XclExpPCField::Save(), XclExpPalette::Save(), XclExpTableop::Save(), XclExpSingleCellBase::Save(), XclExpDefcolwidth::Save(), XclExpRow::Save(), XclExpRowBuffer::Save(), XclExpPivotCache::WriteCacheStream(), XclExpTabViewSettings::WritePane(), XclExpTabViewSettings::WriteScl(), XclExpTabViewSettings::WriteSelection(), XclExpChTypeGroup::WriteSubRecords(), XclExpChAxesSet::WriteSubRecords(), XclExpTabViewSettings::WriteTabBgColor(), and XclExpTabViewSettings::WriteWindow2().

◆ SetRecHeader()

void XclExpRecord::SetRecHeader ( sal_uInt16  nRecId,
std::size_t  nRecSize 

Sets record ID and size with one call.

Definition at line 140 of file xerecord.cxx.

References SetRecId(), and SetRecSize().

Referenced by XclExpXF::InitDefault(), ExcRecord::Save(), and XclExpDimensions::XclExpDimensions().

◆ SetRecId()

void XclExpRecord::SetRecId ( sal_uInt16  nRecId)

Sets a new record ID.

Definition at line 161 of file xerecord.hxx.

References mnRecId.

Referenced by XclExpChType::Convert(), XclExpLabelCell::Init(), and SetRecHeader().

◆ SetRecSize()

void XclExpRecord::SetRecSize ( std::size_t  nRecSize)

◆ WriteBody()

void XclExpRecord::WriteBody ( XclExpStream rStrm)

Writes the body of the record (without record header).

@descr Usually this method will be overwritten by derived classes.

Reimplemented in ExcRecord, XclExpPassHash, XclExpCountry, XclExpAutofilter, XclObj, XclExpSheetProtectOptions, XclExpSheetEnhancedProtection, XclExpFileEncryption, XclExpInterfaceHdr, XclExpInterfaceEnd, XclExpWriteAccess, XclExpFileSharing, XclExpProt4Rev, XclExpProt4RevPass, XclExpChFramePos, XclExpChLineFormat, XclExpChAreaFormat, XclExpChEscherFormat, XclExpChFrame, XclExpChSourceLink, XclExpChObjectLink, XclExpChFrLabelProps, XclExpChText, XclExpChMarkerFormat, XclExpCh3dDataFormat, XclExpChDataFormat, XclExpChSerTrendLine, XclExpChSerErrorBar, XclExpChSeries, XclExpChType, XclExpChChart3d, XclExpChLegend, XclExpChDropBar, XclExpChTypeGroup, XclExpChLabelRange, XclExpChValueRange, XclExpChTick, XclExpChAxis, XclExpChAxesSet, XclExpChChart, XclExpHyperlink, XclExpCF, XclExpCondfmt, XclExpDV, XclExpDval, XclExpMsoDrawingBase, XclExpNote, XclExpHeaderFooter, XclExpSetup, XclExpPageBreaks, XclExpPCItem, XclExpPCField, XclExpPTItem, XclExpValueRecord< Type >, XclExpBoolRecord, XclExpDummyRecord, XclExpPalette, XclExpFont, XclExpXF, XclExpStyle, XclExpStringRec, XclExpArray, XclExpShrfmla, XclExpTableop, XclExpSingleCellBase, XclExpGuts, XclExpDimensions, XclExpColinfo, XclExpDefrowheight, XclExpRow, XclExpWindow1, XclExpWindow2, XclExpScl, XclExpPane, XclExpSelection, and XclExpTabBgColor.

Definition at line 146 of file xerecord.cxx.

Referenced by Save(), and XclExpFutureRecord::Save().

Member Data Documentation

◆ mnRecId

sal_uInt16 XclExpRecord::mnRecId

The predicted record size.

Definition at line 179 of file xerecord.hxx.

Referenced by GetRecId(), Save(), and SetRecId().

◆ mnRecSize

std::size_t XclExpRecord::mnRecSize

Definition at line 178 of file xerecord.hxx.

Referenced by AddRecSize(), GetRecSize(), Save(), and SetRecSize().

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