LibreOffice Module sc (master) 1
|
Represents a TABLEOP record for a multiple operations range. More...
#include <xetable.hxx>
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 &&) | |
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 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 |
Represents a TABLEOP record for a multiple operations range.
Definition at line 207 of file xetable.hxx.
|
explicit |
Definition at line 297 of file xetable.cxx.
|
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.
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().
|
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().
|
overridevirtual |
Returns true, if the multiple operations range is volatile.
Implements XclExpRangeFmlaBase.
Definition at line 416 of file xetable.cxx.
Referenced by WriteBody().
|
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().
bool XclExpTableop::TryExtend | ( | const ScAddress & | rScPos, |
const XclMultipleOpRefs & | rRefs | ||
) |
Returns true, if the cell range has been extended to the passed position.
@descr All references passed in rRefs must fit the ranges passed in the constructor.
Definition at line 310 of file xetable.cxx.
References ScAddress::Col(), XclExpRangeFmlaBase::Extend(), IsAppendable(), XclMultipleOpRefs::maColFirstScPos, XclMultipleOpRefs::maColRelScPos, XclRange::maFirst, XclMultipleOpRefs::maFmlaScPos, XclMultipleOpRefs::maRowFirstScPos, XclMultipleOpRefs::maRowRelScPos, XclExpRangeFmlaBase::maXclRange, XclMultipleOpRefs::mbDblRefMode, XclAddress::mnCol, mnColInpXclCol, mnColInpXclRow, mnLastAppXclCol, XclAddress::mnRow, mnRowInpXclCol, mnRowInpXclRow, mnScMode, ScAddress::Row(), and ScAddress::Tab().
Referenced by XclExpTableopBuffer::CreateOrExtendTableop().
|
overrideprivatevirtual |
Writes the contents of the TABLEOP record.
Reimplemented from XclExpRecord.
Definition at line 434 of file xetable.cxx.
References EXC_TABLEOP_BOTH, EXC_TABLEOP_DEFAULTFLAGS, EXC_TABLEOP_RECALC_ALWAYS, EXC_TABLEOP_ROW, IsVolatile(), mnColInpXclCol, mnColInpXclRow, mnRowInpXclCol, mnRowInpXclRow, mnScMode, rStrm, set_flag(), and XclExpRangeFmlaBase::WriteRangeAddress().
|
private |
Type of the multiple operation (Calc constant).
Definition at line 241 of file xetable.hxx.
Referenced by CreateCellTokenArray(), Finalize(), and Save().
|
private |
Column index of last appended cell.
Definition at line 236 of file xetable.hxx.
Referenced by Finalize(), TryExtend(), and WriteBody().
|
private |
Column index of column input cell.
Definition at line 237 of file xetable.hxx.
Referenced by Finalize(), TryExtend(), and WriteBody().
|
private |
Definition at line 235 of file xetable.hxx.
Referenced by Finalize(), IsAppendable(), and TryExtend().
|
private |
Row index of column input cell.
Definition at line 238 of file xetable.hxx.
Referenced by Finalize(), TryExtend(), and WriteBody().
|
private |
Column index of row input cell.
Definition at line 239 of file xetable.hxx.
Referenced by Finalize(), TryExtend(), and WriteBody().
|
private |
Row index of row input cell.
Definition at line 240 of file xetable.hxx.
Referenced by Finalize(), TryExtend(), and WriteBody().