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 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 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)
- 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 141 of file xerecord.hxx.

Constructor & Destructor Documentation

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::XclExpRecord ( XclExpRecord const &  )
XclExpRecord::~XclExpRecord ( )

Definition at line 136 of file xerecord.cxx.

Member Function Documentation

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

Adds a size value to the record size prediction.

Definition at line 164 of file xerecord.hxx.

References mnRecSize.

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

sal_uInt16 XclExpRecord::GetRecId ( ) const
std::size_t XclExpRecord::GetRecSize ( ) const

Returns the current record size prediction.

Definition at line 157 of file xerecord.hxx.

References mnRecSize.

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

void XclExpRecord::Save ( XclExpStream rStrm)

Writes the record header and calls WriteBody().

Reimplemented from XclExpRecordBase.

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

Definition at line 150 of file xerecord.cxx.

References XclExpStream::EndRecord(), EXC_ID_UNKNOWN, mnRecId, mnRecSize, XclExpStream::StartRecord(), and WriteBody().

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

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().

void XclExpRecord::SetRecId ( sal_uInt16  nRecId)

Sets a new record ID.

Definition at line 160 of file xerecord.hxx.

References mnRecId.

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

void XclExpRecord::SetRecSize ( std::size_t  nRecSize)
void XclExpRecord::WriteBody ( XclExpStream rStrm)

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

Usually this method will be overwritten by derived classes.

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

Definition at line 146 of file xerecord.cxx.

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

Member Data Documentation

sal_uInt16 XclExpRecord::mnRecId

The predicted record size.

Definition at line 178 of file xerecord.hxx.

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

std::size_t XclExpRecord::mnRecSize

Definition at line 177 of file xerecord.hxx.

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

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