[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Apr 14 18:50:53 PDT 2011
sc/source/core/tool/compiler.cxx | 1 +
sc/source/filter/excel/excform.cxx | 13 -------------
2 files changed, 1 insertion(+), 13 deletions(-)
New commits:
commit 55ae621273805d4306fbc54b0a5f8849835d8659
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Thu Apr 14 19:13:47 2011 -0400
fdo#34306: Insert a missing token for an ocSep followed by an ocClose.
Turns out that this behavior is more compatible with Excel's own
formula parser, *and* it fixes the error when parsing the test
document from the bug.
With this, we don't have to skip the trailing missing parameters
when importing XLS docs.
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 0e186fe..7ebcb9f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3788,6 +3788,7 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula )
eLastOp == ocArrayColSep ||
eLastOp == ocArrayOpen) &&
(eOp == ocSep ||
+ eOp == ocClose ||
eOp == ocArrayRowSep ||
eOp == ocArrayColSep ||
eOp == ocArrayClose) )
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index ebf0d8e..d83297b 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -1589,19 +1589,6 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo
}
}
- // FIXME: ideally we'd want to import all missing args, but this
- // conflicts with lots of fn's understanding of nParams - we need
- // a function table, and pre-call argument normalisation 1st.
- sal_Int16 nLastRemovable = nLast - nMinParamCount;
-
- // skip missing parameters at end of parameter list
- while( nSkipEnd < nLastRemovable &&
- aPool.IsSingleOp( eParam[ nSkipEnd + 1 ], ocMissing ) )
- nSkipEnd++;
-
-// fprintf (stderr, "Fn %d nSkipEnd %d nLast %d nMinParamCnt %d %d\n",
-// eId, nSkipEnd, nLast, nMinParamCount, nLastRemovable);
-
// [Parameter{;Parameter}]
if( nLast > nSkipEnd )
{
More information about the Libreoffice-commits
mailing list