LibreOffice Module sc (master) 1
|
Base class for single records with any content. More...
#include <xerecord.hxx>
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 &&) | |
XclExpRecordBase & | operator= (XclExpRecordBase const &) |
XclExpRecordBase & | operator= (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 |
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.
|
explicit |
nRecId | The record ID of this record. May be set later with SetRecId(). |
nRecSize | The predicted record size. May be set later with SetRecSize(). |
Definition at line 130 of file xerecord.cxx.
|
default |
|
overridevirtual |
Definition at line 136 of file xerecord.cxx.
|
inline |
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().
|
inline |
Returns the current record ID.
Definition at line 156 of file xerecord.hxx.
References mnRecId.
Referenced by XclExpFutureRecord::Save(), XclExpMultiCellBase::Save(), XclExpDefcolwidth::Save(), XclExpHeaderFooter::SaveXml(), XclExpPageBreaks::SaveXml(), and XclExpChType::WriteBody().
|
inline |
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().
|
overridevirtual |
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().
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().
|
inline |
Sets a new record ID.
Definition at line 161 of file xerecord.hxx.
References mnRecId.
Referenced by XclExpChType::Convert(), XclExpLabelCell::Init(), and SetRecHeader().
|
inline |
Sets a new record size prediction.
Definition at line 163 of file xerecord.hxx.
References mnRecSize.
Referenced by XclExpPageBreaks::Save(), XclExpDummyRecord::SetData(), SetRecHeader(), XclExpFont::XclExpFont(), XclExpHyperlink::XclExpHyperlink(), XclExpNote::XclExpNote(), XclExpPalette::XclExpPalette(), and XclExpStringRec::XclExpStringRec().
|
protectedvirtual |
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().
|
private |
The predicted record size.
Definition at line 179 of file xerecord.hxx.
Referenced by GetRecId(), Save(), and SetRecId().
|
private |
Definition at line 178 of file xerecord.hxx.
Referenced by AddRecSize(), GetRecSize(), Save(), and SetRecSize().