[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Dec 23 09:18:17 PST 2010


 sc/source/core/tool/compiler.cxx |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 98764831e3b6c02d7630c61a6c389ce4318787bd
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Dec 23 12:14:45 2010 -0500

    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.

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index d12e2cc..8ea4217 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2658,8 +2658,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);
@@ -2681,10 +2680,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 );


More information about the Libreoffice-commits mailing list