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

Base class for all cell records not supporting multiple contents. More...

#include <xetable.hxx>

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

Public Member Functions

virtual sal_uInt16 GetLastXclCol () const override
 Returns the last column, which is equal to the first column for single cells. More...
 
virtual sal_uInt32 GetFirstXFId () const override
 Return the XF identifier of the 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
 Converts the XF identifier into the Excel XF index. More...
 
virtual void Save (XclExpStream &rStrm) override
 Writes cell address, XF index, and calls WriteContents() for each cell. More...
 
- Public Member Functions inherited from XclExpCellBase
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

 XclExpSingleCellBase (sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos, sal_uInt32 nXFId)
 
 XclExpSingleCellBase (const XclExpRoot &rRoot, sal_uInt16 nRecId, std::size_t nContSize, const XclAddress &rXclPos, const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt32 nForcedXFId)
 
void SetContSize (std::size_t nContSize)
 
std::size_t GetContSize () const
 
void SetXFId (sal_uInt32 nXFId)
 
sal_uInt32 GetXFId () const
 
- Protected Member Functions inherited from XclExpCellBase
 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...
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

virtual void WriteBody (XclExpStream &rStrm) override
 Writes cell address, XF index, and calls WriteContents() for each cell. More...
 
virtual void WriteContents (XclExpStream &rStrm)=0
 Derived classes write the contents of the specified cell (without XF index). More...
 

Private Attributes

XclExpXFId maXFId
 
std::size_t mnContSize
 The XF identifier of the cell formatting. 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
 

Detailed Description

Base class for all cell records not supporting multiple contents.

Definition at line 318 of file xetable.hxx.

Constructor & Destructor Documentation

◆ XclExpSingleCellBase() [1/2]

XclExpSingleCellBase::XclExpSingleCellBase ( sal_uInt16  nRecId,
std::size_t  nContSize,
const XclAddress rXclPos,
sal_uInt32  nXFId 
)
explicitprotected

Definition at line 570 of file xetable.cxx.

◆ XclExpSingleCellBase() [2/2]

XclExpSingleCellBase::XclExpSingleCellBase ( const XclExpRoot rRoot,
sal_uInt16  nRecId,
std::size_t  nContSize,
const XclAddress rXclPos,
const ScPatternAttr pPattern,
sal_Int16  nScript,
sal_uInt32  nForcedXFId 
)
explicitprotected

Member Function Documentation

◆ ConvertXFIndexes()

void XclExpSingleCellBase::ConvertXFIndexes ( const XclExpRoot rRoot)
overridevirtual

Converts the XF identifier into the Excel XF index.

Implements XclExpCellBase.

Definition at line 604 of file xetable.cxx.

References XclExpXFId::ConvertXFIndex(), and maXFId.

◆ GetContSize()

std::size_t XclExpSingleCellBase::GetContSize ( ) const
inlineprotected

Definition at line 341 of file xetable.hxx.

References mnContSize.

Referenced by XclExpLabelCell::Init().

◆ GetFirstXFId()

sal_uInt32 XclExpSingleCellBase::GetFirstXFId ( ) const
overridevirtual

Return the XF identifier of the cell.

Implements XclExpCellBase.

Definition at line 594 of file xetable.cxx.

References GetXFId().

◆ GetLastXclCol()

sal_uInt16 XclExpSingleCellBase::GetLastXclCol ( ) const
overridevirtual

Returns the last column, which is equal to the first column for single cells.

Implements XclExpCellBase.

Definition at line 589 of file xetable.cxx.

References XclExpCellBase::GetXclCol().

◆ GetXFId()

sal_uInt32 XclExpSingleCellBase::GetXFId ( ) const
inlineprotected

◆ IsEmpty()

bool XclExpSingleCellBase::IsEmpty ( ) const
overridevirtual

Returns true, if this record does not contain at least one valid cell.

Implements XclExpCellBase.

Definition at line 599 of file xetable.cxx.

◆ Save()

void XclExpSingleCellBase::Save ( XclExpStream rStrm)
overridevirtual

Writes cell address, XF index, and calls WriteContents() for each cell.

Reimplemented from XclExpRecord.

Reimplemented in XclExpFormulaCell.

Definition at line 609 of file xetable.cxx.

References XclExpRecord::AddRecSize(), EXC_BIFF3, mnContSize, OSL_ENSURE_BIFF, rStrm, and XclExpRecord::Save().

Referenced by XclExpFormulaCell::Save().

◆ SetContSize()

void XclExpSingleCellBase::SetContSize ( std::size_t  nContSize)
inlineprotected

Definition at line 340 of file xetable.hxx.

References mnContSize.

Referenced by XclExpLabelCell::Init(), and XclExpFormulaCell::Save().

◆ SetXFId()

void XclExpSingleCellBase::SetXFId ( sal_uInt32  nXFId)
inlineprotected

◆ WriteBody()

void XclExpSingleCellBase::WriteBody ( XclExpStream rStrm)
overrideprivatevirtual

Writes cell address, XF index, and calls WriteContents() for each cell.

Reimplemented from XclExpRecord.

Definition at line 616 of file xetable.cxx.

References XclExpCellBase::GetXclCol(), XclExpCellBase::GetXclRow(), maXFId, XclExpXFId::mnXFIndex, rStrm, and WriteContents().

◆ WriteContents()

virtual void XclExpSingleCellBase::WriteContents ( XclExpStream rStrm)
privatepure virtual

Derived classes write the contents of the specified cell (without XF index).

Implemented in XclExpNumberCell, XclExpBooleanCell, XclExpLabelCell, and XclExpFormulaCell.

Referenced by WriteBody().

Member Data Documentation

◆ maXFId

XclExpXFId XclExpSingleCellBase::maXFId
private

Definition at line 353 of file xetable.hxx.

Referenced by ConvertXFIndexes(), GetXFId(), SetXFId(), and WriteBody().

◆ mnContSize

std::size_t XclExpSingleCellBase::mnContSize
private

The XF identifier of the cell formatting.

Definition at line 354 of file xetable.hxx.

Referenced by GetContSize(), Save(), and SetContSize().


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