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

Stores the matrix result at the formula cell, additionally the range the matrix formula occupies. More...

#include <token.hxx>

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

Public Member Functions

 ScMatrixFormulaCellToken (SCCOL nC, SCROW nR, const ScConstMatrixRef &pMat, const formula::FormulaToken *pUL)
 
 ScMatrixFormulaCellToken (SCCOL nC, SCROW nR)
 
 ScMatrixFormulaCellToken (const ScMatrixFormulaCellToken &r)
 
virtual ~ScMatrixFormulaCellToken () override
 
virtual bool operator== (const formula::FormulaToken &rToken) const override
 
virtual FormulaTokenClone () const override
 
void SetMatColsRows (SCCOL nC, SCROW nR)
 
void GetMatColsRows (SCCOL &nC, SCROW &nR) const
 
SCCOL GetMatCols () const
 
SCROW GetMatRows () const
 
void Assign (const ScMatrixCellResultToken &r)
 Assign matrix result, keep matrix formula dimension. More...
 
void Assign (const formula::FormulaToken &r)
 Assign any result, keep matrix formula dimension. More...
 
void SetUpperLeftDouble (double f)
 Modify xUpperLeft if formula::svDouble, or create new formula::FormulaDoubleToken if not set yet. More...
 
void ResetResult ()
 Reset matrix and upper left, keep matrix formula dimension. More...
 
- Public Member Functions inherited from ScMatrixCellResultToken
 ScMatrixCellResultToken (ScConstMatrixRef pMat, const formula::FormulaToken *pUL)
 
 ScMatrixCellResultToken (const ScMatrixCellResultToken &)
 
virtual ~ScMatrixCellResultToken () override
 
virtual double GetDouble () const override
 
virtual const svl::SharedStringGetString () const override
 
virtual const ScMatrixGetMatrix () const override
 
virtual bool operator== (const formula::FormulaToken &rToken) const override
 
virtual FormulaTokenClone () const override
 
formula::StackVar GetUpperLeftType () const
 
const formula::FormulaConstTokenRefGetUpperLeftToken () const
 
void Assign (const ScMatrixCellResultToken &r)
 
- Public Member Functions inherited from formula::FormulaToken
 FormulaToken (StackVar eTypeP, OpCode e=ocPush)
 
 FormulaToken (const FormulaToken &r)
 
virtual ~FormulaToken ()
 
void Delete ()
 
void DeleteIfZeroRef ()
 
StackVar GetType () const
 
bool IsFunction () const
 
bool IsExternalRef () const
 
bool IsRef () const
 
sal_uInt8 GetParamCount () const
 
void IncRef () const
 
void DecRef () const
 
oslInterlockedCount GetRef () const
 
OpCode GetOpCode () const
 
bool IsInForceArray () const
 
virtual sal_uInt8 GetByte () const
 
virtual void SetByte (sal_uInt8 n)
 
virtual ParamClass GetInForceArray () const
 
virtual void SetInForceArray (ParamClass c)
 
virtual double GetDouble () const
 
virtual double & GetDoubleAsReference ()
 
virtual sal_Int16 GetDoubleType () const
 
virtual void SetDoubleType (sal_Int16 nType)
 
virtual const svl::SharedStringGetString () const
 
virtual void SetString (const svl::SharedString &rStr)
 
virtual sal_uInt16 GetIndex () const
 
virtual void SetIndex (sal_uInt16 n)
 
virtual sal_Int16 GetSheet () const
 
virtual void SetSheet (sal_Int16 n)
 
virtual sal_Unicode GetChar () const
 
virtual short * GetJump () const
 
virtual const OUString & GetExternal () const
 
virtual FormulaTokenGetFAPOrigToken () const
 
virtual FormulaError GetError () const
 
virtual void SetError (FormulaError)
 
virtual const ScSingleRefDataGetSingleRef () const
 
virtual ScSingleRefDataGetSingleRef ()
 
virtual const ScComplexRefDataGetDoubleRef () const
 
virtual ScComplexRefDataGetDoubleRef ()
 
virtual const ScSingleRefDataGetSingleRef2 () const
 
virtual ScSingleRefDataGetSingleRef2 ()
 
virtual const ScMatrixGetMatrix () const
 
virtual ScMatrixGetMatrix ()
 
virtual ScJumpMatrixGetJumpMatrix () const
 
virtual const std::vector< ScComplexRefData > * GetRefList () const
 
virtual std::vector< ScComplexRefData > * GetRefList ()
 
virtual FormulaTokenClone () const
 
virtual bool TextEqual (const formula::FormulaToken &rToken) const
 
virtual bool operator== (const FormulaToken &rToken) const
 
void NewOpCode (OpCode e, const PrivateAccess &)
 

Private Member Functions

void CloneUpperLeftIfNecessary ()
 xUpperLeft is modifiable through SetUpperLeftDouble(), so clone it whenever an svDouble token is assigned to. More...
 

Private Attributes

SCROW nRows
 
SCCOL nCols
 

Additional Inherited Members

- Protected Attributes inherited from ScMatrixCellResultToken
ScConstMatrixRef xMatrix
 
formula::FormulaConstTokenRef xUpperLeft
 

Detailed Description

Stores the matrix result at the formula cell, additionally the range the matrix formula occupies.

Definition at line 324 of file token.hxx.

Constructor & Destructor Documentation

◆ ScMatrixFormulaCellToken() [1/3]

