LibreOffice Module sc (master)
1
|
Base class for all cell records supporting multiple contents. More...
#include <xetable.hxx>
Public Member Functions | |
virtual sal_uInt16 | GetLastXclCol () const override |
Returns the column index of the last cell this record describes. More... | |
virtual sal_uInt32 | GetFirstXFId () const override |
Return the XF identifier of the first contained cell. More... | |
virtual bool | IsEmpty () const override |
Returns true, if this record does not contain at least one valid cell. More... | |
virtual void | ConvertXFIndexes (const XclExpRoot &rRoot) override |
Convert all XF identifiers into the Excel XF indexes. More... | |
virtual void | Save (XclExpStream &rStrm) override |
Writes the record, calls WriteContents() for each contained cell. More... | |
virtual void | SaveXml (XclExpXmlStream &rStrm) override |
![]() | |
const XclAddress & | GetXclPos () const |
Returns the (first) address of the cell(s). More... | |
sal_uInt16 | GetXclCol () const |
Returns the (first) Excel column index of the cell(s). More... | |
sal_uInt32 | GetXclRow () const |
Returns the Excel row index of the cell. More... | |
virtual bool | IsMultiLineText () const |
Derived classes return whether the cell contains multi-line text. More... | |
virtual bool | TryMerge (const XclExpCellBase &rCell) |
Derived classes try to merge the contents of the passed cell to own data. More... | |
virtual void | GetBlankXFIndexes (ScfUInt16Vec &rXFIndexes) const |
Derived classes for blank cells insert the Excel XF index(es) into the passed vector. More... | |
virtual void | RemoveUnusedBlankCells (const ScfUInt16Vec &rXFIndexes) |
Derived classes for blank cells remove unused Excel XF index(es). More... | |
![]() | |
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... | |
![]() | |
XclExpRecordBase () | |
XclExpRecordBase (XclExpRecordBase const &) | |
XclExpRecordBase (XclExpRecordBase &&) | |
XclExpRecordBase & | operator= (XclExpRecordBase const &) |
XclExpRecordBase & | operator= (XclExpRecordBase &&) noexcept |
virtual | ~XclExpRecordBase () |
![]() | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Protected Member Functions | |
XclExpMultiCellBase (sal_uInt16 nRecId, sal_uInt16 nMulRecId, std::size_t nContSize, const XclAddress &rXclPos) | |
sal_uInt16 | GetCellCount () const |
Returns the number of cells this record represents. More... | |
void | AppendXFId (const XclExpMultiXFId &rXFId) |
Appends the passed XF identifier nCount times to the list of XF identifiers. More... | |
void | AppendXFId (const XclExpRoot &rRoot, const ScPatternAttr *pPattern, sal_uInt16 nScript, sal_uInt32 nForcedXFId, sal_uInt16 nCount=1) |
Appends the passed cell format nCount times to the list of XF identifiers. More... | |
bool | TryMergeXFIds (const XclExpMultiCellBase &rCell) |
Tries to merge the XF ID list of the passed cell with the own list. More... | |
void | GetXFIndexes (ScfUInt16Vec &rXFIndexes) const |
Inserts the Excel XF index(es) into the passed vector. More... | |
void | RemoveUnusedXFIndexes (const ScfUInt16Vec &rXFIndexes) |
Removes unused Excel XF index(es). More... | |
![]() | |
XclExpCellBase (sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos) | |
void | SetXclCol (sal_uInt16 nXclCol) |
Sets this record to a new column position. More... | |
![]() | |
virtual void | WriteBody (XclExpStream &rStrm) |
Writes the body of the record (without record header). More... | |
![]() | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Private Types | |
typedef ::std::vector< XclExpMultiXFId > | XclExpMultiXFIdDeq |
Private Member Functions | |
virtual void | WriteContents (XclExpStream &rStrm, sal_uInt16 nRelCol)=0 |
Derived classes write the remaining contents of the specified cell (without XF index). More... | |
virtual void | WriteXmlContents (XclExpXmlStream &rStrm, const XclAddress &rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol)=0 |
Private Attributes | |
sal_uInt16 | mnMulRecId |
std::size_t | mnContSize |
Record ID for multiple record variant. More... | |
XclExpMultiXFIdDeq | maXFIds |
Data size of contents for one cell. More... | |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
oslInterlockedCount | m_nCount |
Base class for all cell records supporting multiple contents.
Definition at line 467 of file xetable.hxx.
|
private |
Definition at line 514 of file xetable.hxx.
|
explicitprotected |
Definition at line 1101 of file xetable.cxx.
|
protected |
Appends the passed XF identifier nCount times to the list of XF identifiers.
Definition at line 1242 of file xetable.cxx.
References maXFIds, XclExpMultiXFId::mnCount, and XclExpXFId::mnXFId.
Referenced by AppendXFId(), RemoveUnusedXFIndexes(), XclExpBlankCell::XclExpBlankCell(), and XclExpRkCell::XclExpRkCell().
|
protected |
Appends the passed cell format nCount times to the list of XF identifiers.
Definition at line 1250 of file xetable.cxx.
References AppendXFId(), EXC_XFID_NOTFOUND, XclExpRoot::GetXFBuffer(), and XclExpXFBuffer::Insert().
|
overridevirtual |
Convert all XF identifiers into the Excel XF indexes.
Implements XclExpCellBase.
Definition at line 1124 of file xetable.cxx.
References maXFIds.
|
protected |
Returns the number of cells this record represents.
Definition at line 1236 of file xetable.cxx.
References maXFIds.
Referenced by GetLastXclCol().
|
overridevirtual |
Return the XF identifier of the first contained cell.
Implements XclExpCellBase.
Definition at line 1114 of file xetable.cxx.
References XclExpXFBuffer::GetDefCellXFId(), and maXFIds.
|
overridevirtual |
Returns the column index of the last cell this record describes.
Implements XclExpCellBase.
Definition at line 1109 of file xetable.cxx.
References GetCellCount(), and XclExpCellBase::GetXclCol().
Referenced by GetXFIndexes(), RemoveUnusedXFIndexes(), and TryMergeXFIds().
|
protected |
Inserts the Excel XF index(es) into the passed vector.
Definition at line 1268 of file xetable.cxx.
References GetLastXclCol(), XclExpCellBase::GetXclCol(), and maXFIds.
Referenced by XclExpBlankCell::GetBlankXFIndexes().
|
overridevirtual |
Returns true, if this record does not contain at least one valid cell.
Implements XclExpCellBase.
Definition at line 1119 of file xetable.cxx.
References maXFIds.
|
protected |
Removes unused Excel XF index(es).
rXFIndexes | Specifies which XF indexes are used. |
Definition at line 1279 of file xetable.cxx.
References AppendXFId(), EXC_XF_NOTFOUND, GetLastXclCol(), XclExpCellBase::GetXclCol(), maXFIds, XclExpXFId::mnXFId, XclExpXFId::mnXFIndex, and XclExpCellBase::SetXclCol().
Referenced by XclExpBlankCell::RemoveUnusedBlankCells().
|
overridevirtual |
Writes the record, calls WriteContents() for each contained cell.
May write several records, if unused XF indexes are contained.
Reimplemented from XclExpRecord.
Definition at line 1130 of file xetable.cxx.
References XclExpStream::EndRecord(), EXC_BIFF3, EXC_XF_NOTFOUND, XclRoot::GetBiff(), XclExpRecord::GetRecId(), XclExpRecord::GetRecSize(), XclExpStream::GetRoot(), XclExpCellBase::GetXclCol(), XclExpCellBase::GetXclRow(), maXFIds, mnContSize, mnMulRecId, nCount, OSL_ENSURE_BIFF, XclExpStream::StartRecord(), and WriteContents().
|
overridevirtual |
Reimplemented from XclExpRecordBase.
Definition at line 1187 of file xetable.cxx.
References EXC_XF_NOTFOUND, XclExpCellBase::GetXclCol(), XclExpCellBase::GetXclRow(), maXFIds, and WriteXmlContents().
|
protected |
Tries to merge the XF ID list of the passed cell with the own list.
Definition at line 1258 of file xetable.cxx.
References GetLastXclCol(), XclExpCellBase::GetXclCol(), and maXFIds.
Referenced by XclExpBlankCell::TryMerge(), and XclExpRkCell::TryMerge().
|
privatepure virtual |
Derived classes write the remaining contents of the specified cell (without XF index).
nRelCol | Relative column index (starts with 0 for first cell of this record). |
Implemented in XclExpRkCell, and XclExpBlankCell.
Referenced by Save().
|
privatepure virtual |
Implemented in XclExpRkCell, and XclExpBlankCell.
Referenced by SaveXml().
|
private |
Data size of contents for one cell.
Definition at line 518 of file xetable.hxx.
Referenced by AppendXFId(), ConvertXFIndexes(), GetCellCount(), GetFirstXFId(), GetXFIndexes(), IsEmpty(), RemoveUnusedXFIndexes(), Save(), SaveXml(), and TryMergeXFIds().
|
private |
Record ID for multiple record variant.
Definition at line 517 of file xetable.hxx.
Referenced by Save().
|
private |
Definition at line 516 of file xetable.hxx.
Referenced by Save().