diff options
author | Dennis Francis <dennis.francis@collabora.co.uk> | 2018-02-07 12:00:47 +0530 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-04-28 13:33:55 +0200 |
commit | 67b1c26c27590678ece7bcef763433aedd0b164d (patch) | |
tree | efed6b3c2c2a6db724d0aa60dcde735d5d10ac4a /include/formula | |
parent | 212807f77b78c69263f8aae51dcdc73e8017c53a (diff) |
tdf#114479: compute implicit sum ranges for ocSumIf,ocAverageIf...
and update the sum-range token in RPN array while creation of
the RPN array itself.
+ Adds unit tests.
+ In ScParallelismTest unit test, enable threading in its setUp()
method and restore the original setting in tearDown().
Change-Id: Iee9b7759210a82950181a418eb92766a6cf891fc
Reviewed-on: https://gerrit.libreoffice.org/49465
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include/formula')
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index 8171b0a831f0..e64bc867a447 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -41,6 +41,7 @@ #define FORMULA_MAXJUMPCOUNT 32 /* maximum number of jumps (ocChoose) */ #define FORMULA_MAXTOKENS 8192 /* maximum number of tokens in formula */ #define FORMULA_MAXPARAMS 255 /* maximum number of parameters per function (byte) */ +#define FORMULA_MAXPARAMSII 8 /* maximum number of parameters for functions that have implicit intersection ranges */ namespace com { namespace sun { namespace star { @@ -66,7 +67,6 @@ struct FormulaArrayStack bool bTemp; }; - typedef std::unordered_map< OUString, OpCode > OpCodeHashMap; typedef std::unordered_map< OUString, OUString > ExternalHashMap; @@ -323,6 +323,12 @@ protected: bool MergeRangeReference( FormulaToken * * const pCode1, FormulaToken * const * const pCode2 ); + // Returns whether the opcode has implicit intersection ranges as parameters. + // This is no-op for this class. + virtual bool IsIIOpCode(OpCode /*nOpCode*/) const { return false; } + // Handles II opcode and passes the parameter array and number of parameters. + virtual void HandleIIOpCode(OpCode /*nOpCode*/, FormulaToken*** /*pppToken*/, sal_uInt8 /*nNumParams*/) {} + OUString aCorrectedFormula; // autocorrected Formula OUString aCorrectedSymbol; // autocorrected Symbol |