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

The base class of all cell records. More...

#include <xetable.hxx>

Inheritance diagram for XclExpCellBase:
[legend]
Collaboration diagram for XclExpCellBase:
[legend]

Public Member Functions

const XclAddressGetXclPos () 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 sal_uInt16 GetLastXclCol () const =0
 Derived classes return the column index of the last contained cell. More...
 
virtual sal_uInt32 GetFirstXFId () const =0
 Derived classes return the XF identifier of the first contained cell. More...
 
virtual bool IsEmpty () const =0
 Derived classes return true, if this record does not contain at least one valid 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 ConvertXFIndexes (const XclExpRoot &rRoot)=0
 Derived classes convert the XF identifier(s) into the Excel XF index(es). 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, size_t nStartAllNotFound)
 Derived classes for blank cells remove unused Excel XF index(es). More...
 
- Public Member Functions inherited from XclExpRecord
 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

 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...
 
- Protected Member Functions inherited from XclExpRecord
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

XclAddress maXclPos
 

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

The base class of all cell records.

Definition at line 273 of file xetable.hxx.

Constructor & Destructor Documentation

◆ XclExpCellBase()

XclExpCellBase::XclExpCellBase ( sal_uInt16  nRecId,
std::size_t  nContSize,
const XclAddress rXclPos 
)
explicitprotected

Definition at line 541 of file xetable.cxx.

Member Function Documentation

◆ ConvertXFIndexes()

virtual void XclExpCellBase::ConvertXFIndexes ( const XclExpRoot rRoot)
pure virtual

Derived classes convert the XF identifier(s) into the Excel XF index(es).

Parameters
rXFIndexesThe converted XF index(es) are inserted here.

Implemented in XclExpSingleCellBase, and XclExpMultiCellBase.

Referenced by XclExpRow::Finalize().

◆ GetBlankXFIndexes()

void XclExpCellBase::GetBlankXFIndexes ( ScfUInt16Vec rXFIndexes) const
virtual

Derived classes for blank cells insert the Excel XF index(es) into the passed vector.

Reimplemented in XclExpBlankCell.

Definition at line 558 of file xetable.cxx.

Referenced by XclExpRow::Finalize().

◆ GetFirstXFId()

virtual sal_uInt32 XclExpCellBase::GetFirstXFId ( ) const
pure virtual

Derived classes return the XF identifier of the first contained cell.

Implemented in XclExpSingleCellBase, and XclExpMultiCellBase.

Referenced by lcl_GetStyleId().

◆ GetLastXclCol()

virtual sal_uInt16 XclExpCellBase::GetLastXclCol ( ) const
pure virtual

Derived classes return the column index of the last contained cell.

Implemented in XclExpSingleCellBase, and XclExpMultiCellBase.

Referenced by XclExpRow::Finalize(), and XclExpRow::GetFirstFreeXclCol().

◆ GetXclCol()

sal_uInt16 XclExpCellBase::GetXclCol ( ) const
inline

◆ GetXclPos()

const XclAddress & XclExpCellBase::GetXclPos ( ) const
inline

Returns the (first) address of the cell(s).

Definition at line 277 of file xetable.hxx.

References maXclPos.

Referenced by XclExpNumberCell::SaveXml(), XclExpBooleanCell::SaveXml(), XclExpLabelCell::SaveXml(), and XclExpFormulaCell::SaveXml().

◆ GetXclRow()

sal_uInt32 XclExpCellBase::GetXclRow ( ) const
inline

Returns the Excel row index of the cell.

Definition at line 281 of file xetable.hxx.

References maXclPos, and XclAddress::mnRow.

Referenced by XclExpFormulaCell::Save(), XclExpMultiCellBase::Save(), XclExpMultiCellBase::SaveXml(), and XclExpSingleCellBase::WriteBody().

◆ IsEmpty()

virtual bool XclExpCellBase::IsEmpty ( ) const
pure virtual

Derived classes return true, if this record does not contain at least one valid cell.

Implemented in XclExpSingleCellBase, and XclExpMultiCellBase.

Referenced by XclExpRow::Finalize().

◆ IsMultiLineText()

bool XclExpCellBase::IsMultiLineText ( ) const
virtual

Derived classes return whether the cell contains multi-line text.

Reimplemented in XclExpLabelCell.

Definition at line 548 of file xetable.cxx.

◆ RemoveUnusedBlankCells()

void XclExpCellBase::RemoveUnusedBlankCells ( const ScfUInt16Vec rXFIndexes,
size_t  nStartAllNotFound 
)
virtual

Derived classes for blank cells remove unused Excel XF index(es).

Reimplemented in XclExpBlankCell.

Definition at line 563 of file xetable.cxx.

Referenced by XclExpRow::Finalize().

◆ SetXclCol()

void XclExpCellBase::SetXclCol ( sal_uInt16  nXclCol)
inlineprotected

Sets this record to a new column position.

Definition at line 307 of file xetable.hxx.

References maXclPos, and XclAddress::mnCol.

Referenced by XclExpMultiCellBase::RemoveUnusedXFIndexes().

◆ TryMerge()

bool XclExpCellBase::TryMerge ( const XclExpCellBase rCell)
virtual

Derived classes try to merge the contents of the passed cell to own data.

Reimplemented in XclExpBlankCell, and XclExpRkCell.

Definition at line 553 of file xetable.cxx.

Referenced by XclExpRow::InsertCell().

Member Data Documentation

◆ maXclPos

XclAddress XclExpCellBase::maXclPos
private

Definition at line 310 of file xetable.hxx.

Referenced by GetXclCol(), GetXclPos(), GetXclRow(), and SetXclCol().


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