summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/compiler.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2bec06721c86..80f37a447932 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2995,15 +2995,19 @@ bool ScCompiler::IsReference( const OUString& rName )
}
else
{
- // Special treatment for the 'E:\[doc]Sheet1:Sheet3'!D5 Excel sickness,
- // mnRangeOpPosInSymbol did not catch the range operator as it is
- // within a quoted name.
switch (pConv->meConv)
{
case FormulaGrammar::CONV_XL_A1:
- case FormulaGrammar::CONV_XL_R1C1:
case FormulaGrammar::CONV_XL_OOX:
- if (rName[0] == '\'' && IsDoubleReference( rName))
+ // Special treatment for the 'E:\[doc]Sheet1:Sheet3'!D5 Excel
+ // sickness, mnRangeOpPosInSymbol did not catch the range
+ // operator as it is within a quoted name.
+ if (rName[0] != '\'')
+ return false; // Document name has to be single quoted.
+ // fallthru
+ case FormulaGrammar::CONV_XL_R1C1:
+ // C2 or C[1] are valid entire column references.
+ if (IsDoubleReference( rName))
return true;
break;
default: