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

Represents a SHRFMLA record that contains the token array of a shared formula. More...

#include <xetable.hxx>

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

Public Member Functions

 XclExpShrfmla (const XclTokenArrayRef &xTokArr, const ScAddress &rScPos)
 Creates a SHRFMLA record that consists of the passed cell address only. More...
 
void ExtendRange (const ScAddress &rScPos)
 Extends the cell range to include the passed cell address. 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 shared formula contains volatile functions. 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...
 
- 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 SaveXml (XclExpXmlStream &rStrm)
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

virtual void WriteBody (XclExpStream &rStrm) override
 Writes the body of the record (without record header). More...
 

Private Attributes

XclTokenArrayRef mxTokArr
 
sal_uInt8 mnUsedCount
 The token array of a shared formula. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static voidoperator new (std::size_t nSize)
 
static voidoperator 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...
 
- 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 SHRFMLA record that contains the token array of a shared formula.

A SHRFMLA record is stored following the first FORMULA record that is part of a shared formula. All FORMULA records of a shared formula contain a reference to the SHRFMLA record, while the SHRFMLA record contains the formula token array used by all formulas.

Definition at line 151 of file xetable.hxx.

Constructor & Destructor Documentation

XclExpShrfmla::XclExpShrfmla ( const XclTokenArrayRef xTokArr,
const ScAddress rScPos 
)
explicit

Creates a SHRFMLA record that consists of the passed cell address only.

Definition at line 180 of file xetable.cxx.

Member Function Documentation

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

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

Implements XclExpRangeFmlaBase.

Definition at line 193 of file xetable.cxx.

References XclExpFormulaCompiler::CreateSpecialRefFormula(), EXC_TOKID_EXP, XclExpRoot::GetFormulaCompiler(), and XclExpRangeFmlaBase::maBaseXclPos.

void XclExpShrfmla::ExtendRange ( const ScAddress rScPos)

Extends the cell range to include the passed cell address.

Definition at line 187 of file xetable.cxx.

References XclExpRangeFmlaBase::Extend(), and mnUsedCount.

bool XclExpShrfmla::IsVolatile ( ) const
overridevirtual

Returns true, if the shared formula contains volatile functions.

Implements XclExpRangeFmlaBase.

Definition at line 198 of file xetable.cxx.

References mxTokArr.

void XclExpShrfmla::WriteBody ( XclExpStream rStrm)
overrideprivatevirtual

Writes the body of the record (without record header).

Usually this method will be overwritten by derived classes.

Reimplemented from XclExpRecord.

Definition at line 203 of file xetable.cxx.

References mnUsedCount, mxTokArr, and XclExpRangeFmlaBase::WriteRangeAddress().

Member Data Documentation

sal_uInt8 XclExpShrfmla::mnUsedCount
private

The token array of a shared formula.

Definition at line 170 of file xetable.hxx.

Referenced by ExtendRange(), and WriteBody().

XclTokenArrayRef XclExpShrfmla::mxTokArr
private

Definition at line 169 of file xetable.hxx.

Referenced by IsVolatile(), and WriteBody().


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