ScMatrixFormulaCellToken::ScMatrixFormulaCellToken ( SCCOL  nC,
SCROW  nR,
const ScConstMatrixRef pMat,
const formula::FormulaToken pUL 
)

Definition at line 1020 of file token.cxx.

References CloneUpperLeftIfNecessary().

Referenced by Clone().

◆ ScMatrixFormulaCellToken() [2/3]

ScMatrixFormulaCellToken::ScMatrixFormulaCellToken ( SCCOL  nC,
SCROW  nR 
)

Definition at line 1027 of file token.cxx.

◆ ScMatrixFormulaCellToken() [3/3]

ScMatrixFormulaCellToken::ScMatrixFormulaCellToken ( const ScMatrixFormulaCellToken r)

Definition at line 1030 of file token.cxx.

References CloneUpperLeftIfNecessary().

◆ ~ScMatrixFormulaCellToken()

ScMatrixFormulaCellToken::~ScMatrixFormulaCellToken ( )
overridevirtual

Definition at line 1036 of file token.cxx.

Member Function Documentation

◆ Assign() [1/2]

void ScMatrixFormulaCellToken::Assign ( const formula::FormulaToken r)

Assign any result, keep matrix formula dimension.

If token is of type ScMatrixCellResultToken uses the appropriate Assign() call, other tokens are assigned to xUpperLeft and xMatrix will be assigned NULL.

Definition at line 1058 of file token.cxx.

References ScMatrixCellResultToken::Assign(), CloneUpperLeftIfNecessary(), formula::FormulaToken::GetMatrix(), formula::FormulaToken::GetType(), p, svMatrix, ScMatrixCellResultToken::xMatrix, and ScMatrixCellResultToken::xUpperLeft.

◆ Assign() [2/2]

void ScMatrixFormulaCellToken::Assign ( const ScMatrixCellResultToken r)

Assign matrix result, keep matrix formula dimension.

Definition at line 1051 of file token.cxx.

References ScMatrixCellResultToken::Assign(), and CloneUpperLeftIfNecessary().

Referenced by ScFormulaResult::SetToken().

◆ Clone()

virtual FormulaToken * ScMatrixFormulaCellToken::Clone ( ) const
inlineoverridevirtual

Reimplemented from ScMatrixCellResultToken.

Definition at line 336 of file token.hxx.

References ScMatrixFormulaCellToken().

◆ CloneUpperLeftIfNecessary()

void ScMatrixFormulaCellToken::CloneUpperLeftIfNecessary ( )
private

xUpperLeft is modifiable through SetUpperLeftDouble(), so clone it whenever an svDouble token is assigned to.

Definition at line 1045 of file token.cxx.

References svDouble, and ScMatrixCellResultToken::xUpperLeft.

Referenced by Assign(), and ScMatrixFormulaCellToken().

◆ GetMatCols()

SCCOL ScMatrixFormulaCellToken::GetMatCols ( ) const
inline

Definition at line 347 of file token.hxx.

References nCols.

Referenced by ScFormulaResult::SetToken().

◆ GetMatColsRows()

void ScMatrixFormulaCellToken::GetMatColsRows ( SCCOL nC,
SCROW nR 
) const
inline

Definition at line 342 of file token.hxx.

References nCols, and nRows.

Referenced by ScFormulaCell::GetMatColsRows().

◆ GetMatRows()

SCROW ScMatrixFormulaCellToken::GetMatRows ( ) const
inline

Definition at line 348 of file token.hxx.

References nRows.

Referenced by ScFormulaResult::SetToken().

◆ operator==()

bool ScMatrixFormulaCellToken::operator== ( const formula::FormulaToken rToken) const
overridevirtual

Reimplemented from ScMatrixCellResultToken.

Definition at line 1038 of file token.cxx.

References nCols, nRows, ScMatrixCellResultToken::operator==(), and p.

◆ ResetResult()

void ScMatrixFormulaCellToken::ResetResult ( )

Reset matrix and upper left, keep matrix formula dimension.

Definition at line 1106 of file token.cxx.

References ScMatrixCellResultToken::xMatrix, and ScMatrixCellResultToken::xUpperLeft.

Referenced by ScFormulaResult::SetToken().

◆ SetMatColsRows()

void ScMatrixFormulaCellToken::SetMatColsRows ( SCCOL  nC,
SCROW  nR 
)
inline

Definition at line 337 of file token.hxx.

References nCols, and nRows.

Referenced by ScFormulaCell::SetMatColsRows(), and ScFormulaResult::SetToken().

◆ SetUpperLeftDouble()

void ScMatrixFormulaCellToken::SetUpperLeftDouble ( double  f)

Modify xUpperLeft if formula::svDouble, or create new formula::FormulaDoubleToken if not set yet.

Does nothing if xUpperLeft is of different type!

Definition at line 1082 of file token.cxx.

References formula::FormulaToken::GetDoubleAsReference(), ScMatrixCellResultToken::GetUpperLeftType(), svDouble, svString, svUnknown, and ScMatrixCellResultToken::xUpperLeft.

Referenced by ScFormulaResult::SetDouble().

Member Data Documentation

◆ nCols

SCCOL ScMatrixFormulaCellToken::nCols
private

Definition at line 328 of file token.hxx.

Referenced by GetMatCols(), GetMatColsRows(), operator==(), and SetMatColsRows().

◆ nRows

SCROW ScMatrixFormulaCellToken::nRows
private

Definition at line 327 of file token.hxx.

Referenced by GetMatColsRows(), GetMatRows(), operator==(), and SetMatColsRows().


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