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

#include <formulacell.hxx>

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

Public Types

enum  ScInterpretTailParameter {
  SCITP_NORMAL,
  SCITP_FROM_ITERATION,
  SCITP_CLOSE_ITERATION_CIRCLE
}
 
enum  CompareState {
  NotEqual = 0,
  EqualInvariant,
  EqualRelativeRef
}
 
enum  RelNameRef {
  RelNameRef::NONE,
  RelNameRef::SINGLE,
  RelNameRef::DOUBLE
}
 

Public Member Functions

void InterpretTail (ScInterpreterContext &, ScInterpretTailParameter)
 
void HandleStuffAfterParallelCalculation (ScInterpreter *pInterpreter)
 
virtual ~ScFormulaCell () override
 
ScFormulaCellClone () const
 
ScFormulaCellClone (const ScAddress &rPos) const
 
 ScFormulaCell (ScDocument &rDoc, const ScAddress &rPos)
 
 ScFormulaCell (ScDocument &rDoc, const ScAddress &rPos, std::unique_ptr< ScTokenArray > pArray, const formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_DEFAULT, ScMatrixMode cMatInd=ScMatrixMode::NONE)
 Transfer the ownership of the passed token array instance to the formula cell being constructed. More...
 
 ScFormulaCell (ScDocument &rDoc, const ScAddress &rPos, const ScTokenArray &rArray, const formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_DEFAULT, ScMatrixMode cMatInd=ScMatrixMode::NONE)
 
 ScFormulaCell (ScDocument &rDoc, const ScAddress &rPos, const ScFormulaCellGroupRef &xGroup, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT, ScMatrixMode=ScMatrixMode::NONE)
 
 ScFormulaCell (ScDocument &rDoc, const ScAddress &rPos, const OUString &rFormula, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT, ScMatrixMode cMatInd=ScMatrixMode::NONE)
 With formula string and grammar to compile with. More...
 
 ScFormulaCell (const ScFormulaCell &rCell, ScDocument &rDoc, const ScAddress &rPos, ScCloneFlags nCloneFlags=ScCloneFlags::Default)
 
void SetFreeFlying (bool b)
 
size_t GetHash () const
 
void GetFormula (OUString &rFormula, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT, const ScInterpreterContext *pContext=nullptr) const
 
void GetFormula (OUStringBuffer &rBuffer, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT, const ScInterpreterContext *pContext=nullptr) const
 
OUString GetFormula (sc::CompileFormulaContext &rCxt, const ScInterpreterContext *pContext=nullptr) const
 
void SetDirty (bool bDirtyFlag=true)
 
void SetDirtyVar ()
 
void SetDirtyAfterLoad ()
 
void ResetTableOpDirtyVar ()
 
void SetTableOpDirty ()
 
bool IsDirtyOrInTableOpDirty () const
 
bool GetDirty () const
 
void ResetDirty ()
 
bool NeedsListening () const
 
void SetNeedsListening (bool bVar)
 
void SetNeedsDirty (bool bVar)
 
void SetNeedNumberFormat (bool bVal)
 
bool NeedsNumberFormat () const
 
SvNumFormatType GetFormatType () const
 
void Compile (const OUString &rFormula, bool bNoListening, const formula::FormulaGrammar::Grammar)
 
void Compile (sc::CompileFormulaContext &rCxt, const OUString &rFormula, bool bNoListening=false)
 
void CompileTokenArray (bool bNoListening=false)
 
void CompileTokenArray (sc::CompileFormulaContext &rCxt, bool bNoListening=false)
 
void CompileXML (sc::CompileFormulaContext &rCxt, ScProgress &rProgress)
 
void CalcAfterLoad (sc::CompileFormulaContext &rCxt, bool bStartListening)
 
bool MarkUsedExternalReferences ()
 
bool Interpret (SCROW nStartOffset=-1, SCROW nEndOffset=-1)
 
bool IsIterCell () const
 
sal_uInt16 GetSeenInIteration () const
 
bool HasOneReference (ScRange &r) const
 
bool HasRefListExpressibleAsOneReference (ScRange &rRange) const
 
RelNameRef HasRelNameReference () const
 
bool UpdateReference (const sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, const ScAddress *pUndoCellPos=nullptr)
 
bool UpdatePosOnShift (const sc::RefUpdateContext &rCxt)
 Shift the position of formula cell as part of reference update. More...
 
bool UpdateReferenceOnShift (const sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc, const ScAddress *pUndoCellPos)
 Update reference in response to cell insertion or deletion. More...
 
bool UpdateReferenceOnMove (const sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc, const ScAddress *pUndoCellPos)
 Update reference in response to cell move. More...
 
void TransposeReference ()
 
void UpdateTranspose (const ScRange &rSource, const ScAddress &rDest, ScDocument *pUndoDoc)
 
