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 (const ScConstMatrixRef &pMat, const formula::FormulaToken *pUL)
 
 ScMatrixCellResultToken (const ScMatrixCellResultToken &)
 
virtual ~ScMatrixCellResultToken () override
 
virtual double GetDouble () const override
 
virtual svl::SharedString GetString () const override
 
virtual const ScMatrixGetMatrix () 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 & GetDoubleAsReference ()
 
virtual sal_Int16 GetDoubleType () const
 
virtual void SetDoubleType (sal_Int16 nType)
 
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 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 ScJumpMatrixGetJumpMatrix () const
 
virtual const std::vector< ScComplexRefData > * GetRefList () const
 
virtual std::vector< ScComplexRefData > * GetRefList ()
 
virtual bool TextEqual (const formula::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 325 of file token.hxx.

Constructor & Destructor Documentation

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

Definition at line 1019 of file token.cxx.

References CloneUpperLeftIfNecessary().

Referenced by Clone().

ScMatrixFormulaCellToken::ScMatrixFormulaCellToken ( SCCOL  nC,
SCROW  nR 
)

Definition at line 1026 of file token.cxx.

ScMatrixFormulaCellToken::ScMatrixFormulaCellToken ( const ScMatrixFormulaCellToken r)

Definition at line 1029 of file token.cxx.

References CloneUpperLeftIfNecessary().

ScMatrixFormulaCellToken::~ScMatrixFormulaCellToken ( )
overridevirtual

Definition at line 1035 of file token.cxx.

Member Function Documentation

void ScMatrixFormulaCellToken::Assign ( const ScMatrixCellResultToken r)

Assign matrix result, keep matrix formula dimension.

Definition at line 1050 of file token.cxx.

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

Referenced by ScFormulaResult::SetToken().

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 1057 of file token.cxx.

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

virtual FormulaToken* ScMatrixFormulaCellToken::Clone ( ) const
inlineoverridevirtual

Reimplemented from ScMatrixCellResultToken.

Definition at line 337 of file token.hxx.

References ScMatrixFormulaCellToken().

void ScMatrixFormulaCellToken::CloneUpperLeftIfNecessary ( )
private

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

Definition at line 1044 of file token.cxx.

References svDouble, and ScMatrixCellResultToken::xUpperLeft.

Referenced by Assign(), and ScMatrixFormulaCellToken().

SCCOL ScMatrixFormulaCellToken::GetMatCols ( ) const
inline

Definition at line 348 of file token.hxx.

References nCols.

Referenced by ScFormulaResult::SetToken().

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

Definition at line 343 of file token.hxx.

References nCols, and nRows.

Referenced by ScFormulaCell::GetMatColsRows().

SCROW ScMatrixFormulaCellToken::GetMatRows ( ) const
inline

Definition at line 349 of file token.hxx.

References nRows.

Referenced by ScFormulaResult::SetToken().

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

Reimplemented from ScMatrixCellResultToken.

Definition at line 1037 of file token.cxx.

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

void ScMatrixFormulaCellToken::ResetResult ( )

Reset matrix and upper left, keep matrix formula dimension.

Definition at line 1105 of file token.cxx.

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

Referenced by ScFormulaResult::SetToken().

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

Definition at line 338 of file token.hxx.

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

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 1081 of file token.cxx.

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

Referenced by ScFormulaResult::SetDouble().

Member Data Documentation

SCCOL ScMatrixFormulaCellToken::nCols
private

Definition at line 329 of file token.hxx.

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

SCROW ScMatrixFormulaCellToken::nRows
private

Definition at line 328 of file token.hxx.

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


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