2001-02-21 11:39:37 -06:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* $RCSfile: token.hxx,v $
|
2008-09-30 00:48:28 -05:00
|
|
|
* $Revision: 1.15.32.3 $
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
2008-04-10 12:58:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-02-21 11:39:37 -06:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef SC_TOKEN_HXX
|
|
|
|
#define SC_TOKEN_HXX
|
|
|
|
|
2007-07-06 06:31:14 -05:00
|
|
|
#include <memory>
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
#include <vector>
|
2001-02-21 11:39:37 -06:00
|
|
|
#include "opcode.hxx"
|
|
|
|
#include "refdata.hxx"
|
2004-03-08 04:42:25 -06:00
|
|
|
#include "scmatrix.hxx"
|
|
|
|
#include "intruref.hxx"
|
|
|
|
#include <tools/mempool.hxx>
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
|
2001-02-28 04:51:17 -06:00
|
|
|
enum StackVarEnum
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
svByte,
|
|
|
|
svDouble,
|
|
|
|
svString,
|
|
|
|
svSingleRef,
|
|
|
|
svDoubleRef,
|
|
|
|
svMatrix,
|
|
|
|
svIndex,
|
|
|
|
svJump,
|
|
|
|
svExternal, // Byte + String
|
2002-09-27 11:19:11 -05:00
|
|
|
svFAP, // FormulaAutoPilot only, ever exported
|
2004-03-08 04:42:25 -06:00
|
|
|
svJumpMatrix, // 2003-07-02
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
svRefList, // ocUnion result
|
|
|
|
svEmptyCell, // Result is an empty cell, e.g. in LOOKUP()
|
|
|
|
|
|
|
|
svMatrixCell, // Result is a matrix with bells and
|
|
|
|
// whistles as needed for _the_ matrix
|
|
|
|
// formula result.
|
|
|
|
|
|
|
|
svHybridCell, // A temporary condition of a formula
|
|
|
|
// cell during import, having a double
|
|
|
|
// and/or string result and a formula
|
|
|
|
// string to be compiled.
|
2004-03-08 04:42:25 -06:00
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
svError, // error token
|
2001-02-21 11:39:37 -06:00
|
|
|
svMissing = 0x70, // 0 or ""
|
2008-07-08 01:19:25 -05:00
|
|
|
svSep, // separator, ocSep, ocOpen, ocClose
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
svUnknown // unknown StackType
|
2001-02-21 11:39:37 -06:00
|
|
|
};
|
|
|
|
|
2001-02-28 04:51:17 -06:00
|
|
|
#ifdef PRODUCT
|
|
|
|
// save memory since compilers tend to int an enum
|
|
|
|
typedef BYTE StackVar;
|
|
|
|
#else
|
|
|
|
// have enum names in debugger
|
|
|
|
typedef StackVarEnum StackVar;
|
|
|
|
#endif
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
|
2004-03-08 04:42:25 -06:00
|
|
|
class ScJumpMatrix;
|
2001-02-21 11:39:37 -06:00
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
class ScToken;
|
|
|
|
typedef ScSimpleIntrusiveReference< class ScToken > ScTokenRef;
|
|
|
|
typedef ScSimpleIntrusiveReference< const class ScToken > ScConstTokenRef;
|
|
|
|
|
|
|
|
typedef ::std::vector< ComplRefData > ScRefList;
|
|
|
|
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
class ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
const StackVar eType; // type of data
|
2005-05-13 01:32:54 -05:00
|
|
|
mutable USHORT nRefCnt; // reference count
|
2001-02-21 11:39:37 -06:00
|
|
|
|
|
|
|
// not implemented, prevent usage
|
|
|
|
ScToken();
|
|
|
|
ScToken& operator=( const ScToken& );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
static String aDummyString;
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScToken( StackVar eTypeP ) :
|
|
|
|
eType( eTypeP ), nRefCnt(0) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScToken( const ScToken& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
eType( r.eType ), nRefCnt(0) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual ~ScToken();
|
|
|
|
|
|
|
|
inline void Delete() { delete this; }
|
2008-10-10 08:02:43 -05:00
|
|
|
inline StackVar GetType() const { return eType; }
|
2001-02-21 11:39:37 -06:00
|
|
|
BOOL IsFunction() const; // pure functions, no operators
|
|
|
|
BOOL IsMatrixFunction() const; // if a function _always_ returns a Matrix
|
|
|
|
BYTE GetParamCount() const;
|
2005-05-13 01:32:54 -05:00
|
|
|
inline void IncRef() const { nRefCnt++; }
|
|
|
|
inline void DecRef() const
|
|
|
|
{
|
|
|
|
if (!--nRefCnt)
|
|
|
|
const_cast<ScToken*>(this)->Delete();
|
|
|
|
}
|
2001-02-21 11:39:37 -06:00
|
|
|
inline USHORT GetRef() const { return nRefCnt; }
|
|
|
|
|
2004-03-08 04:42:25 -06:00
|
|
|
/**
|
|
|
|
Dummy methods to avoid switches and casts where possible,
|
|
|
|
the real token classes have to overload the appropriate method[s].
|
|
|
|
The only methods valid anytime if not overloaded are:
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
- GetOpCode() since for a token type not needing an explicit OpCode set
|
|
|
|
the implicit OpCode is ocPush.
|
|
|
|
|
2004-03-08 04:42:25 -06:00
|
|
|
- GetByte() since this represents the count of parameters to a function
|
|
|
|
which of course is 0 on non-functions. ScByteToken and ScExternal do
|
|
|
|
overload it.
|
|
|
|
|
|
|
|
- HasForceArray() since also this is only used for operators and
|
|
|
|
functions and is 0 for other tokens.
|
|
|
|
|
|
|
|
Any other non-overloaded method pops up an assertion.
|
|
|
|
*/
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
virtual OpCode GetOpCode() const;
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual BYTE GetByte() const;
|
|
|
|
virtual void SetByte( BYTE n );
|
2004-03-08 04:42:25 -06:00
|
|
|
virtual bool HasForceArray() const;
|
|
|
|
virtual void SetForceArray( bool b );
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual double GetDouble() const;
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
virtual double& GetDoubleAsReference();
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual const String& GetString() const;
|
|
|
|
virtual const SingleRefData& GetSingleRef() const;
|
|
|
|
virtual SingleRefData& GetSingleRef();
|
|
|
|
virtual const ComplRefData& GetDoubleRef() const;
|
|
|
|
virtual ComplRefData& GetDoubleRef();
|
2001-10-12 06:32:37 -05:00
|
|
|
virtual const SingleRefData& GetSingleRef2() const;
|
|
|
|
virtual SingleRefData& GetSingleRef2();
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual void CalcAbsIfRel( const ScAddress& );
|
|
|
|
virtual void CalcRelFromAbs( const ScAddress& );
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
virtual const ScMatrix* GetMatrix() const;
|
|
|
|
virtual ScMatrix* GetMatrix();
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual USHORT GetIndex() const;
|
|
|
|
virtual void SetIndex( USHORT n );
|
|
|
|
virtual short* GetJump() const;
|
|
|
|
virtual const String& GetExternal() const;
|
2002-09-27 11:19:11 -05:00
|
|
|
virtual ScToken* GetFAPOrigToken() const;
|
2004-03-08 04:42:25 -06:00
|
|
|
virtual ScJumpMatrix* GetJumpMatrix() const;
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
virtual const ScRefList* GetRefList() const;
|
|
|
|
virtual ScRefList* GetRefList();
|
|
|
|
virtual USHORT GetError() const;
|
|
|
|
virtual void SetError( USHORT );
|
2001-02-21 11:39:37 -06:00
|
|
|
|
|
|
|
ScToken* Clone() const;
|
|
|
|
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
BOOL TextEqual( const ScToken& rToken ) const;
|
2001-10-12 06:32:37 -05:00
|
|
|
BOOL Is3DRef() const; // reference with 3D flag set
|
2001-02-21 11:39:37 -06:00
|
|
|
|
2008-09-30 00:48:28 -05:00
|
|
|
//UNUSED2008-05 // If token in RPN resulted from resolving a name and contains an absolute
|
|
|
|
//UNUSED2008-05 // reference. Token must be obtained through ScTokenArray::GetNextReferenceRPN()
|
|
|
|
//UNUSED2008-05 // or similar.
|
|
|
|
//UNUSED2008-05 BOOL IsRPNReferenceAbsName() const;
|
2001-10-18 03:03:25 -05:00
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
/** If rTok1 and rTok2 both are SingleRef or DoubleRef tokens, extend/merge
|
|
|
|
ranges as needed for ocRange.
|
|
|
|
@param rPos
|
|
|
|
The formula's position, used to calculate absolute positions from
|
|
|
|
relative references.
|
|
|
|
@param bReuseDoubleRef
|
|
|
|
If TRUE, a DoubleRef token is reused if passed as rTok1 or rTok2,
|
|
|
|
else a new DoubleRef token is created and returned.
|
|
|
|
@return
|
|
|
|
A reused or new'ed ScDoubleRefToken, or a NULL TokenRef if rTok1 or
|
|
|
|
rTok2 are not of sv(Single|Double)Ref
|
|
|
|
*/
|
|
|
|
static ScTokenRef ExtendRangeReference( ScToken & rTok1, ScToken & rTok2, const ScAddress & rPos, bool bReuseDoubleRef );
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
static size_t GetStrLenBytes( xub_StrLen nLen )
|
|
|
|
{ return nLen * sizeof(sal_Unicode); }
|
|
|
|
static size_t GetStrLenBytes( const String& rStr )
|
|
|
|
{ return GetStrLenBytes( rStr.Len() ); }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
/** Tokens that need a different OpCode than ocPush are derived from this. */
|
|
|
|
class ScOpToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
OpCode eOp;
|
|
|
|
public:
|
|
|
|
ScOpToken( OpCode e, StackVar v ) :
|
|
|
|
ScToken( v ), eOp( e ) {}
|
|
|
|
ScOpToken( const ScOpToken & r ) :
|
|
|
|
ScToken( r ), eOp( r.eOp ) {}
|
|
|
|
/** This is dirty and only the compiler should use it! */
|
|
|
|
inline void NewOpCode( OpCode e ) { eOp = e; }
|
|
|
|
virtual OpCode GetOpCode() const;
|
|
|
|
|
|
|
|
// No operator== to be overloaded, ScToken::operator== already checks the
|
|
|
|
// OpCode as well via GetOpCode().
|
|
|
|
};
|
2002-09-27 11:19:11 -05:00
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
class ScByteToken : public ScOpToken
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
BYTE nByte;
|
2004-03-08 04:42:25 -06:00
|
|
|
bool bHasForceArray;
|
2002-09-27 11:19:11 -05:00
|
|
|
protected:
|
2004-03-08 04:42:25 -06:00
|
|
|
ScByteToken( OpCode e, BYTE n, StackVar v, bool b ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, v ), nByte( n ),
|
2004-03-08 04:42:25 -06:00
|
|
|
bHasForceArray( b ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
public:
|
2004-03-08 04:42:25 -06:00
|
|
|
ScByteToken( OpCode e, BYTE n, bool b ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, svByte ), nByte( n ),
|
2004-03-08 04:42:25 -06:00
|
|
|
bHasForceArray( b ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScByteToken( OpCode e, BYTE n ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, svByte ), nByte( n ),
|
2004-03-08 04:42:25 -06:00
|
|
|
bHasForceArray( false ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScByteToken( OpCode e ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, svByte ), nByte( 0 ),
|
2004-03-08 04:42:25 -06:00
|
|
|
bHasForceArray( false ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScByteToken( const ScByteToken& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( r ), nByte( r.nByte ),
|
2004-03-08 04:42:25 -06:00
|
|
|
bHasForceArray( r.bHasForceArray ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual BYTE GetByte() const;
|
|
|
|
virtual void SetByte( BYTE n );
|
2004-03-08 04:42:25 -06:00
|
|
|
virtual bool HasForceArray() const;
|
|
|
|
virtual void SetForceArray( bool b );
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
|
|
|
|
DECL_FIXEDMEMPOOL_NEWDEL( ScByteToken );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-09-27 11:19:11 -05:00
|
|
|
// A special token for the FormulaAutoPilot only. Keeps a reference pointer of
|
|
|
|
// the token of which it was created for comparison.
|
|
|
|
class ScFAPToken : public ScByteToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
ScTokenRef pOrigToken;
|
|
|
|
public:
|
|
|
|
ScFAPToken( OpCode e, BYTE n, ScToken* p ) :
|
2004-03-08 04:42:25 -06:00
|
|
|
ScByteToken( e, n, svFAP, false ),
|
|
|
|
pOrigToken( p ) {}
|
2002-09-27 11:19:11 -05:00
|
|
|
ScFAPToken( const ScFAPToken& r ) :
|
|
|
|
ScByteToken( r ), pOrigToken( r.pOrigToken ) {}
|
|
|
|
virtual ScToken* GetFAPOrigToken() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
class ScDoubleToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
double fDouble;
|
|
|
|
public:
|
|
|
|
ScDoubleToken( double f ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScToken( svDouble ), fDouble( f ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScDoubleToken( const ScDoubleToken& r ) :
|
|
|
|
ScToken( r ), fDouble( r.fDouble ) {}
|
|
|
|
virtual double GetDouble() const;
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
virtual double& GetDoubleAsReference();
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
|
|
|
|
DECL_FIXEDMEMPOOL_NEWDEL( ScDoubleToken );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ScStringToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
String aString;
|
|
|
|
public:
|
|
|
|
ScStringToken( const String& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScToken( svString ), aString( r ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScStringToken( const ScStringToken& r ) :
|
|
|
|
ScToken( r ), aString( r.aString ) {}
|
|
|
|
virtual const String& GetString() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
|
|
|
|
DECL_FIXEDMEMPOOL_NEWDEL( ScStringToken );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
/** Identical to ScStringToken, but with explicit OpCode instead of implicit
|
|
|
|
ocPush, and an optional BYTE for ocBad tokens. */
|
|
|
|
class ScStringOpToken : public ScByteToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
String aString;
|
|
|
|
public:
|
|
|
|
ScStringOpToken( OpCode e, const String& r ) :
|
|
|
|
ScByteToken( e, 0, svString, false ), aString( r ) {}
|
|
|
|
ScStringOpToken( const ScStringOpToken& r ) :
|
|
|
|
ScByteToken( r ), aString( r.aString ) {}
|
|
|
|
virtual const String& GetString() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
class ScSingleRefToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
SingleRefData aSingleRef;
|
|
|
|
public:
|
|
|
|
ScSingleRefToken( const SingleRefData& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScToken( svSingleRef ), aSingleRef( r ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScSingleRefToken( const ScSingleRefToken& r ) :
|
|
|
|
ScToken( r ), aSingleRef( r.aSingleRef ) {}
|
|
|
|
virtual const SingleRefData& GetSingleRef() const;
|
|
|
|
virtual SingleRefData& GetSingleRef();
|
|
|
|
virtual void CalcAbsIfRel( const ScAddress& );
|
|
|
|
virtual void CalcRelFromAbs( const ScAddress& );
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
|
|
|
|
DECL_FIXEDMEMPOOL_NEWDEL( ScSingleRefToken );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
/** Identical to ScSingleRefToken, but with explicit OpCode instead of implicit
|
|
|
|
ocPush. */
|
|
|
|
class ScSingleRefOpToken : public ScOpToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
SingleRefData aSingleRef;
|
|
|
|
public:
|
|
|
|
ScSingleRefOpToken( OpCode e, const SingleRefData& r ) :
|
|
|
|
ScOpToken( e, svSingleRef ), aSingleRef( r ) {}
|
|
|
|
ScSingleRefOpToken( const ScSingleRefOpToken& r ) :
|
|
|
|
ScOpToken( r ), aSingleRef( r.aSingleRef ) {}
|
|
|
|
virtual const SingleRefData& GetSingleRef() const;
|
|
|
|
virtual SingleRefData& GetSingleRef();
|
|
|
|
virtual void CalcAbsIfRel( const ScAddress& );
|
|
|
|
virtual void CalcRelFromAbs( const ScAddress& );
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
class ScDoubleRefToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
ComplRefData aDoubleRef;
|
|
|
|
public:
|
|
|
|
ScDoubleRefToken( const ComplRefData& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScToken( svDoubleRef ), aDoubleRef( r ) {}
|
|
|
|
ScDoubleRefToken( const SingleRefData& r ) :
|
|
|
|
ScToken( svDoubleRef )
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
aDoubleRef.Ref1 = r;
|
|
|
|
aDoubleRef.Ref2 = r;
|
|
|
|
}
|
|
|
|
ScDoubleRefToken( const ScDoubleRefToken& r ) :
|
|
|
|
ScToken( r ), aDoubleRef( r.aDoubleRef ) {}
|
|
|
|
virtual const SingleRefData& GetSingleRef() const;
|
|
|
|
virtual SingleRefData& GetSingleRef();
|
|
|
|
virtual const ComplRefData& GetDoubleRef() const;
|
|
|
|
virtual ComplRefData& GetDoubleRef();
|
2001-10-12 06:32:37 -05:00
|
|
|
virtual const SingleRefData& GetSingleRef2() const;
|
|
|
|
virtual SingleRefData& GetSingleRef2();
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual void CalcAbsIfRel( const ScAddress& );
|
|
|
|
virtual void CalcRelFromAbs( const ScAddress& );
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
|
|
|
|
DECL_FIXEDMEMPOOL_NEWDEL( ScDoubleRefToken );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
/** Identical to ScDoubleRefToken, but with explicit OpCode instead of implicit
|
|
|
|
ocPush. */
|
|
|
|
class ScDoubleRefOpToken : public ScOpToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
ComplRefData aDoubleRef;
|
|
|
|
public:
|
|
|
|
ScDoubleRefOpToken( OpCode e, const ComplRefData& r ) :
|
|
|
|
ScOpToken( e, svDoubleRef ), aDoubleRef( r ) {}
|
|
|
|
ScDoubleRefOpToken( OpCode e, const SingleRefData& r ) :
|
|
|
|
ScOpToken( e, svDoubleRef )
|
|
|
|
{
|
|
|
|
aDoubleRef.Ref1 = r;
|
|
|
|
aDoubleRef.Ref2 = r;
|
|
|
|
}
|
|
|
|
ScDoubleRefOpToken( const ScDoubleRefOpToken& r ) :
|
|
|
|
ScOpToken( r ), aDoubleRef( r.aDoubleRef ) {}
|
|
|
|
virtual const SingleRefData& GetSingleRef() const;
|
|
|
|
virtual SingleRefData& GetSingleRef();
|
|
|
|
virtual const ComplRefData& GetDoubleRef() const;
|
|
|
|
virtual ComplRefData& GetDoubleRef();
|
|
|
|
virtual const SingleRefData& GetSingleRef2() const;
|
|
|
|
virtual SingleRefData& GetSingleRef2();
|
|
|
|
virtual void CalcAbsIfRel( const ScAddress& );
|
|
|
|
virtual void CalcRelFromAbs( const ScAddress& );
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-02-21 11:39:37 -06:00
|
|
|
class ScMatrixToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
2004-03-08 04:42:25 -06:00
|
|
|
ScMatrixRef pMatrix;
|
2001-02-21 11:39:37 -06:00
|
|
|
public:
|
|
|
|
ScMatrixToken( ScMatrix* p ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScToken( svMatrix ), pMatrix( p ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScMatrixToken( const ScMatrixToken& r ) :
|
|
|
|
ScToken( r ), pMatrix( r.pMatrix ) {}
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
virtual const ScMatrix* GetMatrix() const;
|
|
|
|
virtual ScMatrix* GetMatrix();
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
class ScIndexToken : public ScOpToken
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
USHORT nIndex;
|
|
|
|
public:
|
|
|
|
ScIndexToken( OpCode e, USHORT n ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, svIndex ), nIndex( n ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScIndexToken( const ScIndexToken& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( r ), nIndex( r.nIndex ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual USHORT GetIndex() const;
|
|
|
|
virtual void SetIndex( USHORT n );
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
class ScJumpToken : public ScOpToken
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
short* pJump;
|
|
|
|
public:
|
|
|
|
ScJumpToken( OpCode e, short* p ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, svJump )
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
pJump = new short[ p[0] + 1 ];
|
|
|
|
memcpy( pJump, p, (p[0] + 1) * sizeof(short) );
|
|
|
|
}
|
|
|
|
ScJumpToken( const ScJumpToken& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( r )
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
pJump = new short[ r.pJump[0] + 1 ];
|
|
|
|
memcpy( pJump, r.pJump, (r.pJump[0] + 1) * sizeof(short) );
|
|
|
|
}
|
|
|
|
virtual ~ScJumpToken();
|
|
|
|
virtual short* GetJump() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
2004-03-08 04:42:25 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Only created from within the interpreter, no conversion from ScRawToken,
|
|
|
|
// never added to ScTokenArray!
|
|
|
|
class ScJumpMatrixToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
ScJumpMatrix* pJumpMatrix;
|
|
|
|
public:
|
|
|
|
ScJumpMatrixToken( ScJumpMatrix* p ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScToken( svJumpMatrix ), pJumpMatrix( p ) {}
|
2004-03-08 04:42:25 -06:00
|
|
|
ScJumpMatrixToken( const ScJumpMatrixToken& r ) :
|
|
|
|
ScToken( r ), pJumpMatrix( r.pJumpMatrix ) {}
|
2005-03-29 06:29:38 -06:00
|
|
|
virtual ~ScJumpMatrixToken();
|
2004-03-08 04:42:25 -06:00
|
|
|
virtual ScJumpMatrix* GetJumpMatrix() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
2001-02-21 11:39:37 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
// Only created from within the interpreter, no conversion from ScRawToken,
|
|
|
|
// never added to ScTokenArray!
|
|
|
|
class ScRefListToken : public ScToken
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
ScRefList aRefList;
|
|
|
|
public:
|
|
|
|
ScRefListToken() :
|
|
|
|
ScToken( svRefList ) {}
|
|
|
|
ScRefListToken( const ScRefListToken & r ) :
|
|
|
|
ScToken( r ), aRefList( r.aRefList ) {}
|
|
|
|
virtual void CalcAbsIfRel( const ScAddress& );
|
|
|
|
virtual void CalcRelFromAbs( const ScAddress& );
|
|
|
|
virtual const ScRefList* GetRefList() const;
|
|
|
|
virtual ScRefList* GetRefList();
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ScExternalToken : public ScOpToken
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
String aExternal;
|
|
|
|
BYTE nByte;
|
|
|
|
public:
|
|
|
|
ScExternalToken( OpCode e, BYTE n, const String& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, svExternal ), aExternal( r ),
|
2005-03-08 04:28:51 -06:00
|
|
|
nByte( n ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScExternalToken( OpCode e, const String& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( e, svExternal ), aExternal( r ),
|
2005-03-08 04:28:51 -06:00
|
|
|
nByte( 0 ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScExternalToken( const ScExternalToken& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( r ), aExternal( r.aExternal ),
|
2005-03-08 04:28:51 -06:00
|
|
|
nByte( r.nByte ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual const String& GetExternal() const;
|
|
|
|
virtual BYTE GetByte() const;
|
|
|
|
virtual void SetByte( BYTE n );
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
class ScMissingToken : public ScOpToken
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ScMissingToken() :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( ocMissing, svMissing ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
ScMissingToken( const ScMissingToken& r ) :
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScOpToken( r ) {}
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual double GetDouble() const;
|
|
|
|
virtual const String& GetString() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
class ScUnknownToken : public ScOpToken
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ScUnknownToken( OpCode e ) :
|
|
|
|
ScOpToken( e, svUnknown ) {}
|
|
|
|
ScUnknownToken( const ScUnknownToken& r ) :
|
|
|
|
ScOpToken( r ) {}
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ScErrorToken : public ScToken
|
|
|
|
{
|
|
|
|
USHORT nError;
|
|
|
|
public:
|
|
|
|
ScErrorToken( USHORT nErr ) :
|
|
|
|
ScToken( svError ), nError( nErr) {}
|
|
|
|
ScErrorToken( const ScErrorToken& r ) :
|
|
|
|
ScToken( r ), nError( r.nError) {}
|
|
|
|
virtual USHORT GetError() const;
|
|
|
|
virtual void SetError( USHORT nErr );
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ScEmptyCellToken : public ScToken
|
|
|
|
{
|
|
|
|
bool bInherited :1;
|
|
|
|
bool bDisplayedAsString :1;
|
|
|
|
public:
|
|
|
|
explicit ScEmptyCellToken( bool bInheritedP, bool bDisplayAsString ) :
|
|
|
|
ScToken( svEmptyCell ),
|
|
|
|
bInherited( bInheritedP ),
|
|
|
|
bDisplayedAsString( bDisplayAsString ) {}
|
|
|
|
ScEmptyCellToken( const ScEmptyCellToken& r ) :
|
|
|
|
ScToken( r ),
|
|
|
|
bInherited( r.bInherited ),
|
|
|
|
bDisplayedAsString( r.bDisplayedAsString ) {}
|
|
|
|
bool IsInherited() const { return bInherited; }
|
|
|
|
bool IsDisplayedAsString() const { return bDisplayedAsString; }
|
|
|
|
virtual double GetDouble() const;
|
|
|
|
virtual const String & GetString() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** Transports the result from the interpreter to the formula cell. */
|
|
|
|
class ScMatrixCellResultToken : public ScToken
|
|
|
|
{
|
|
|
|
// No non-const access implemented, silence down unxsols4 complaining about
|
|
|
|
// the public GetMatrix() hiding the one from ScToken.
|
|
|
|
virtual ScMatrix* GetMatrix();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
ScConstMatrixRef xMatrix;
|
|
|
|
ScConstTokenRef xUpperLeft;
|
|
|
|
public:
|
|
|
|
ScMatrixCellResultToken( ScMatrix* pMat, ScToken* pUL ) :
|
|
|
|
ScToken( svMatrixCell ),
|
|
|
|
xMatrix( pMat), xUpperLeft( pUL) {}
|
|
|
|
ScMatrixCellResultToken( const ScMatrixCellResultToken& r ) :
|
|
|
|
ScToken( r ), xMatrix( r.xMatrix ),
|
|
|
|
xUpperLeft( r.xUpperLeft ) {}
|
|
|
|
virtual double GetDouble() const;
|
|
|
|
virtual const String & GetString() const;
|
|
|
|
virtual const ScMatrix* GetMatrix() const;
|
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
StackVar GetUpperLeftType() const
|
|
|
|
{
|
|
|
|
return xUpperLeft ?
|
|
|
|
xUpperLeft->GetType() :
|
|
|
|
static_cast<StackVar>(svUnknown);
|
|
|
|
}
|
|
|
|
ScConstTokenRef GetUpperLeftToken() const { return xUpperLeft; }
|
|
|
|
void Assign( const ScMatrixCellResultToken & r )
|
|
|
|
{
|
|
|
|
xMatrix = r.xMatrix;
|
|
|
|
xUpperLeft = r.xUpperLeft;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** Stores the matrix result at the formula cell, additionally the range the
|
|
|
|
matrix formula occupies. */
|
|
|
|
class ScMatrixFormulaCellToken : public ScMatrixCellResultToken
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
private:
|
|
|
|
SCROW nRows;
|
|
|
|
SCCOL nCols;
|
2001-02-21 11:39:37 -06:00
|
|
|
public:
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScMatrixFormulaCellToken( SCCOL nC, SCROW nR ) :
|
|
|
|
ScMatrixCellResultToken( NULL, NULL ),
|
|
|
|
nRows( nR ), nCols( nC ) {}
|
|
|
|
ScMatrixFormulaCellToken( const ScMatrixFormulaCellToken& r ) :
|
|
|
|
ScMatrixCellResultToken( r ),
|
|
|
|
nRows( r.nRows ), nCols( r.nCols )
|
|
|
|
{
|
|
|
|
// xUpperLeft is modifiable through
|
|
|
|
// SetUpperLeftDouble(), so clone it.
|
|
|
|
if (xUpperLeft)
|
|
|
|
xUpperLeft = xUpperLeft->Clone();
|
|
|
|
}
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
void SetMatColsRows( SCCOL nC, SCROW nR )
|
|
|
|
{
|
|
|
|
nRows = nR;
|
|
|
|
nCols = nC;
|
|
|
|
}
|
|
|
|
void GetMatColsRows( SCCOL & nC, SCROW & nR ) const
|
|
|
|
{
|
|
|
|
nR = nRows;
|
|
|
|
nC = nCols;
|
|
|
|
}
|
|
|
|
SCCOL GetMatCols() const { return nCols; }
|
|
|
|
SCROW GetMatRows() const { return nRows; }
|
|
|
|
|
|
|
|
/** Assign matrix result, keep matrix formula
|
|
|
|
dimension. */
|
|
|
|
void Assign( const ScMatrixCellResultToken & r )
|
|
|
|
{
|
|
|
|
ScMatrixCellResultToken::Assign( r);
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Assign any result, keep matrix formula
|
|
|
|
dimension. If token is of type
|
|
|
|
ScMatrixCellResultToken uses the
|
|
|
|
appropriate Assign() call, other tokens
|
|
|
|
are assigned to xUpperLeft and xMatrix will
|
|
|
|
be assigned NULL. */
|
|
|
|
void Assign( const ScToken & r );
|
|
|
|
|
|
|
|
/** Modify xUpperLeft if svDouble, or create
|
|
|
|
new ScDoubleToken if not set yet. Does
|
|
|
|
nothing if xUpperLeft is of different type! */
|
|
|
|
void SetUpperLeftDouble( double f);
|
|
|
|
|
|
|
|
/** Reset matrix and upper left, keep matrix
|
|
|
|
formula dimension. */
|
|
|
|
void ResetResult()
|
|
|
|
{
|
|
|
|
xMatrix = NULL;
|
|
|
|
xUpperLeft = NULL;
|
|
|
|
}
|
2001-02-21 11:39:37 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
class ScHybridCellToken : public ScToken
|
2001-02-21 11:39:37 -06:00
|
|
|
{
|
|
|
|
private:
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
double fDouble;
|
|
|
|
String aString;
|
|
|
|
String aFormula;
|
2001-02-21 11:39:37 -06:00
|
|
|
public:
|
INTEGRATION: CWS odff (1.13.60); FILE MERGED
2008/02/20 16:41:50 er 1.13.60.18: #i32340# ISBLANK needs to distinguish between inherited / non-inherited emptiness; corrected ISNUMBER and ISTEXT/ISNONTEXT handling of svEmptyCell
2008/02/15 14:23:03 er 1.13.60.17: #i81063# grammar here, grammar there, grammar everywhere
2008/02/07 13:10:01 er 1.13.60.16: Always wanted to do this, now I'm taking the opportunity: :retab on selected files and all tabs are gone, producing hopefully easier to read diffs in future.
2008/02/06 16:15:17 er 1.13.60.15: warning-free
2008/02/05 17:59:04 er 1.13.60.14: #i77280# treat undefined name as usual ocBad ScStringOpToken, so ISERROR(undefinedname) yields TRUE; => ocBad doesn't terminate compilation anymore.
2008/01/31 15:34:21 er 1.13.60.13: #i32340# ScFormulaResult, third wave
2008/01/24 20:42:16 er 1.13.60.12: #i32340# ScFormulaResult, handle error code and matrix clone
2008/01/24 16:41:00 er 1.13.60.11: #i32340# variable cell result ScFormulaResult, second wave
2008/01/21 20:07:30 er 1.13.60.10: satisfy compilers
2008/01/21 19:58:40 er 1.13.60.9: make 'enum is int' conditional return happy
2008/01/18 20:45:33 er 1.13.60.8: ScToken base class without OpCode member but implicit ocPush, derived ScOpToken class to inherit from if explicit OpCode needed; this saves 2 bytes on each (!) allocation of ScDoubleToken, ScStringToken, ScSingleRefToken, ScDoubleRefToken. And there are zillions..
2008/01/17 17:31:33 er 1.13.60.7: #i32340# variable cell result ScFormulaResult, first wave
2008/01/10 16:54:26 er 1.13.60.6: introduce ScErrorToken, get rid of secondary error stack
2008/01/08 21:09:26 er 1.13.60.5: rename StackVar svErr to svUnknown
2008/01/08 20:44:14 er 1.13.60.4: get rid of distracting binfilter legacy
2008/01/08 19:30:26 er 1.13.60.3: get rid of distracting binfilter legacy
2007/12/17 15:59:33 er 1.13.60.2: #i32341# union / range list operator ocUnion; first wave
2007/11/29 19:06:45 er 1.13.60.1: #i4904# range operator ocRange
2008-03-06 08:20:53 -06:00
|
|
|
ScHybridCellToken( double f,
|
|
|
|
const String & rStr,
|
|
|
|
const String & rFormula ) :
|
|
|
|
ScToken( svHybridCell ),
|
|
|
|
fDouble( f ), aString( rStr ),
|
|
|
|
aFormula( rFormula ) {}
|
|
|
|
ScHybridCellToken( const ScHybridCellToken& r ) :
|
|
|
|
ScToken( r ), fDouble( r.fDouble),
|
|
|
|
aString( r.aString), aFormula( r.aFormula) {}
|
|
|
|
const String & GetFormula() const { return aFormula; }
|
|
|
|
virtual double GetDouble() const;
|
|
|
|
virtual const String & GetString() const;
|
2001-02-21 11:39:37 -06:00
|
|
|
virtual BOOL operator==( const ScToken& rToken ) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Simplify argument passing to RefUpdate methods with ScSingleRefToken or
|
|
|
|
// ScDoubleRefToken
|
|
|
|
class SingleDoubleRefModifier
|
|
|
|
{
|
|
|
|
ComplRefData aDub;
|
2003-06-12 04:17:25 -05:00
|
|
|
SingleRefData* pS;
|
|
|
|
ComplRefData* pD;
|
|
|
|
|
|
|
|
// not implemented, prevent usage
|
|
|
|
SingleDoubleRefModifier( const SingleDoubleRefModifier& );
|
|
|
|
SingleDoubleRefModifier& operator=( const SingleDoubleRefModifier& );
|
2001-02-21 11:39:37 -06:00
|
|
|
|
|
|
|
public:
|
2003-06-12 04:17:25 -05:00
|
|
|
SingleDoubleRefModifier( ScToken& rT )
|
|
|
|
{
|
|
|
|
if ( rT.GetType() == svSingleRef )
|
|
|
|
{
|
|
|
|
pS = &rT.GetSingleRef();
|
|
|
|
aDub.Ref1 = aDub.Ref2 = *pS;
|
|
|
|
pD = &aDub;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pS = 0;
|
|
|
|
pD = &rT.GetDoubleRef();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SingleDoubleRefModifier( SingleRefData& rS )
|
|
|
|
{
|
|
|
|
pS = &rS;
|
|
|
|
aDub.Ref1 = aDub.Ref2 = *pS;
|
|
|
|
pD = &aDub;
|
|
|
|
}
|
2001-02-21 11:39:37 -06:00
|
|
|
~SingleDoubleRefModifier()
|
2003-06-12 04:17:25 -05:00
|
|
|
{
|
|
|
|
if ( pS )
|
|
|
|
*pS = (*pD).Ref1;
|
|
|
|
}
|
|
|
|
inline ComplRefData& Ref() { return *pD; }
|
2001-02-21 11:39:37 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
class SingleDoubleRefProvider
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
const SingleRefData& Ref1;
|
|
|
|
const SingleRefData& Ref2;
|
|
|
|
|
|
|
|
SingleDoubleRefProvider( const ScToken& r )
|
|
|
|
: Ref1( r.GetSingleRef() ),
|
|
|
|
Ref2( r.GetType() == svDoubleRef ?
|
|
|
|
r.GetDoubleRef().Ref2 : Ref1 )
|
|
|
|
{}
|
|
|
|
SingleDoubleRefProvider( const SingleRefData& r )
|
|
|
|
: Ref1( r ), Ref2( r )
|
|
|
|
{}
|
|
|
|
SingleDoubleRefProvider( const ComplRefData& r )
|
|
|
|
: Ref1( r.Ref1 ), Ref2( r.Ref2 )
|
|
|
|
{}
|
|
|
|
~SingleDoubleRefProvider()
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|