20 #ifndef INCLUDED_SC_INC_FORMULACELL_HXX
21 #define INCLUDED_SC_INC_FORMULACELL_HXX
36 class StartListeningContext;
37 class EndListeningContext;
38 struct RefUpdateContext;
39 struct RefUpdateInsertTabContext;
40 struct RefUpdateDeleteTabContext;
41 struct RefUpdateMoveTabContext;
42 class CompileFormulaContext;
43 class FormulaGroupAreaListener;
44 class UpdatedRangeNames;
57 std::unique_ptr<Impl>
mpImpl;
63 std::unique_ptr<ScTokenArray>
mpCode;
80 void setCode( std::unique_ptr<ScTokenArray> pCode );
112 bool bTableOpDirty : 1;
117 bool bIsIterCell : 1;
118 bool bInChangeTrack : 1;
119 bool bNeedListening : 1;
120 bool mbNeedsNumberFormat : 1;
121 bool mbAllowNumberFormatChange : 1;
123 bool mbPostponedDirty : 1;
125 bool mbSeenInPath : 1;
127 sal_uInt16 nSeenInIteration : 16;
143 bool UpdateReferenceOnCopy(
149 SCROW nStartOffset,
SCROW nEndOffset,
bool bCalcDependencyOnly =
false);
151 bool& bDependencyComputed,
152 bool& bDependencyCheckFailed,
155 bool& bDependencyComputed,
156 bool& bDependencyCheckFailed);
157 bool InterpretInvariantFormulaGroup();
166 SCITP_CLOSE_ITERATION_CIRCLE
170 void HandleStuffAfterParallelCalculation(
ScInterpreter* pInterpreter);
205 const OUString& rFormula,
211 size_t GetHash()
const;
215 void GetFormula( OUString& rFormula,
218 void GetFormula( OUStringBuffer& rBuffer,
224 void SetDirty(
bool bDirtyFlag=
true );
227 void SetDirtyAfterLoad();
228 void ResetTableOpDirtyVar();
229 void SetTableOpDirty();
239 void SetNeedsListening(
bool bVar );
240 void SetNeedsDirty(
bool bVar );
241 void SetNeedNumberFormat(
bool bVal );
244 void Compile(
const OUString& rFormula,
250 void CompileTokenArray(
bool bNoListening =
false );
254 bool MarkUsedExternalReferences();
255 bool Interpret(
SCROW nStartOffset = -1,
SCROW nEndOffset = -1);
259 bool HasOneReference(
ScRange& r )
const;
268 bool HasRefListExpressibleAsOneReference(
ScRange& rRange)
const;
276 RelNameRef HasRelNameReference()
const;
278 bool UpdateReference(
291 bool UpdateReferenceOnShift(
297 bool UpdateReferenceOnMove(
300 void TransposeReference();
307 void UpdateInsertTabAbs(
SCTAB nTable);
310 bool TestTabRefAbs(
SCTAB nTable);
311 void UpdateCompile(
bool bForceIfNameInUse );
315 void SetChanged(
bool b);
318 bool IsEmptyDisplayedAsString();
320 bool IsValueNoError();
321 bool IsValueNoError()
const;
328 double GetRawValue()
const;
336 void GetResultDimensions(
SCSIZE& rCols,
SCSIZE& rRows );
340 bool GetErrorOrValue(
FormulaError& rErr,
double& rVal );
347 void SetCode( std::unique_ptr<ScTokenArray> pNew );
350 void SetRunning(
bool bVal );
365 void SetCompile(
bool bVal );
367 void SetMatColsRows(
SCCOL nCols,
SCROW nRows );
368 void GetMatColsRows(
SCCOL& nCols,
SCROW& nRows )
const;
371 void SetInChangeTrack(
bool bVal );
377 void SetHybridDouble(
double n );
389 void SetHybridEmptyDisplayedAsString();
394 void SetHybridFormula(
397 const OUString& GetHybridFormula()
const;
406 void SetResultDouble(
double n );
412 bool HasHybridStringResult()
const;
420 bool IsHyperLinkCell()
const;
421 std::unique_ptr<EditTextObject> CreateURLObject();
422 void GetURLResult( OUString& rURL, OUString& rCellText );
425 bool IsMultilineResult();
434 if (!IsDirtyOrInTableOpDirty())
442 if (NeedsInterpret())
458 CompareState CompareByTokenArray(
const ScFormulaCell& rOther )
const;
460 bool InterpretFormulaGroup(
SCROW nStartOffset = -1,
SCROW nEndOffset = -1);
469 bool IsShared()
const;
470 bool IsSharedTop()
const;
471 SCROW GetSharedTopRow()
const;
472 SCROW GetSharedLength()
const;
475 sal_Int32 GetWeight()
const;
480 void SyncSharedCode();
488 #if DUMP_COLUMN_STORAGE
Matrix data type that can store values of mixed types.
Default cell clone flags: do not start listening, do not adjust 3D refs to old position, clone note captions of cell notes.
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Context for reference update during shifting, moving or copying of cell ranges.
OUString GetString(int nId)
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
virtual void Query(QueryBase &rQuery) const
Keep track of all named expressions that have been updated during reference update.
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
bool IsInInterpreterTableOp() const
bool IsThreadedGroupCalcInProgress() const
::boost::intrusive_ptr< const ScMatrix > ScConstMatrixRef
virtual void Notify(const SfxHint &rHint)
ScFormulaVectorState
When vectorization is enabled, we could potentially mass-calculate a series of formula token arrays i...
SC_DLLPUBLIC bool GetAutoCalc() const