void UpdateGrow (const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
 
void UpdateInsertTab (const sc::RefUpdateInsertTabContext &rCxt)
 
void UpdateInsertTabAbs (SCTAB nTable)
 
void UpdateDeleteTab (const sc::RefUpdateDeleteTabContext &rCxt)
 
void UpdateMoveTab (const sc::RefUpdateMoveTabContext &rCxt, SCTAB nTabNo)
 
bool TestTabRefAbs (SCTAB nTable)
 
void UpdateCompile (bool bForceIfNameInUse)
 
void FindRangeNamesInUse (sc::UpdatedRangeNames &rIndexes) const
 
bool IsSubTotal () const
 
bool IsChanged () const
 
void SetChanged (bool b)
 
bool IsEmpty ()
 
bool IsEmptyDisplayedAsString ()
 
bool IsValue ()
 
bool IsValueNoError ()
 
bool IsValueNoError () const
 
double GetValue ()
 
const svl::SharedStringGetString ()
 
double GetRawValue () const
 Get a numeric value without potentially triggering re-calculation. More...
 
const svl::SharedStringGetRawString () const
 Get a string value without potentially triggering re-calculation. More...
 
const ScMatrixGetMatrix ()
 
bool GetMatrixOrigin (const ScDocument &rDoc, ScAddress &rPos) const
 
void GetResultDimensions (SCSIZE &rCols, SCSIZE &rRows)
 
sc::MatrixEdge GetMatrixEdge (const ScDocument &rDoc, ScAddress &rOrgPos) const
 
FormulaError GetErrCode ()
 
FormulaError GetRawError () const
 
bool GetErrorOrValue (FormulaError &rErr, double &rVal)
 
sc::FormulaResultValue GetResult ()
 
sc::FormulaResultValue GetResult () const
 
ScMatrixMode GetMatrixFlag () const
 
ScTokenArrayGetCode ()
 
const ScTokenArrayGetCode () const
 
void SetCode (std::unique_ptr< ScTokenArray > pNew)
 
bool IsRunning () const
 
void SetRunning (bool bVal)
 
void CompileDBFormula (sc::CompileFormulaContext &rCxt)
 
void CompileColRowNameFormula (sc::CompileFormulaContext &rCxt)
 
ScFormulaCellGetPrevious () const
 
ScFormulaCellGetNext () const
 
void SetPrevious (ScFormulaCell *pF)
 
void SetNext (ScFormulaCell *pF)
 
ScFormulaCellGetPreviousTrack () const
 
ScFormulaCellGetNextTrack () const
 
void SetPreviousTrack (ScFormulaCell *pF)
 
void SetNextTrack (ScFormulaCell *pF)
 
virtual void Notify (const SfxHint &rHint) override
 
virtual void Query (SvtListener::QueryBase &rQuery) const override
 
void SetCompile (bool bVal)
 
ScDocumentGetDocument () const
 
void SetMatColsRows (SCCOL nCols, SCROW nRows)
 
void GetMatColsRows (SCCOL &nCols, SCROW &nRows) const
 
void SetInChangeTrack (bool bVal)
 
bool IsInChangeTrack () const
 
void AddRecalcMode (ScRecalcMode)
 
void SetHybridDouble (double n)
 For import only: set a double result. More...
 
void SetHybridString (const svl::SharedString &r)
 For import only: set a string result. More...
 
void SetHybridEmptyDisplayedAsString ()
 For import only: set an empty cell result to be displayed as empty string. More...
 
void SetHybridFormula (const OUString &r, const formula::FormulaGrammar::Grammar eGrammar)
 For import only: set a temporary formula string to be compiled later. More...
 
const OUString & GetHybridFormula () const
 
void SetResultMatrix (SCCOL nCols, SCROW nRows, const ScConstMatrixRef &pMat, const formula::FormulaToken *pUL)
 
void SetResultDouble (double n)
 For import only: set a double result. More...
 
void SetResultToken (const formula::FormulaToken *pToken)
 
const svl::SharedStringGetResultString () const
 
bool HasHybridStringResult () const
 
void SetErrCode (FormulaError n)
 
void SetResultError (FormulaError n)
 
bool IsHyperLinkCell () const
 
std::unique_ptr< EditTextObjectCreateURLObject ()
 
void GetURLResult (OUString &rURL, OUString &rCellText)
 
bool IsMultilineResult ()
 Determines whether or not the result string contains more than one paragraph. More...
 
bool NeedsInterpret () const
 
void MaybeInterpret ()
 
ScFormulaCellGroupRef CreateCellGroup (SCROW nLen, bool bInvariant)
 Turn a non-grouped cell into the top of a grouped cell. More...
 
const ScFormulaCellGroupRefGetCellGroup () const
 
void SetCellGroup (const ScFormulaCellGroupRef &xRef)
 
CompareState CompareByTokenArray (const ScFormulaCell &rOther) const
 
bool InterpretFormulaGroup (SCROW nStartOffset=-1, SCROW nEndOffset=-1)
 
void StartListeningTo (ScDocument &rDoc)
 
void StartListeningTo (sc::StartListeningContext &rCxt)
 
void EndListeningTo (ScDocument &rDoc, ScTokenArray *pArr=nullptr, ScAddress aPos=ScAddress())
 
void EndListeningTo (sc::EndListeningContext &rCxt)
 
bool IsShared () const
 
bool IsSharedTop () const
 
SCROW GetSharedTopRow () const
 
SCROW GetSharedLength () const
 
sal_Int32 GetWeight () const
 
ScTokenArrayGetSharedCode ()
 
const ScTokenArrayGetSharedCode () const
 
void SyncSharedCode ()
 
bool IsPostponedDirty () const
 
void SetIsExtRef ()
 
bool GetSeenInPath () const
 
void SetSeenInPath (bool bSet)
 
void Dump () const
 
- Public Member Functions inherited from SvtListener
 SvtListener ()
 
 SvtListener (const SvtListener &r)
 
virtual ~SvtListener () COVERITY_NOEXCEPT_FALSE
 
bool StartListening (SvtBroadcaster &rBroadcaster)
 
void EndListening (SvtBroadcaster &rBroadcaster)
 
void EndListeningAll ()
 
void CopyAllBroadcasters (const SvtListener &r)
 
bool HasBroadcaster () const
 
virtual void Query (QueryBase &rQuery) const
 

Public Attributes

ScAddress aPos
 

Private Member Functions

bool UpdateReferenceOnCopy (const sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc, const ScAddress *pUndoCellPos)
 Update reference in response to cell copy-n-paste. More...
 
 ScFormulaCell (const ScFormulaCell &)=delete
 
bool CheckComputeDependencies (sc::FormulaLogger::GroupScope &rScope, bool fromFirstRow, SCROW nStartOffset, SCROW nEndOffset, bool bCalcDependencyOnly=false)
 
bool InterpretFormulaGroupThreading (sc::FormulaLogger::GroupScope &aScope, bool &bDependencyComputed, bool &bDependencyCheckFailed, SCROW nStartOffset, SCROW nEndOffset)
 
bool InterpretFormulaGroupOpenCL (sc::FormulaLogger::GroupScope &aScope, bool &bDependencyComputed, bool &bDependencyCheckFailed)
 
bool InterpretInvariantFormulaGroup ()
 

Private Attributes

ScFormulaCellGroupRef mxGroup
 
bool bDirty: 1
 
bool bTableOpDirty: 1
 
bool bChanged: 1
 
bool bRunning: 1
 
bool bCompile: 1
 
bool bSubTotal: 1
 
bool bIsIterCell: 1
 
bool bInChangeTrack: 1
 
bool bNeedListening: 1
 
bool mbNeedsNumberFormat: 1
 
bool mbAllowNumberFormatChange: 1
 
bool mbPostponedDirty: 1
 
bool mbIsExtRef: 1
 
bool mbSeenInPath: 1
 
bool mbFreeFlying: 1
 
ScMatrixMode cMatrixFlag: 8
 
sal_uInt16 nSeenInIteration: 16
 
SvNumFormatType nFormatType: 16
 
ScFormulaResult aResult
 
formula::FormulaGrammar::Grammar eTempGrammar
 
ScTokenArraypCode
 
ScDocumentrDocument
 
ScFormulaCellpPrevious
 
ScFormulaCellpNext
 
ScFormulaCellpPreviousTrack
 
ScFormulaCellpNextTrack
 

Detailed Description

Definition at line 121 of file formulacell.hxx.

Member Enumeration Documentation

Enumerator
NotEqual 
EqualInvariant 
EqualRelativeRef 

Definition at line 187 of file formulacell.hxx.

Enumerator
NONE 

no relative reference from named expression

SINGLE 

only single cell relative reference

DOUBLE 

at least one range relative reference from named expression

Definition at line 285 of file formulacell.hxx.

Enumerator
SCITP_NORMAL 
SCITP_FROM_ITERATION 
SCITP_CLOSE_ITERATION_CIRCLE 

Definition at line 177 of file formulacell.hxx.

Constructor & Destructor Documentation

ScFormulaCell::ScFormulaCell ( const ScFormulaCell )
privatedelete

Referenced by Clone(), and UpdateTranspose().

ScFormulaCell::~ScFormulaCell ( )
overridevirtual
ScFormulaCell::ScFormulaCell ( ScDocument rDoc,
const ScAddress rPos 
)

Definition at line 587 of file formulacell.cxx.

References NUMBER.

ScFormulaCell::ScFormulaCell ( ScDocument rDoc,
const ScAddress rPos,
std::unique_ptr< ScTokenArray pArray,
const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT,
ScMatrixMode  cMatInd = ScMatrixMode::NONE 
)
ScFormulaCell::ScFormulaCell ( ScDocument rDoc,
const ScAddress rPos,
const ScTokenArray rArray,
const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT,
ScMatrixMode  cMatInd = ScMatrixMode::NONE 
)
ScFormulaCell::ScFormulaCell ( ScDocument rDoc,
const ScAddress rPos,
const ScFormulaCellGroupRef xGroup,
const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT,
ScMatrixMode  cInd = ScMatrixMode::NONE 
)

Definition at line 756 of file formulacell.cxx.

References ScDocument::AddSubTotalCell(), bSubTotal, and rDocument.

ScFormulaCell::ScFormulaCell ( ScDocument rDoc,
const ScAddress rPos,
const OUString &  rFormula,
const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT,
ScMatrixMode  cMatInd = ScMatrixMode::NONE 
)

With formula string and grammar to compile with.

formula::FormulaGrammar::GRAM_DEFAULT effectively isformula::FormulaGrammar::GRAM_NATIVE_UI that also includes formula::FormulaGrammar::CONV_UNSPECIFIED, therefore uses the address convention associated with rPos::nTab by default.

Definition at line 617 of file formulacell.cxx.

References Compile(), NUMBER, and pCode.

ScFormulaCell::ScFormulaCell ( const ScFormulaCell rCell,
ScDocument rDoc,
const ScAddress rPos,
ScCloneFlags  nCloneFlags = ScCloneFlags::Default 
)

Member Function Documentation

void ScFormulaCell::AddRecalcMode ( ScRecalcMode  nBits)
void ScFormulaCell::CalcAfterLoad ( sc::CompileFormulaContext rCxt,
bool  bStartListening 
)
bool ScFormulaCell::CheckComputeDependencies ( sc::FormulaLogger::GroupScope rScope,
bool  fromFirstRow,
SCROW  nStartOffset,
SCROW  nEndOffset,
bool  bCalcDependencyOnly = false 
)
private
ScFormulaCell * ScFormulaCell::Clone ( ) const
ScFormulaCell * ScFormulaCell::Clone ( const ScAddress rPos) const

Definition at line 944 of file formulacell.cxx.

References Default, rDocument, and ScFormulaCell().

ScFormulaCell::CompareState ScFormulaCell::CompareByTokenArray ( const ScFormulaCell rOther) const
void ScFormulaCell::Compile ( const OUString &  rFormula,
bool  bNoListening,
const formula::FormulaGrammar::Grammar  eGrammar 
)
void ScFormulaCell::Compile ( sc::CompileFormulaContext rCxt,
const OUString &  rFormula,
bool  bNoListening = false 
)
void ScFormulaCell::CompileColRowNameFormula ( sc::CompileFormulaContext rCxt)
void ScFormulaCell::CompileDBFormula ( sc::CompileFormulaContext rCxt)
void ScFormulaCell::CompileTokenArray ( bool  bNoListening = false)
void ScFormulaCell::CompileTokenArray ( sc::CompileFormulaContext rCxt,
bool  bNoListening = false 
)
void ScFormulaCell::CompileXML ( sc::CompileFormulaContext rCxt,
ScProgress rProgress 
)
ScFormulaCellGroupRef ScFormulaCell::CreateCellGroup ( SCROW  nLen,
bool  bInvariant 
)

Turn a non-grouped cell into the top of a grouped cell.

Definition at line 4007 of file formulacell.cxx.

References mxGroup, pCode, and SAL_INFO.

Referenced by CompileXML(), and sc::SharedFormulaUtil::joinFormulaCells().

std::unique_ptr< EditTextObject > ScFormulaCell::CreateURLObject ( )
void ScFormulaCell::Dump ( ) const
void ScFormulaCell::EndListeningTo ( ScDocument rDoc,
ScTokenArray pArr = nullptr,
ScAddress  aPos = ScAddress() 
)
void ScFormulaCell::EndListeningTo ( sc::EndListeningContext rCxt)
void ScFormulaCell::FindRangeNamesInUse ( sc::UpdatedRangeNames rIndexes) const

Definition at line 3949 of file formulacell.cxx.

References lcl_FindRangeNamesInUse(), pCode, and rDocument.

const ScFormulaCellGroupRef& ScFormulaCell::GetCellGroup ( ) const
inline
ScTokenArray* ScFormulaCell::GetCode ( )
inline
const ScTokenArray* ScFormulaCell::GetCode ( ) const
inline

Definition at line 360 of file formulacell.hxx.

bool ScFormulaCell::GetDirty ( ) const
inline
ScDocument& ScFormulaCell::GetDocument ( ) const
inline
FormulaError ScFormulaCell::GetErrCode ( )
bool ScFormulaCell::GetErrorOrValue ( FormulaError rErr,
double &  rVal 
)
SvNumFormatType ScFormulaCell::GetFormatType ( ) const
inline
void ScFormulaCell::GetFormula ( OUString &  rFormula,
const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT,
const ScInterpreterContext pContext = nullptr 
) const
void ScFormulaCell::GetFormula ( OUStringBuffer &  rBuffer,
const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT,
const ScInterpreterContext pContext = nullptr 
) const
OUString ScFormulaCell::GetFormula ( sc::CompileFormulaContext rCxt,
const ScInterpreterContext pContext = nullptr 
) const
size_t ScFormulaCell::GetHash ( ) const

Definition at line 949 of file formulacell.cxx.

References ScTokenArray::GetHash(), and pCode.

Referenced by CompareByTokenArray().

const OUString & ScFormulaCell::GetHybridFormula ( ) const

Definition at line 2687 of file formulacell.cxx.

References aResult, and ScFormulaResult::GetHybridFormula().

void ScFormulaCell::GetMatColsRows ( SCCOL nCols,
SCROW nRows 
) const
const ScMatrix * ScFormulaCell::GetMatrix ( )
sc::MatrixEdge ScFormulaCell::GetMatrixEdge ( const ScDocument rDoc,
ScAddress rOrgPos 
) const
ScMatrixMode ScFormulaCell::GetMatrixFlag ( ) const
inline
bool ScFormulaCell::GetMatrixOrigin ( const ScDocument rDoc,
ScAddress rPos 
) const
ScFormulaCell* ScFormulaCell::GetNext ( ) const
inline
ScFormulaCell* ScFormulaCell::GetNextTrack ( ) const
inline
ScFormulaCell* ScFormulaCell::GetPrevious ( ) const
inline
ScFormulaCell* ScFormulaCell::GetPreviousTrack ( ) const
inline
FormulaError ScFormulaCell::GetRawError ( ) const
const svl::SharedString & ScFormulaCell::GetRawString ( ) const

Get a string value without potentially triggering re-calculation.

Definition at line 2816 of file formulacell.cxx.

References aResult, formula::FormulaTokenArray::GetCodeError(), svl::SharedString::getEmptyString(), ScFormulaResult::GetResultError(), ScFormulaResult::GetString(), and pCode.

Referenced by GetString().

double ScFormulaCell::GetRawValue ( ) const

Get a numeric value without potentially triggering re-calculation.

Definition at line 2808 of file formulacell.cxx.

References aResult, formula::FormulaTokenArray::GetCodeError(), ScFormulaResult::GetDouble(), ScFormulaResult::GetResultError(), and pCode.

Referenced by ScRefCellValue::getRawValue(), and GetValue().

sc::FormulaResultValue ScFormulaCell::GetResult ( )
sc::FormulaResultValue ScFormulaCell::GetResult ( ) const
void ScFormulaCell::GetResultDimensions ( SCSIZE rCols,
SCSIZE rRows 
)
const svl::SharedString & ScFormulaCell::GetResultString ( ) const

Definition at line 2623 of file formulacell.cxx.

References aResult, and ScFormulaResult::GetString().

Referenced by ScXMLExport::WriteMultiLineFormulaResult().

sal_uInt16 ScFormulaCell::GetSeenInIteration ( ) const
inline

Definition at line 272 of file formulacell.hxx.

Referenced by Interpret().

bool ScFormulaCell::GetSeenInPath ( ) const
inline
ScTokenArray * ScFormulaCell::GetSharedCode ( )

Definition at line 5511 of file formulacell.cxx.

Referenced by XclExpShrfmlaBuffer::CreateOrExtendShrfmla(), and GetWeight().

const ScTokenArray * ScFormulaCell::GetSharedCode ( ) const

Definition at line 5516 of file formulacell.cxx.

SCROW ScFormulaCell::GetSharedLength ( ) const
SCROW ScFormulaCell::GetSharedTopRow ( ) const
const svl::SharedString & ScFormulaCell::GetString ( )
void ScFormulaCell::GetURLResult ( OUString &  rURL,
OUString &  rCellText 
)
double ScFormulaCell::GetValue ( )
sal_Int32 ScFormulaCell::GetWeight ( ) const
void ScFormulaCell::HandleStuffAfterParallelCalculation ( ScInterpreter pInterpreter)
bool ScFormulaCell::HasHybridStringResult ( ) const
bool ScFormulaCell::HasOneReference ( ScRange r) const
bool ScFormulaCell::HasRefListExpressibleAsOneReference ( ScRange rRange) const
ScFormulaCell::RelNameRef ScFormulaCell::HasRelNameReference ( ) const
bool ScFormulaCell::Interpret ( SCROW  nStartOffset = -1,
SCROW  nEndOffset = -1 
)

Definition at line 1507 of file formulacell.cxx.

References ScRecursionHelper::AbortDependencyComputation(), ScRecursionHelper::AnyCycleMemberInDependencyEvalMode(), ScRecursionHelper::AnyParentFGInCycle(), ScRecursionHelper::AreGroupsIndependent(), aResult, bChanged, bDirty, bIsIterCell, bRunning, ScRecursionHelper::CheckFGIndependence(), ScRecursionHelper::Clear(), ScDocument::DecInterpretLevel(), ScRecursionHelper::EndIteration(), ForceCalculationCore, ForceCalculationNone, ScRecursionHelper::GetConvergingReference(), ScRecursionHelper::GetDepComputeLevel(), ScDocument::GetDocOptions(), ScFormulaResult::GetDouble(), ScCalcConfig::getForceCalculationType(), ScDocument::GetFormatTable(), ScRecursionHelper::GetIteration(), ScRecursionHelper::GetIterationEnd(), ScRecursionHelper::GetIterationStart(), ScDocOptions::GetIterCount(), ScRecursionHelper::GetLastIterationStart(), ScRecursionHelper::GetList(), ScRecursionHelper::GetRecursionCount(), ScDocument::GetRecursionHelper(), ScRecursionHelper::GetRecursionInIterationStack(), ScFormulaResult::GetResultError(), GetSeenInIteration(), ScFormulaResult::GetString(), ScDocument::IncInterpretLevel(), ScRecursionHelper::IncIteration(), ScRecursionHelper::Insert(), InterpretFormulaGroup(), InterpretTail(), ScRecursionHelper::IsAbortingDependencyComputation(), IsDirtyOrInTableOpDirty(), ScRecursionHelper::IsDoingIteration(), ScRecursionHelper::IsDoingRecursion(), ScDocument::IsInDdeLinkUpdate(), ScRecursionHelper::IsInIterationReturn(), ScRecursionHelper::IsInRecursionReturn(), ScRecursionHelper::IsInReturn(), ScDocOptions::IsIter(), IsIterCell(), ScFormulaResult::IsValue(), mbFreeFlying, mbSeenInPath, mxGroup, nSeenInIteration, ScFormulaRecursionEntry::pCell, rDocument, ResetDirty(), ScRecursionHelper::ResumeIteration(), SCITP_CLOSE_ITERATION_CIRCLE, SCITP_FROM_ITERATION, SCITP_NORMAL, ScRecursionHelper::SetDoingRecursion(), ScRecursionHelper::SetInIterationReturn(), ScRecursionHelper::SetInRecursionReturn(), ScFormulaResult::SetResultError(), and ScRecursionHelper::StartIteration().

Referenced by ScDocument::CalcFormulaTree(), ScColumn::CopyCellToDocument(), ScColumn::CopyStaticToDocument(), ScDetectiveFunc::FindPredLevel(), ScDetectiveFunc::FindSuccLevel(), GetMatrix(), ScValidationData::GetSelectionFromFormula(), ScDetectiveFunc::InsertErrorLevel(), ScDetectiveFunc::InsertPredLevel(), ScDetectiveFunc::InsertSuccLevel(), lcl_InterpretSpan(), ScDocFunc::SetFormulaCell(), and ScDocument::Solver().

bool ScFormulaCell::InterpretFormulaGroup ( SCROW  nStartOffset = -1,
SCROW  nEndOffset = -1 
)
bool ScFormulaCell::InterpretFormulaGroupOpenCL ( sc::FormulaLogger::GroupScope aScope,
bool &  bDependencyComputed,
bool &  bDependencyCheckFailed 
)
private
bool ScFormulaCell::InterpretFormulaGroupThreading ( sc::FormulaLogger::GroupScope aScope,
bool &  bDependencyComputed,
bool &  bDependencyCheckFailed,
SCROW  nStartOffset,
SCROW  nEndOffset 
)
private
bool ScFormulaCell::InterpretInvariantFormulaGroup ( )
private
void ScFormulaCell::InterpretTail ( ScInterpreterContext rContext,
ScInterpretTailParameter  eTailParam 
)

Definition at line 1895 of file formulacell.cxx.

References aResult, ScFormulaResult::Assign(), ATTR_VALIDDATA(), BCA_LISTEN_ALWAYS, bChanged, bIsIterCell, bRunning, cMatrixFlag, ScAddress::Col(), CompileTokenArray(), data, ScValidationData::DoCalcError(), ScProgress::Enabled(), ScDocument::EndListeningArea(), EndListeningTo(), Formula, ScDocument::GetAttr(), ScFormulaResult::GetCellResultToken(), ScFormulaResult::GetCellResultType(), formula::FormulaTokenArray::GetCodeError(), formula::FormulaTokenArray::GetCodeLen(), ScDocument::GetDocOptions(), ScFormulaResult::GetDouble(), GetDoubleErrorValue(), ScInterpreter::GetError(), ScInterpreterContext::GetFormatTable(), ScDocument::GetFormulaCodeInTree(), ScFormulaResult::GetHybridFormula(), ScProgress::GetInterpretProgress(), ScRecursionHelper::GetIteration(), ScDocOptions::GetIterCount(), ScDocOptions::GetIterEps(), formula::FormulaTokenArray::GetLen(), ScFormulaResult::GetMatrix(), ScDocument::GetNumberFormat(), ScInterpreter::GetNumResult(), ScDocument::GetRecursionHelper(), ScFormulaResult::GetResultError(), ScInterpreter::GetResultToken(), ScInterpreter::GetResultType(), ScInterpreter::GetRetFormatIndex(), ScInterpreter::GetRetFormatType(), ScGlobal::GetStandardFormat(), ScFormulaResult::GetString(), ScInterpreter::GetStringResult(), SvNumberFormatter::GetType(), ScFormulaResult::GetType(), ScDocument::GetValidationEntry(), GetValue(), ScInterpreter::GetVolatileType(), ScInterpreter::Init(), ScInterpreter::Interpret(), ScRecursionHelper::IsAbortingDependencyComputation(), ScDocOptions::IsCalcAsShown(), SvNumberFormatter::IsCompatible(), ScValidationData::IsDataValid(), IsDirtyOrInTableOpDirty(), formula::FormulaTokenArray::IsHyperLink(), ScRecursionHelper::IsInReturn(), formula::FormulaTokenArray::IsRecalcModeAlways(), formula::FormulaTokenArray::IsRecalcModeForced(), ScDocument::IsStreamValid(), ScDocument::IsThreadedGroupCalcInProgress(), ScFormulaResult::IsValue(), ScInterpreterContext::maDelayedSetNumberFormat, mbAllowNumberFormatChange, mbNeedsNumberFormat, MIN_NO_CODES_PER_PROGRESS_UPDATE, nFormatType, NONE, ScInterpreter::NOT_VOLATILE, nSeenInIteration, NUMBERFORMAT_ENTRY_NOT_FOUND, pCode, pData, ScInterpreterContext::pInterpreter, ScDocument::PutInFormulaTree(), rDocument, Reference, ScDocument::RemoveFromFormulaTree(), ResetDirty(), ScDocument::RoundValueAsShown(), ScAddress::Row(), SCITP_CLOSE_ITERATION_CIRCLE, SCITP_FROM_ITERATION, SCITP_NORMAL, formula::FormulaTokenArray::SetCodeError(), ScFormulaResult::SetDouble(), formula::FormulaTokenArray::SetExclusiveRecalcModeAlways(), formula::FormulaTokenArray::SetExclusiveRecalcModeNormal(), formula::FormulaTokenArray::SetHyperLink(), ScDocument::SetNumberFormat(), ScFormulaResult::SetResultError(), ScProgress::SetStateCountDownOnPercent(), ScDocument::SetStreamValid(), ScFormulaResult::SetToken(), StartListeningTo(), SV_COUNTRY_LANGUAGE_OFFSET, svDouble, svError, svHybridCell, svString, svUnknown, formula::svUnknown, ScAddress::Tab(), ScInterpreter::VOLATILE, and ScInterpreter::VOLATILE_MACRO.

Referenced by ScColumn::CalculateInThread(), and Interpret().

bool ScFormulaCell::IsChanged ( ) const
inline

Definition at line 329 of file formulacell.hxx.

Referenced by ScOutputData::FindChanged().

bool ScFormulaCell::IsDirtyOrInTableOpDirty ( ) const
inline

Definition at line 246 of file formulacell.hxx.

References ScDocument::IsInInterpreterTableOp().

Referenced by GetMatrix(), Interpret(), and InterpretTail().

bool ScFormulaCell::IsEmpty ( )
bool ScFormulaCell::IsEmptyDisplayedAsString ( )
bool ScFormulaCell::IsHyperLinkCell ( ) const
bool ScFormulaCell::IsInChangeTrack ( ) const
inline

Definition at line 387 of file formulacell.hxx.

Referenced by EndListeningTo(), SetDirty(), SetTableOpDirty(), and StartListeningTo().

bool ScFormulaCell::IsIterCell ( ) const
inline

Definition at line 271 of file formulacell.hxx.

Referenced by Interpret().

bool ScFormulaCell::IsMultilineResult ( )
bool ScFormulaCell::IsPostponedDirty ( ) const
inline

Definition at line 507 of file formulacell.hxx.

bool ScFormulaCell::IsRunning ( ) const
inline
bool ScFormulaCell::IsShared ( ) const
bool ScFormulaCell::IsSharedTop ( ) const
bool ScFormulaCell::IsSubTotal ( ) const
inline
bool ScFormulaCell::IsValue ( )

Definition at line 2769 of file formulacell.cxx.

References aResult, ScFormulaResult::IsValue(), and MaybeInterpret().

Referenced by ScDocShell::AsciiSave(), ScChart2DataSequence::BuildDataCache(), ScFunctionAccess::callFunction(), ScTable::CompareCell(), convertToToken(), ScColumn::CopyStaticToDocument(), ScValidationData::DoMacro(), ScValidationData::DoScript(), ScInterpreter::GetCellString(), ScInterpreter::GetCellValueOrZero(), ScCellObj::GetContentType_Impl(), ScDBQueryDataIterator::DataAccessInternal::getCurrent(), ScCellFormat::GetInputString(), ScColumn::GetNeededSize(), ScHorizontalValueIterator::GetNext(), ScCellObj::GetResultType_Impl(), ScValidationData::GetSelectionFromFormula(), ScCellFormat::GetString(), ScDocument::GetStringForFormula(), GetURLResult(), ScColumn::GetValue(), ScConditionEntry::Interpret(), ScValidationData::IsDataValid(), ScInterpreter::IsEven(), IsMultilineResult(), ScInterpreter::IsString(), ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScOutputData::LayoutStrings(), lcl_GetCellContent(), lcl_SafeIsValue(), ScCellRangesBase::queryFormulaCells(), ScColumn::ResolveStaticReference(), ScInterpreter::ScCountIf(), ScFormatFilterPluginImpl::ScExportDif(), ScInterpreter::ScIsValue(), ScInterpreter::ScMatRef(), ScInterpreter::ScT(), sc::CopyFromClipContext::setSingleCell(), ScDrawStringsVars::SetTextToWidthOrHash(), ScTransferObj::StripRefs(), ScXMLExport::WriteCell(), and ScChangeTrackingExportHelper::WriteFormulaCell().

bool ScFormulaCell::IsValueNoError ( )
bool ScFormulaCell::IsValueNoError ( ) const
bool ScFormulaCell::MarkUsedExternalReferences ( )
void ScFormulaCell::MaybeInterpret ( )
inline
bool ScFormulaCell::NeedsInterpret ( ) const
inline
bool ScFormulaCell::NeedsListening ( ) const
inline

Definition at line 253 of file formulacell.hxx.

bool ScFormulaCell::NeedsNumberFormat ( ) const
inline

Definition at line 257 of file formulacell.hxx.

void ScFormulaCell::Notify ( const SfxHint rHint)
overridevirtual
void ScFormulaCell::Query ( SvtListener::QueryBase rQuery) const
overridevirtual
void ScFormulaCell::ResetDirty ( )
void ScFormulaCell::ResetTableOpDirtyVar ( )

Definition at line 2586 of file formulacell.cxx.

References bTableOpDirty.

void ScFormulaCell::SetCellGroup ( const ScFormulaCellGroupRef xRef)
void ScFormulaCell::SetChanged ( bool  b)
void ScFormulaCell::SetCode ( std::unique_ptr< ScTokenArray pNew)

Definition at line 3959 of file formulacell.cxx.

References mxGroup, and pCode.

void ScFormulaCell::SetCompile ( bool  bVal)

Definition at line 2390 of file formulacell.cxx.

References bCompile.

void ScFormulaCell::SetDirty ( bool  bDirtyFlag = true)
void ScFormulaCell::SetDirtyAfterLoad ( )
void ScFormulaCell::SetDirtyVar ( )
void ScFormulaCell::SetErrCode ( FormulaError  n)
void ScFormulaCell::SetFreeFlying ( bool  b)
inline

Definition at line 226 of file formulacell.hxx.

Referenced by ScConditionEntry::Interpret().

void ScFormulaCell::SetHybridDouble ( double  n)
void ScFormulaCell::SetHybridEmptyDisplayedAsString ( )

For import only: set an empty cell result to be displayed as empty string.

If for whatever reason you have to use both, SetHybridDouble() and SetHybridEmptyDisplayedAsString() or SetHybridFormula(), use SetHybridDouble() first for performance reasons and use SetHybridEmptyDisplayedAsString() last because SetHybridDouble() and SetHybridString() will override it.

Definition at line 2676 of file formulacell.cxx.

References aResult, and ScFormulaResult::SetHybridEmptyDisplayedAsString().

Referenced by ScXMLTableRowCellContext::SetFormulaCell().

void ScFormulaCell::SetHybridFormula ( const OUString &  r,
const formula::FormulaGrammar::Grammar  eGrammar 
)

For import only: set a temporary formula string to be compiled later.

If for whatever reason you have to use both, SetHybridDouble() and SetHybridString() or SetHybridFormula(), use SetHybridDouble() first for performance reasons.

Definition at line 2681 of file formulacell.cxx.

References aResult, eTempGrammar, and ScFormulaResult::SetHybridFormula().

Referenced by ScCellObj::setFormulaString().

void ScFormulaCell::SetHybridString ( const svl::SharedString r)

For import only: set a string result.

If for whatever reason you have to use both, SetHybridDouble() and SetHybridString() or SetHybridFormula(), use SetHybridDouble() first for performance reasons.

Definition at line 2671 of file formulacell.cxx.

References aResult, and ScFormulaResult::SetHybridString().

Referenced by ScXMLTableRowCellContext::PutTextCell(), and ScXMLTableRowCellContext::SetFormulaCell().

void ScFormulaCell::SetInChangeTrack ( bool  bVal)
void ScFormulaCell::SetIsExtRef ( )
inline

Definition at line 509 of file formulacell.hxx.

void ScFormulaCell::SetMatColsRows ( SCCOL  nCols,
SCROW  nRows 
)
void ScFormulaCell::SetNeedNumberFormat ( bool  bVal)
void ScFormulaCell::SetNeedsDirty ( bool  bVar)

Definition at line 1096 of file formulacell.cxx.

References mbPostponedDirty.

void ScFormulaCell::SetNeedsListening ( bool  bVar)
void ScFormulaCell::SetNext ( ScFormulaCell pF)

Definition at line 4003 of file formulacell.cxx.

References pNext.

Referenced by ScDocument::PutInFormulaTree(), and ScDocument::RemoveFromFormulaTree().

void ScFormulaCell::SetNextTrack ( ScFormulaCell pF)

Definition at line 4005 of file formulacell.cxx.

References pNextTrack.

Referenced by ScDocument::AppendToFormulaTrack(), and ScDocument::RemoveFromFormulaTrack().

void ScFormulaCell::SetPrevious ( ScFormulaCell pF)

Definition at line 4002 of file formulacell.cxx.

References pPrevious.

Referenced by ScDocument::PutInFormulaTree(), and ScDocument::RemoveFromFormulaTree().

void ScFormulaCell::SetPreviousTrack ( ScFormulaCell pF)
void ScFormulaCell::SetResultDouble ( double  n)

For import only: set a double result.

Use this instead of SetHybridDouble() if there is no (temporary) formula string because the formula is present as a token array, as it is the case for binary Excel import.

Definition at line 2613 of file formulacell.cxx.

References aResult, and ScFormulaResult::SetDouble().

Referenced by ImportExcel::Formula(), ScColumn::SetFormulaResults(), and ImportExcel::Shrfmla().

void ScFormulaCell::SetResultError ( FormulaError  n)

Definition at line 2650 of file formulacell.cxx.

References aResult, and ScFormulaResult::SetResultError().

Referenced by ScColumn::SetFormulaResults().

void ScFormulaCell::SetResultMatrix ( SCCOL  nCols,
SCROW  nRows,
const ScConstMatrixRef pMat,
const formula::FormulaToken pUL 
)

Definition at line 2633 of file formulacell.cxx.

References aResult, and ScFormulaResult::SetMatrix().

Referenced by ScXMLTableRowCellContext::AddFormulaCell().

void ScFormulaCell::SetResultToken ( const formula::FormulaToken pToken)

Definition at line 2618 of file formulacell.cxx.

References aResult, and ScFormulaResult::SetToken().

void ScFormulaCell::SetRunning ( bool  bVal)
void ScFormulaCell::SetSeenInPath ( bool  bSet)
inline
void ScFormulaCell::SetTableOpDirty ( )
void ScFormulaCell::StartListeningTo ( ScDocument rDoc)
void ScFormulaCell::StartListeningTo ( sc::StartListeningContext rCxt)
void ScFormulaCell::SyncSharedCode ( )

Definition at line 5521 of file formulacell.cxx.

References pCode.

bool ScFormulaCell::TestTabRefAbs ( SCTAB  nTable)
void ScFormulaCell::TransposeReference ( )
void ScFormulaCell::UpdateCompile ( bool  bForceIfNameInUse)
void ScFormulaCell::UpdateDeleteTab ( const sc::RefUpdateDeleteTabContext rCxt)
void ScFormulaCell::UpdateGrow ( const ScRange rArea,
SCCOL  nGrowX,
SCROW  nGrowY 
)
void ScFormulaCell::UpdateInsertTab ( const sc::RefUpdateInsertTabContext rCxt)
void ScFormulaCell::UpdateInsertTabAbs ( SCTAB  nTable)
void ScFormulaCell::UpdateMoveTab ( const sc::RefUpdateMoveTabContext rCxt,
SCTAB  nTabNo 
)
bool ScFormulaCell::UpdatePosOnShift ( const sc::RefUpdateContext rCxt)

Shift the position of formula cell as part of reference update.

Returns
true if the position has shifted, false otherwise.

Definition at line 3126 of file formulacell.cxx.

References ScRange::In(), sc::RefUpdateContext::maRange, sc::RefUpdateContext::meMode, sc::RefUpdateContext::mnColDelta, sc::RefUpdateContext::mnRowDelta, sc::RefUpdateContext::mnTabDelta, ScAddress::Move(), ScAddress::UNINITIALIZED, and URM_INSDEL.

Referenced by UpdateReference(), and UpdateReferenceOnShift().

bool ScFormulaCell::UpdateReference ( const sc::RefUpdateContext rCxt,
ScDocument pUndoDoc = nullptr,
const ScAddress pUndoCellPos = nullptr 
)
bool ScFormulaCell::UpdateReferenceOnCopy ( const sc::RefUpdateContext rCxt,
ScDocument pUndoDoc,
const ScAddress pUndoCellPos 
)
private
bool ScFormulaCell::UpdateReferenceOnMove ( const sc::RefUpdateContext rCxt,
ScDocument pUndoDoc,
const ScAddress pUndoCellPos 
)
bool ScFormulaCell::UpdateReferenceOnShift ( const sc::RefUpdateContext rCxt,
ScDocument pUndoDoc,
const ScAddress pUndoCellPos 
)
void ScFormulaCell::UpdateTranspose ( const ScRange rSource,
const ScAddress rDest,
ScDocument pUndoDoc 
)

Member Data Documentation

ScAddress ScFormulaCell::aPos
ScFormulaResult ScFormulaCell::aResult
private
bool ScFormulaCell::bChanged
private
bool ScFormulaCell::bCompile
private
bool ScFormulaCell::bDirty
private
bool ScFormulaCell::bInChangeTrack
private

Definition at line 132 of file formulacell.hxx.

Referenced by SetInChangeTrack().

bool ScFormulaCell::bIsIterCell
private

Definition at line 131 of file formulacell.hxx.

Referenced by Interpret(), and InterpretTail().

bool ScFormulaCell::bNeedListening
private

Definition at line 133 of file formulacell.hxx.

Referenced by SetNeedsListening().

bool ScFormulaCell::bRunning
private

Definition at line 128 of file formulacell.hxx.

Referenced by Interpret(), InterpretTail(), and SetRunning().

bool ScFormulaCell::bSubTotal
private

Definition at line 130 of file formulacell.hxx.

Referenced by CalcAfterLoad(), CompileTokenArray(), CompileXML(), Notify(), and ScFormulaCell().

bool ScFormulaCell::bTableOpDirty
private

Definition at line 126 of file formulacell.hxx.

Referenced by Notify(), ResetDirty(), ResetTableOpDirtyVar(), and SetTableOpDirty().

ScMatrixMode ScFormulaCell::cMatrixFlag
private
formula::FormulaGrammar::Grammar ScFormulaCell::eTempGrammar
private
bool ScFormulaCell::mbAllowNumberFormatChange
private

Definition at line 135 of file formulacell.hxx.

Referenced by InterpretTail(), and SetNeedNumberFormat().

bool ScFormulaCell::mbFreeFlying
private

Definition at line 140 of file formulacell.hxx.

Referenced by Interpret().

bool ScFormulaCell::mbIsExtRef
private

Definition at line 138 of file formulacell.hxx.

Referenced by CompileXML().

bool ScFormulaCell::mbNeedsNumberFormat
private

Definition at line 134 of file formulacell.hxx.

Referenced by InterpretTail(), and SetNeedNumberFormat().

bool ScFormulaCell::mbPostponedDirty
private
bool ScFormulaCell::mbSeenInPath
private

Definition at line 139 of file formulacell.hxx.

Referenced by Interpret().

ScFormulaCellGroupRef ScFormulaCell::mxGroup
private
SvNumFormatType ScFormulaCell::nFormatType
private
sal_uInt16 ScFormulaCell::nSeenInIteration
private

Definition at line 142 of file formulacell.hxx.

Referenced by Interpret(), and InterpretTail().

ScTokenArray* ScFormulaCell::pCode
private
ScFormulaCell* ScFormulaCell::pNext
private

Definition at line 151 of file formulacell.hxx.

Referenced by SetNext().

ScFormulaCell* ScFormulaCell::pNextTrack
private

Definition at line 153 of file formulacell.hxx.

Referenced by SetNextTrack().

ScFormulaCell* ScFormulaCell::pPrevious
private

Definition at line 150 of file formulacell.hxx.

Referenced by SetPrevious().

ScFormulaCell* ScFormulaCell::pPreviousTrack
private

Definition at line 152 of file formulacell.hxx.

Referenced by SetPreviousTrack().

ScDocument& ScFormulaCell::rDocument
private

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