LibreOffice Module sc (master) 1
|
A list of Excel record objects. More...
#include <xerecord.hxx>
Public Types | |
typedef rtl::Reference< RecType > | RecordRefType |
Public Member Functions | |
bool | IsEmpty () const |
size_t | GetSize () const |
bool | HasRecord (size_t nPos) const |
Returns true, if the passed index points to an exiting record. More... | |
RecType * | GetRecord (size_t nPos) const |
Returns reference to an existing record or empty reference on error. More... | |
RecType * | GetFirstRecord () const |
Returns reference to the first existing record or empty reference, if list is empty. More... | |
RecType * | GetLastRecord () const |
Returns reference to the last existing record or empty reference, if list is empty. More... | |
void | InsertRecord (RecType *pRec, size_t nPos) |
Inserts a record at the specified position into the list. More... | |
void | InsertRecord (RecordRefType pRec, size_t nPos) |
void | AppendRecord (RecType *pRec) |
Appends a record to the list. More... | |
void | AppendRecord (const RecordRefType &xRec) |
void | AppendRecord (RecordRefType xRec) && |
void | ReplaceRecord (RecType *pRec, size_t nPos) |
Replaces the record at the specified position from the list with the passed record. More... | |
void | ReplaceRecord (RecordRefType const &xRec, size_t nPos) |
void | AppendNewRecord (RecType *pRec) |
Appends a newly created record to the list. More... | |
void | AppendNewRecord (RecordRefType const &xRec) |
void | AppendNewRecord (RecordRefType xRec) && |
void | RemoveRecord (size_t nPos) |
Removes the record at the specified position from the list. More... | |
void | RemoveAllRecords () |
Removes all records from the list. More... | |
virtual void | Save (XclExpStream &rStrm) override |
Writes the complete record list. More... | |
virtual void | SaveXml (XclExpXmlStream &rStrm) override |
void | InvalidateRecord (size_t nPos) |
Optimization for repeated removal. More... | |
void | RemoveInvalidatedRecords () |
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 () |
Private Types | |
typedef ::std::vector< RecordRefType > | RecordVec |
Private Attributes | |
RecordVec | maRecs |
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 Member Functions inherited from salhelper::SimpleReferenceObject | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
A list of Excel record objects.
Provides saving the compete list. This class is derived from XclExpRecordBase, so it can be used as record in another record list. Requires RecType::Save( XclExpStream& ).
Definition at line 321 of file xerecord.hxx.
typedef rtl::Reference< RecType > XclExpRecordList< RecType >::RecordRefType |
Definition at line 324 of file xerecord.hxx.
|
private |
Definition at line 404 of file xerecord.hxx.
|
inline |
Definition at line 363 of file xerecord.hxx.
References XclExpRecordList< RecType >::AppendNewRecord().
|
inline |
Definition at line 365 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
|
inline |
Appends a newly created record to the list.
Definition at line 361 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by ExcTable::Add(), XclExpPivotCache::AddStdFields(), XclExpXFBuffer::AppendBuiltInXFWithStyle(), XclExpRecordList< RecType >::AppendNewRecord(), XclExpPTField::AppendSubtotalItem(), XclExpPivotTableManager::CreatePivotTables(), ExcTable::FillAsEmptyTable(), ExcTable::FillAsHeaderBinary(), ExcTable::FillAsHeaderXml(), ExcTable::FillAsTableBinary(), ExcTable::FillAsTableXml(), XclExpFontBuffer::InitDefaultFonts(), XclExpColinfoBuffer::Initialize(), XclExpFontBuffer::Insert(), XclExpXFBuffer::InsertCellXF(), XclExpXFBuffer::InsertDefaultRecords(), XclExpPCField::InsertGroupItem(), XclExpPCField::InsertOrigItem(), XclExpXFBuffer::InsertStyleXF(), lcl_AddBookviews(), lcl_AddCalcPr(), lcl_AddScenariosAndFilters(), lcl_AddWorkbookProtection(), XclExpPCField::SetDateGroupLimit(), XclExpPCField::SetNumGroupLimit(), XclExpChart::XclExpChart(), XclExpCondfmt::XclExpCondfmt(), XclExpExtConditionalFormatting::XclExpExtConditionalFormatting(), XclExpExtIconSet::XclExpExtIconSet(), XclExpPivotTable::XclExpPivotTable(), and XclExpPTField::XclExpPTField().
|
inline |
Definition at line 350 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
|
inline |
Definition at line 352 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
|
inline |
Appends a record to the list.
Definition at line 348 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by XclExpPivotCache::AddGroupFields(), XclExtLst::AddRecord(), XclExpExtCondFormat::AddRecord(), XclExpNameManagerImpl::Append(), XclExpXFBuffer::AppendBuiltInXF(), XclExpXFBuffer::AppendXFIndex(), XclExpChAxesSet::Convert(), XclExpChSeries::ConvertDataSeries(), XclExpChTypeGroup::CreateDataSeries(), XclExpPivotTableManager::CreatePivotCache(), XclExpChChart::CreateSeries(), XclExpChTypeGroup::CreateStockSeries(), ExcAutoFilterRecs::ExcAutoFilterRecs(), ExcTable::FillAsHeaderBinary(), ExcTable::FillAsHeaderXml(), ExcTable::FillAsTableBinary(), ExcTable::FillAsTableXml(), ExcAutoFilterRecs::GetByCol(), XclExpFontBuffer::InitDefaultFonts(), lcl_AddScenariosAndFilters(), ExcDocument::ReadDoc(), XclExpChChart::SetDataLabel(), XclExpColorScale::XclExpColorScale(), XclExpCondFormatBuffer::XclExpCondFormatBuffer(), and XclExpIconSet::XclExpIconSet().
|
inline |
Returns reference to the first existing record or empty reference, if list is empty.
Definition at line 336 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by XclExpChAxesSet::GetFirstTypeGroup(), and XclExpRow::GetFirstUsedXclCol().
|
inline |
Returns reference to the last existing record or empty reference, if list is empty.
Definition at line 339 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by XclExpRow::Finalize(), XclExpRow::GetFirstFreeXclCol(), and XclExpChAxesSet::GetLastTypeGroup().
|
inline |
Returns reference to an existing record or empty reference on error.
Definition at line 333 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and nPos.
Referenced by XclExpPivotCache::AddGroupFields(), XclExpXFBuffer::AppendXFIndex(), XclExpChAxesSet::Convert(), XclExpChTypeGroup::ConvertCategSequence(), XclExpTableopBuffer::CreateOrExtendTableop(), XclExpPivotTableManager::CreatePivotCache(), ExcAutoFilterRecs::ExcAutoFilterRecs(), XclExpPivotTable::Finalize(), XclExpXFBuffer::Finalize(), XclExpTableopBuffer::Finalize(), XclExpRow::Finalize(), XclExpColinfoBuffer::Finalize(), XclExpFontBuffer::Find(), XclExpNameManagerImpl::FindBuiltInNameIdx(), XclExpXFBuffer::FindXF(), XclExpFontBuffer::GetAppFontData(), ExcAutoFilterRecs::GetByCol(), XclExpPivotCache::GetField(), XclExpPivotTable::GetField(), XclExpPivotTable::GetFieldAcc(), XclExpFontBuffer::GetFont(), XclExpPCField::GetItem(), XclExtLst::GetItem(), XclExpPTField::GetItemAcc(), XclExpPCField::GetItemIndex(), XclExpPTField::GetItemIndex(), XclExpNameManagerImpl::GetName(), XclExpNameManagerImpl::GetUnusedName(), XclExpXFBuffer::GetXFById(), XclExpRow::InsertCell(), XclExpXFBuffer::InsertCellXF(), XclExpXFBuffer::InsertDefaultRecords(), XclExpNameManagerImpl::InsertMacroCall(), XclExpPCField::InsertOrigBoolItem(), XclExpPCField::InsertOrigDateTimeItem(), XclExpPCField::InsertOrigDoubleItem(), XclExpPCField::InsertOrigTextItem(), XclExpNameManagerImpl::InsertRawName(), XclExpXFBuffer::InsertStyleXF(), ExcAutoFilterRecs::IsFiltered(), lcl_GetCellCounts(), XclExpDval::Save(), XclExpComments::SaveXml(), XclExpXFBuffer::SaveXml(), XclExpDval::SearchOrCreateDv(), ExcDocument::Write(), XclExpPivotTableManager::WritePivotTables(), XclExpPivotTable::WriteSxdiList(), XclExpPivotCache::WriteSxindexlistList(), XclExpPivotTable::WriteSxpi(), and ExcDocument::WriteXml().
|
inline |
Definition at line 327 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by XclExpNameManagerImpl::Append(), XclExpXFBuffer::AppendBuiltInXF(), XclExpRow::AppendCell(), XclExpXFBuffer::AppendXFIndex(), XclExpChAxesSet::Convert(), XclExpChTypeGroup::ConvertCategSequence(), XclExpNameManagerImpl::CreateName(), XclExpTableopBuffer::CreateOrExtendTableop(), XclExpPivotTableManager::CreatePivotCache(), XclExpChChart::CreateSeries(), ExcAutoFilterRecs::ExcAutoFilterRecs(), XclExpPCField::Finalize(), XclExpPivotTable::Finalize(), XclExpXFBuffer::Finalize(), XclExpTableopBuffer::Finalize(), XclExpRow::Finalize(), XclExpColinfoBuffer::Finalize(), XclExpFontBuffer::Find(), ExcAutoFilterRecs::GetByCol(), XclExpPivotTable::GetFieldAcc(), XclExpPivotCache::GetFieldCount(), XclExpChTypeGroup::GetFreeFormatIdx(), XclExtLst::GetItem(), XclExpPTField::GetItemAcc(), XclExpPCField::GetItemCount(), XclExpPCField::GetItemIndex(), XclExpPTField::GetItemIndex(), XclExpNameManagerImpl::GetUnusedName(), XclExpNameManagerImpl::Initialize(), XclExpPCField::InitStandardField(), XclExpFontBuffer::Insert(), XclExpXFBuffer::InsertCellXF(), XclExpXFBuffer::InsertDefaultRecords(), XclExpPCField::InsertGroupItem(), XclExpNameManagerImpl::InsertMacroCall(), XclExpPCField::InsertOrigBoolItem(), XclExpPCField::InsertOrigDateTimeItem(), XclExpPCField::InsertOrigDoubleItem(), XclExpPCField::InsertOrigItem(), XclExpPCField::InsertOrigTextItem(), XclExpNameManagerImpl::InsertRawName(), XclExpXFBuffer::InsertStyleXF(), ExcAutoFilterRecs::IsFiltered(), XclExpCondfmt::IsValidForBinary(), lcl_GetCellCounts(), XclExpChChart::RemoveLastSeries(), XclExpDval::Save(), XclExpDval::SaveXml(), XclExpComments::SaveXml(), XclExpFontBuffer::SaveXml(), XclExpXFBuffer::SaveXml(), XclExpDval::SearchOrCreateDv(), ExcDocument::Write(), XclExpCondfmt::WriteBody(), XclExpDval::WriteBody(), XclExpPivotTableManager::WritePivotTables(), XclExpPivotCache::WriteSxindexlistList(), XclExpPCField::WriteSxnumgroup(), ExcDocument::WriteXml(), and XclExpPTField::XclExpPTField().
|
inline |
Returns true, if the passed index points to an exiting record.
Definition at line 330 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and nPos.
Referenced by XclExpXFBuffer::AppendXFIndex(), XclExpNameManagerImpl::GetName(), and XclExpXFBuffer::InsertStyleXF().
|
inline |
Definition at line 345 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and nPos.
|
inline |
Inserts a record at the specified position into the list.
Definition at line 343 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and nPos.
Referenced by XclExpRow::InsertCell(), and XclExpDval::SearchOrCreateDv().
|
inline |
Optimization for repeated removal.
Since this is internally a vector, repeated RemoveRecord() would repeatedly move all items after the removed position. Instead it's possible to invalidate a record and then call RemoveInvalidatedRecords() at the end (which is necessary, the list is generally not allowed to contain invalid entries).
Definition at line 395 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and nPos.
Referenced by XclExpColinfoBuffer::Finalize().
|
inline |
Definition at line 326 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by ExcAutoFilterRecs::ExcAutoFilterRecs(), ExcTable::FillAsTableXml(), XclExpRow::Finalize(), XclExpColinfoBuffer::Finalize(), XclExpRow::GetFirstFreeXclCol(), XclExpRow::GetFirstUsedXclCol(), XclExpPCField::GetVisItemList(), XclExpRow::IsEmpty(), XclExpChAxesSet::IsValidAxesSet(), XclExpCondfmt::IsValidForBinary(), XclExpCondfmt::IsValidForXml(), XclExpChTypeGroup::IsValidGroup(), XclExpChChart::RemoveLastSeries(), XclExpDval::Save(), XclExpNameManagerImpl::SaveXml(), ExcAutoFilterRecs::SaveXml(), XclExpDval::SaveXml(), XclExpComments::SaveXml(), XclExtLst::SaveXml(), XclExpFontBuffer::SaveXml(), XclExpColinfoBuffer::SaveXml(), XclExpDval::SearchOrCreateDv(), ExcDocument::Write(), XclExpCondfmt::WriteBody(), XclExpRow::WriteCellList(), and ExcDocument::WriteXml().
|
inline |
Removes all records from the list.
Definition at line 372 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by ExcAutoFilterRecs::ExcAutoFilterRecs(), and ExcDocument::~ExcDocument().
|
inline |
Definition at line 396 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs.
Referenced by XclExpColinfoBuffer::Finalize().
|
inline |
Removes the record at the specified position from the list.
Definition at line 369 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and nPos.
Referenced by XclExpNameManagerImpl::CreateName(), XclExpRow::Finalize(), XclExpRow::InsertCell(), XclExpChChart::RemoveLastSeries(), XclExpRecordList< RecType >::ReplaceRecord(), and XclExpDval::Save().
|
inline |
Definition at line 357 of file xerecord.hxx.
References nPos, and XclExpRecordList< RecType >::ReplaceRecord().
|
inline |
Replaces the record at the specified position from the list with the passed record.
Definition at line 355 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, nPos, and XclExpRecordList< RecType >::RemoveRecord().
Referenced by XclExpFontBuffer::Insert(), XclExpXFBuffer::InsertCellXF(), XclExpXFBuffer::InsertStyleXF(), and XclExpRecordList< RecType >::ReplaceRecord().
|
inlineoverridevirtual |
Writes the complete record list.
Reimplemented from XclExpRecordBase.
Reimplemented in XclExpSubStream.
Definition at line 375 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and rStrm.
Referenced by XclExpNameManagerImpl::Save(), ExcAutoFilterRecs::Save(), XclExpCondfmt::Save(), XclExpCondFormatBuffer::Save(), XclExpDval::Save(), XclExpPCField::Save(), XclExpPTField::Save(), XclExpPivotTable::Save(), XclExpSubStream::Save(), XclExpFontBuffer::Save(), XclExpXFBuffer::Save(), XclExpColinfoBuffer::Save(), ExcTable::Write(), XclExpPivotCache::WriteCacheStream(), XclExpRow::WriteCellList(), XclExpPivotTableManager::WritePivotCaches(), XclExpChSeries::WriteSubRecords(), XclExpChAxesSet::WriteSubRecords(), XclExpChChart::WriteSubRecords(), and XclExpPCField::WriteSxnumgroup().
|
inlineoverridevirtual |
Reimplemented from XclExpRecordBase.
Definition at line 382 of file xerecord.hxx.
References XclExpRecordList< RecType >::maRecs, and rStrm.
Referenced by XclExpNameManagerImpl::SaveXml(), ExcAutoFilterRecs::SaveXml(), XclExpCondfmt::SaveXml(), XclExpColorScale::SaveXml(), XclExpIconSet::SaveXml(), XclExpCondFormatBuffer::SaveXml(), XclExpDval::SaveXml(), XclExpExtIconSet::SaveXml(), XclExpExtConditionalFormatting::SaveXml(), XclExpExtCondFormat::SaveXml(), XclExtLst::SaveXml(), XclExpFontBuffer::SaveXml(), XclExpXFBuffer::SaveXml(), XclExpColinfoBuffer::SaveXml(), XclExpRow::SaveXml(), and ExcTable::WriteXml().
|
private |
Definition at line 405 of file xerecord.hxx.
Referenced by XclExpRecordList< RecType >::AppendNewRecord(), XclExpRecordList< RecType >::AppendRecord(), XclExpRecordList< RecType >::GetFirstRecord(), XclExpRecordList< RecType >::GetLastRecord(), XclExpRecordList< RecType >::GetRecord(), XclExpRecordList< RecType >::GetSize(), XclExpRecordList< RecType >::HasRecord(), XclExpRecordList< RecType >::InsertRecord(), XclExpRecordList< RecType >::InvalidateRecord(), XclExpRecordList< RecType >::IsEmpty(), XclExpRecordList< RecType >::RemoveAllRecords(), XclExpRecordList< RecType >::RemoveInvalidatedRecords(), XclExpRecordList< RecType >::RemoveRecord(), XclExpRecordList< RecType >::ReplaceRecord(), XclExpRecordList< RecType >::Save(), and XclExpRecordList< RecType >::SaveXml().