summaryrefslogtreecommitdiff
path: root/sc/inc/formulacell.hxx
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2019-01-15 21:34:46 +0530
committerDennis Francis <dennis.francis@collabora.com>2019-02-05 13:56:22 +0100
commit3346947b7e102384dfc6cd98dbf7da81936f8fd6 (patch)
tree01db16dcb48779866e2f611a57e6836c4e9111c7 /sc/inc/formulacell.hxx
parentba1e745b3d022856080c25167226e8a9eeadc911 (diff)
Allow computing spans of formula-groups
Includes unit tests for correctness of the new functionality. Change-Id: I35f7449006d973de006a756664ae468b9a0dcb31 Reviewed-on: https://gerrit.libreoffice.org/66841 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'sc/inc/formulacell.hxx')
-rw-r--r--sc/inc/formulacell.hxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index b6959c74d6cd..ec7c61171ae7 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -143,10 +143,12 @@ private:
ScFormulaCell( const ScFormulaCell& ) = delete;
- bool CheckComputeDependencies(sc::FormulaLogger::GroupScope& rScope, bool fromFirstRow = false);
+ bool CheckComputeDependencies(sc::FormulaLogger::GroupScope& rScope, bool fromFirstRow,
+ SCROW nStartOffset, SCROW nEndOffset);
bool InterpretFormulaGroupThreading(sc::FormulaLogger::GroupScope& aScope,
bool& bDependencyComputed,
- bool& bDependencyCheckFailed);
+ bool& bDependencyCheckFailed,
+ SCROW nStartOffset, SCROW nEndOffset);
bool InterpretFormulaGroupOpenCL(sc::FormulaLogger::GroupScope& aScope,
bool& bDependencyComputed,
bool& bDependencyCheckFailed);
@@ -248,7 +250,7 @@ public:
void CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress ); // compile temporary string tokens
void CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartListening );
bool MarkUsedExternalReferences();
- void Interpret();
+ bool Interpret(SCROW nStartOffset = -1, SCROW nEndOffset = -1);
bool IsIterCell() const { return bIsIterCell; }
sal_uInt16 GetSeenInIteration() const { return nSeenInIteration; }
@@ -433,13 +435,15 @@ public:
return (pDocument->GetAutoCalc() || (cMatrixFlag != ScMatrixMode::NONE));
}
- void MaybeInterpret()
+ bool MaybeInterpret()
{
if (NeedsInterpret())
{
assert(!pDocument->IsThreadedGroupCalcInProgress());
Interpret();
+ return true;
}
+ return false;
}
/**
@@ -451,7 +455,7 @@ public:
CompareState CompareByTokenArray( const ScFormulaCell& rOther ) const;
- bool InterpretFormulaGroup();
+ bool InterpretFormulaGroup(SCROW nStartOffset = -1, SCROW nEndOffset = -1);
// nOnlyNames may be one or more of SC_LISTENING_NAMES_*
void StartListeningTo( ScDocument* pDoc );