summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-06-26 02:05:09 +0200
committerEike Rathke <erack@redhat.com>2012-06-26 02:17:12 +0200
commit1135bfd78802e5c40ca09bcbc75d0908a423872a (patch)
tree7ee48a2cf6ed3153bd1b77553c96221a82555286 /sc/inc
parentff27d84e08951660edb77938db6ee7dbf806f4f8 (diff)
fdo#46338 preserve sheet name input of invalid reference
If sheet name doesn't exist the resulting reference had replaced the sheet name with #REF!, e.g. #REF!.A1, because the actual sheet name is not part of the reference. From a syntactically valid but otherwise invalid non-external reference create an ocBad token instead to preserve the sheet name. Currently a #NAME? error instead of #REF! is generated, further work would be needed to pass specific error values with ocBad. Change-Id: I5a608a74d3b3ff2baa4967f2b2e3078cfecfbabc
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/compiler.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 58a3c6c6f918..470d8eb8afd1 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -196,6 +196,13 @@ public:
void SetMatrix( ScMatrix* p );
void SetExternal(const sal_Unicode* pStr);
+ /** If the token is a non-external reference, determine if the reference is
+ valid. If the token is an external reference, return true. Else return
+ false. Used only in ScCompiler::NextNewToken() to preserve non-existing
+ sheet names in otherwise valid references.
+ */
+ bool IsValidReference() const;
+
ScRawToken* Clone() const; // real copy!
formula::FormulaToken* CreateToken() const; // create typified token
void Load( SvStream&, sal_uInt16 nVer );