LibreOffice Module sc (master) 1
|
Stores the matrix result at the formula cell, additionally the range the matrix formula occupies. More...
#include <token.hxx>
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 FormulaToken * | Clone () 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::SharedString & | GetString () const override |
virtual const ScMatrix * | GetMatrix () const override |
virtual bool | operator== (const formula::FormulaToken &rToken) const override |
virtual FormulaToken * | Clone () const override |
formula::StackVar | GetUpperLeftType () const |
const formula::FormulaConstTokenRef & | GetUpperLeftToken () 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::SharedString & | GetString () 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 FormulaToken * | GetFAPOrigToken () const |
virtual FormulaError | GetError () const |
virtual void | SetError (FormulaError) |
virtual const ScSingleRefData * | GetSingleRef () const |
virtual ScSingleRefData * | GetSingleRef () |
virtual const ScComplexRefData * | GetDoubleRef () const |
virtual ScComplexRefData * | GetDoubleRef () |
virtual const ScSingleRefData * | GetSingleRef2 () const |
virtual ScSingleRefData * | GetSingleRef2 () |
virtual const ScMatrix * | GetMatrix () const |
virtual ScMatrix * | GetMatrix () |
virtual ScJumpMatrix * | GetJumpMatrix () const |
virtual const std::vector< ScComplexRefData > * | GetRefList () const |
virtual std::vector< ScComplexRefData > * | GetRefList () |
virtual FormulaToken * | Clone () 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 |
Stores the matrix result at the formula cell, additionally the range the matrix formula occupies.
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::ScMatrixFormulaCellToken | ( | const ScMatrixFormulaCellToken & | r | ) |
Definition at line 1030 of file token.cxx.
References CloneUpperLeftIfNecessary().
|
overridevirtual |
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.
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().
|
inlineoverridevirtual |
Reimplemented from ScMatrixCellResultToken.
Definition at line 336 of file token.hxx.
References ScMatrixFormulaCellToken().
|
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().
|
inline |
Definition at line 347 of file token.hxx.
References nCols.
Referenced by ScFormulaResult::SetToken().
Definition at line 342 of file token.hxx.
Referenced by ScFormulaCell::GetMatColsRows().
|
inline |
Definition at line 348 of file token.hxx.
References nRows.
Referenced by ScFormulaResult::SetToken().
|
overridevirtual |
Reimplemented from ScMatrixCellResultToken.
Definition at line 1038 of file token.cxx.
References nCols, nRows, ScMatrixCellResultToken::operator==(), and p.
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().
Definition at line 337 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 1082 of file token.cxx.
References formula::FormulaToken::GetDoubleAsReference(), ScMatrixCellResultToken::GetUpperLeftType(), svDouble, svString, svUnknown, and ScMatrixCellResultToken::xUpperLeft.
Referenced by ScFormulaResult::SetDouble().
|
private |
Definition at line 328 of file token.hxx.
Referenced by GetMatCols(), GetMatColsRows(), operator==(), and SetMatColsRows().
|
private |
Definition at line 327 of file token.hxx.
Referenced by GetMatColsRows(), GetMatRows(), operator==(), and SetMatColsRows().