summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-07-19 13:09:20 +0200
committerKohei Yoshida <kyoshida@novell.com>2011-07-19 11:06:28 -0400
commitd688aee70f87acbfe273b814d21b5dba343fc9d9 (patch)
tree2161f64594742d96be656d29df782238a276edf9
parentebbfde5d84d52b25d4efe86399a573c79e67f46d (diff)
fix for fdo#39333: database ranges don't work in formulas
Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
-rw-r--r--sc/inc/token.hxx2
-rw-r--r--sc/source/core/tool/token.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index 78364e938..ce16c1731 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -244,7 +244,7 @@ private:
private:
ScNameToken(); // disabled
public:
- ScNameToken(sal_uInt16 nIndex, bool bGlobal);
+ ScNameToken(sal_uInt16 nIndex, bool bGlobal, OpCode eOpCode = ocName);
ScNameToken(const ScNameToken& r);
virtual ~ScNameToken();
virtual sal_uInt8 GetByte() const;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 0153ca4cd..1cf448e47 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -380,7 +380,7 @@ FormulaToken* ScRawToken::CreateToken() const
IF_NOT_OPCODE_ERROR( ocPush, ScMatrixToken);
return new ScMatrixToken( pMat );
case svIndex :
- return new ScNameToken(name.nIndex, name.bGlobal);
+ return new ScNameToken(name.nIndex, name.bGlobal, eOp);
case svExternalSingleRef:
{
String aTabName(extref.cTabName);
@@ -949,8 +949,8 @@ bool ScExternalDoubleRefToken::operator ==( const FormulaToken& r ) const
// ============================================================================
-ScNameToken::ScNameToken(sal_uInt16 nIndex, bool bGlobal) :
- ScToken(svIndex, ocName), mnIndex(nIndex), mbGlobal(bGlobal) {}
+ScNameToken::ScNameToken(sal_uInt16 nIndex, bool bGlobal, OpCode eOpCode) :
+ ScToken(svIndex, eOpCode), mnIndex(nIndex), mbGlobal(bGlobal) {}
ScNameToken::ScNameToken(const ScNameToken& r) :
ScToken(r), mnIndex(r.mnIndex), mbGlobal(r.mbGlobal) {}