LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XclExpTableop Class Reference

Represents a TABLEOP record for a multiple operations range. More...

#include <xetable.hxx>

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

Public Member Functions

 XclExpTableop (const ScAddress &rScPos, const XclMultipleOpRefs &rRefs, sal_uInt8 nScMode)
 
bool TryExtend (const ScAddress &rScPos, const XclMultipleOpRefs &rRefs)
 Returns true, if the cell range has been extended to the passed position. More...
 
void Finalize ()
 Finalizes the record. More...
 
virtual XclTokenArrayRef CreateCellTokenArray (const XclExpRoot &rRoot) const override
 Creates and returns the token array for a corresponding FORMULA cell record. More...
 
virtual bool IsVolatile () const override
 Returns true, if the multiple operations range is volatile. More...
 
virtual void Save (XclExpStream &rStrm) override
 Writes the record if it is valid. More...
 
- Public Member Functions inherited from XclExpRangeFmlaBase
bool IsBasePos (sal_uInt16 nXclCol, sal_uInt32 nXclRow) const
 Returns true, if the passed cell position is equal to own base position. More...
 
virtual XclTokenArrayRef CreateCellTokenArray (const XclExpRoot &rRoot) const =0
 Derived classes create the token array for a corresponding FORMULA cell record. More...
 
virtual bool IsVolatile () const =0
 Derived classes return true, if the own formula contains volatile functions. 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 ()
 

Private Member Functions

bool IsAppendable (sal_uInt16 nXclCol, sal_uInt16 nXclRow) const
 Returns true, if the passed cell position can be appended to this record. More...
 
virtual void WriteBody (XclExpStream &rStrm) override
 Writes the contents of the TABLEOP record. More...
 

Private Attributes

sal_uInt16 mnLastAppXclCol
 
sal_uInt16 mnColInpXclCol
 Column index of last appended cell. More...
 
sal_uInt32 mnColInpXclRow
 Column index of column input cell. More...
 
sal_uInt16 mnRowInpXclCol
 Row index of column input cell. More...
 
sal_uInt32 mnRowInpXclRow
 Column index of row input cell. More...
 
sal_uInt8 mnScMode
 Row index of row input cell. More...
 
bool mbValid
 Type of the multiple operation (Calc constant). 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 Member Functions inherited from XclExpRangeFmlaBase
 XclExpRangeFmlaBase (sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScAddress &rScPos)
 Constructs the record with a single cell. More...
 
 XclExpRangeFmlaBase (sal_uInt16 nRecId, sal_uInt32 nRecSize, const ScRange &rScRange)
 Constructs the record with a cell range. More...
 
void Extend (const ScAddress &rScPos)
 Extends the cell range to include the passed cell address. More...
 
void WriteRangeAddress (XclExpStream &rStrm) const
 Writes the range address covered by this record. 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
 
- Protected Attributes inherited from XclExpRangeFmlaBase
XclRange maXclRange
 
XclAddress maBaseXclPos
 Range described by this record. More...
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Represents a TABLEOP record for a multiple operations range.

Definition at line 207 of file xetable.hxx.

Constructor & Destructor Documentation

◆ XclExpTableop()

XclExpTableop::XclExpTableop ( const ScAddress rScPos,
const XclMultipleOpRefs rRefs,
sal_uInt8  nScMode 
)
explicit

Definition at line 297 of file xetable.cxx.

References Col, and Row.

Member Function Documentation

◆ CreateCellTokenArray()

XclTokenArrayRef XclExpTableop::CreateCellTokenArray ( const XclExpRoot rRoot) const
overridevirtual

Creates and returns the token array for a corresponding FORMULA cell record.

Implements XclExpRangeFmlaBase.

Definition at line 408 of file xetable.cxx.

References XclExpFormulaCompiler::CreateErrorFormula(), XclExpFormulaCompiler::CreateSpecialRefFormula(), EXC_ERR_NA, EXC_TOKID_TBL, XclExpRoot::GetFormulaCompiler(), XclExpRangeFmlaBase::maBaseXclPos, and mbValid.

◆ Finalize()

void XclExpTableop::Finalize ( )

Finalizes the record.

Tests on valid cell range and reference addresses.

Definition at line 374 of file xetable.cxx.

References XclRange::maFirst, XclRange::maLast, XclExpRangeFmlaBase::maXclRange, mbValid, XclAddress::mnCol, mnColInpXclCol, mnColInpXclRow, mnLastAppXclCol, XclAddress::mnRow, mnRowInpXclCol, mnRowInpXclRow, and mnScMode.

Referenced by XclExpTableopBuffer::Finalize().

◆ IsAppendable()

bool XclExpTableop::IsAppendable ( sal_uInt16  nXclCol,
sal_uInt16  nXclRow 
) const
private

Returns true, if the passed cell position can be appended to this record.

Definition at line 427 of file xetable.cxx.

References XclRange::maFirst, XclRange::maLast, XclExpRangeFmlaBase::maXclRange, XclAddress::mnCol, mnLastAppXclCol, and XclAddress::mnRow.

Referenced by TryExtend().

◆ IsVolatile()

bool XclExpTableop::IsVolatile ( ) const
overridevirtual

Returns true, if the multiple operations range is volatile.

Implements XclExpRangeFmlaBase.

Definition at line 416 of file xetable.cxx.

Referenced by WriteBody().

◆ Save()

void XclExpTableop::Save ( XclExpStream rStrm)
overridevirtual

Writes the record if it is valid.

Reimplemented from XclExpRecord.

Definition at line 421 of file xetable.cxx.

References mbValid, rStrm, and XclExpRecord::Save().

◆ TryExtend()

bool XclExpTableop::TryExtend ( const ScAddress rScPos,
const XclMultipleOpRefs rRefs 
)

◆ WriteBody()

void XclExpTableop::WriteBody ( XclExpStream rStrm)
overrideprivatevirtual

Member Data Documentation

◆ mbValid

bool XclExpTableop::mbValid
private

Type of the multiple operation (Calc constant).

Definition at line 241 of file xetable.hxx.

Referenced by CreateCellTokenArray(), Finalize(), and Save().

◆ mnColInpXclCol

sal_uInt16 XclExpTableop::mnColInpXclCol
private

Column index of last appended cell.

Definition at line 236 of file xetable.hxx.

Referenced by Finalize(), TryExtend(), and WriteBody().

◆ mnColInpXclRow

sal_uInt32 XclExpTableop::mnColInpXclRow
private

Column index of column input cell.

Definition at line 237 of file xetable.hxx.

Referenced by Finalize(), TryExtend(), and WriteBody().

◆ mnLastAppXclCol

sal_uInt16 XclExpTableop::mnLastAppXclCol
private

Definition at line 235 of file xetable.hxx.

Referenced by Finalize(), IsAppendable(), and TryExtend().

◆ mnRowInpXclCol

sal_uInt16 XclExpTableop::mnRowInpXclCol
private

Row index of column input cell.

Definition at line 238 of file xetable.hxx.

Referenced by Finalize(), TryExtend(), and WriteBody().

◆ mnRowInpXclRow

sal_uInt32 XclExpTableop::mnRowInpXclRow
private

Column index of row input cell.

Definition at line 239 of file xetable.hxx.

Referenced by Finalize(), TryExtend(), and WriteBody().

◆ mnScMode

sal_uInt8 XclExpTableop::mnScMode
private

Row index of row input cell.

Definition at line 240 of file xetable.hxx.

Referenced by Finalize(), TryExtend(), and WriteBody().


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