incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject svn commit: r1352412 - /incubator/ooo/trunk/main/sc/source/filter/excel/excform.cxx
Date Thu, 21 Jun 2012 05:25:49 GMT
Author: leiw
Date: Thu Jun 21 05:25:48 2012
New Revision: 1352412

URL: http://svn.apache.org/viewvc?rev=1352412&view=rev
Log:
#i119942 - Last agrument of formula should not be removed

          Patch by: Zhang Lu
          Review by: Wang Lei

Modified:
    incubator/ooo/trunk/main/sc/source/filter/excel/excform.cxx

Modified: incubator/ooo/trunk/main/sc/source/filter/excel/excform.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/filter/excel/excform.cxx?rev=1352412&r1=1352411&r2=1352412&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/filter/excel/excform.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/filter/excel/excform.cxx Thu Jun 21 05:25:48 2012
@@ -1525,6 +1525,37 @@ sal_Bool ExcelToSc::GetAbsRefs( ScRangeL
     return rRangeList.Count() != 0;
 }
 
+static DefTokenId missArgForZeroList[] = {
+	ocCount,
+	ocCount2,
+	ocAverage,
+	ocMin,
+	ocMinA,
+	ocMax,
+	ocMaxA,
+	ocStDev,
+	ocStDevA,
+	ocVar,
+	ocVarP,
+	ocAveDev,
+	ocKurt,
+	ocSchiefe,
+	ocVarPA,
+	ocVarA,
+	ocDevSq
+};
+
+#define missArgForZeroCount sizeof(missArgForZeroList)/sizeof(DefTokenId)
+
+
+sal_Bool lcl_isInMissArgForZeroList(DefTokenId id)
+{
+	for(short index = 0; index < missArgForZeroCount; index++)
+		if(missArgForZeroList[index] == id)
+			return sal_True;
+	return sal_False;
+
+}
 void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCount )
 {
 	TokenId					eParam[ 256 ];
@@ -1575,7 +1606,7 @@ void ExcelToSc::DoMulArgs( DefTokenId eI
 			nSkipEnd = 0;		// letzten Parameter bei Bedarf weglassen
 
 		// Joost-Spezialfaelle
-		else if( eId == ocIf )
+		else if( eId == ocIf || lcl_isInMissArgForZeroList(eId))
 		{
 			sal_uInt16			nNullParam = 0;
 			for( nLauf = 0 ; nLauf < nAnz ; nLauf++ )



Mime
View raw message