From 208ef6386f934012bcc7bbdbc2271ebd04952536 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 23 Dec 2010 12:14:45 -0500 Subject: 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 --- sc/source/core/tool/compiler.cxx | 7 +------ 1 file changed, 1 insertion(+), 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 ); -- cgit v1.2.3