diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-01 23:54:28 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-07-02 05:31:02 +0000 |
commit | a19db54f78720dc8200b3504e84cd19d445f4d18 (patch) | |
tree | e9e12b85e127c0774ca9373d30aec16126a90ce2 /sc | |
parent | 0a94f9210ca74ea959a59dbb4cb6ea05b6450118 (diff) |
resolved fdo#35411 redefined MAXCODE 512 to FORMULA_MAXTOKENS 8192
Also renamed MAXJUMPCOUNT to FORMULA_MAXJUMPCOUNT but without changing
the value as the runtime array size of ocChose depends on it, should be
changed before.
Eliminated the duplicated and error causing redefinition of both in
sc/inc/compiler.hxx
Change-Id: I0e87d1439c9564a4f475fcb2870ab51c3b586942
(cherry picked from commit 9c1ca6dca3b553c302a635357e33591605343b99)
Reviewed-on: https://gerrit.libreoffice.org/4668
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/compiler.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 10af9016ee4f..9fe9820df0ab 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -42,9 +42,7 @@ // constants and data types also for external modules (ScInterpreter et al) -#define MAXCODE 512 /* maximum number of tokens in formula */ #define MAXSTRLEN 1024 /* maximum length of input string of one symbol */ -#define MAXJUMPCOUNT 32 /* maximum number of jumps (ocChose) */ // flag values of CharTable #define SC_COMPILER_C_ILLEGAL 0x00000000 @@ -146,7 +144,7 @@ public: ScMatrix* pMat; sal_uInt16 nError; sal_Unicode cStr[ MAXSTRLEN+1 ]; // string (up to 255 characters + 0) - short nJump[MAXJUMPCOUNT+1]; // If/Chose token + short nJump[ FORMULA_MAXJUMPCOUNT + 1 ]; // If/Chose token }; //! other members not initialized diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 8e8c329727ab..697420d24565 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -136,7 +136,7 @@ void ScRawToken::SetOpCode( OpCode e ) break; case ocChose: eType = svJump; - nJump[ 0 ] = MAXJUMPCOUNT+1; + nJump[ 0 ] = FORMULA_MAXJUMPCOUNT + 1; break; case ocMissing: eType = svMissing; |