summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-12-23 12:14:45 -0500
committerJan Holesovsky <kendy@suse.cz>2010-12-29 13:27:55 +0100
commit208ef6386f934012bcc7bbdbc2271ebd04952536 (patch)
tree85cd2fd1d8cebb95cb64cac73554e7ee14a08a28
parent25aea9775c2e6777c998d2db7d2d5d5314129fd0 (diff)
Remove bogus check for numerical sheet names. (fdo#32570)
We apparently put numerical sheet name into quotes somewhere else, so checking for a number followed by a '.' and flagging it as bad is not only necessary, it's not appropriate. E.g. we do support other formula syntax where the sheet-to-reference separator is not '.' (Excel A1 and Excel R1C1), thereby making this test even more inappropriate. Signed-off-by: Jan Holesovsky <kendy@suse.cz>
-rw-r--r--sc/source/core/tool/compiler.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e93f25a47..efbbb9239 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2663,8 +2663,7 @@ BOOL ScCompiler::IsValue( const String& rSym )
double fVal;
sal_uInt32 nIndex = ( mxSymbols->isEnglish() ?
pDoc->GetFormatTable()->GetStandardIndex( LANGUAGE_ENGLISH_US ) : 0 );
-// ULONG nIndex = 0;
-//// ULONG nIndex = pDoc->GetFormatTable()->GetStandardIndex(ScGlobal::eLnge);
+
if (pDoc->GetFormatTable()->IsNumberFormat( rSym, nIndex, fVal ) )
{
USHORT nType = pDoc->GetFormatTable()->GetType(nIndex);
@@ -2686,10 +2685,6 @@ BOOL ScCompiler::IsValue( const String& rSym )
return FALSE; // Boolean function instead.
}
- if( aFormula.GetChar(nSrcPos) == '.' )
- // numerical sheet name?
- return FALSE;
-
if( nType == NUMBERFORMAT_TEXT )
// HACK: number too big!
SetError( errIllegalArgument );