[gnumeric] Fix ODF export/import of new functions



commit 7f77ef7414de55789dfd12f6c4b1e9ec033d94a6
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Tue Aug 9 21:43:47 2016 -0600

    Fix ODF export/import of new functions
    
    2016-08-09  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (oo_func_map_in): remove unneccessary COUNTIFS,
        AVERAGEIFS, and SUMIFS
        * openoffice-write.c (odf_expr_func_handler): add/correct export of COUNTIFS,
        IFS, SWITCH, MAXIFS & MINIFS

 plugins/openoffice/ChangeLog          |    7 +++++++
 plugins/openoffice/openoffice-read.c  |    3 ---
 plugins/openoffice/openoffice-write.c |   10 +++++-----
 3 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 0ce676c..5158e6f 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,10 @@
+2016-08-09  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-read.c (oo_func_map_in): remove unneccessary COUNTIFS,
+       AVERAGEIFS, and SUMIFS
+       * openoffice-write.c (odf_expr_func_handler): add/correct export of COUNTIFS,
+       IFS, SWITCH, MAXIFS & MINIFS
+
 2016-08-04  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-write.c (odf_expr_func_handler): export TEXTJOIN and
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index d57255a..43357de 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -12874,14 +12874,12 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
 /* The following is a list of the functions defined in ODF OpenFormula draft 20090508 */
 /* where we do not have a function with the same name                                 */
 
-               { "COUNTIFS","ODF.COUNTIFS" },
                { "DDE","ODF.DDE" },
                { "MULTIPLE.OPERATIONS","ODF.MULTIPLE.OPERATIONS" },
 
 /* The following is a complete list of the functions defined in ODF OpenFormula draft 20090508 */
 /* We should determine whether any mapping is needed. */
 
-               { "AVERAGEIFS","AVERAGEIFS" },
                { "B","BINOM.DIST.RANGE" },
                { "CEILING","ODF.CEILING" },          /* see handler */
                { "CHISQINV","R.QCHISQ" },
@@ -12950,7 +12948,6 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
                { "RANK.AVG","RANK.AVG" },
                { "STDEV.S","STDEV" },
                { "STDEV.P","STDEVP" },
-               { "SUMIFS", "SUMIFS" },
                { "SWITCH", "SWITCH" },
                { "T.INV","R.QT" },
                { "T.INV.2T","TINV" },
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 000a703..390f794 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -2312,7 +2312,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
                { "COUNTA","COUNTA" },
                { "COUNTBLANK","COUNTBLANK" },
                { "COUNTIF","COUNTIF" },
-               /* { "COUNTIFS","COUNTIFS" },  not implemented */
+               { "COUNTIFS","COUNTIFS" },
                { "COUPDAYBS","COUPDAYBS" },
                { "COUPDAYS","COUPDAYS" },
                { "COUPDAYSNC","COUPDAYSNC" },
@@ -2405,7 +2405,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
                { "IF","IF" },
                { "IFERROR","IFERROR" },
                { "IFNA","IFNA" },
-               { "IFS","IFS" },
+               { "IFS","COM.MICROSOFT.IFS" },
                { "IMABS","IMABS" },
                { "IMAGINARY","IMAGINARY" },
                { "IMARGUMENT","IMARGUMENT" },
@@ -2479,7 +2479,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
                { "MATCH","MATCH" },
                { "MAX","MAX" },
                { "MAXA","MAXA" },
-               { "MAXIFS","MAXIFS" },
+               { "MAXIFS","COM.MICROSOFT.MAXIFS" },
                { "MDETERM","MDETERM" },
                { "MDURATION","MDURATION" },
                { "MEDIAN","MEDIAN" },
@@ -2487,7 +2487,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
                { "MIDB","MIDB" },
                { "MIN","MIN" },
                { "MINA","MINA" },
-               { "MINIFS","MINIFS" },
+               { "MINIFS","COM.MICROSOFT.MINIFS" },
                { "MINUTE","MINUTE" },
                { "MINVERSE","MINVERSE" },
                { "MIRR","MIRR" },
@@ -2600,7 +2600,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
                { "SUMX2MY2","SUMX2MY2" },
                { "SUMX2PY2","SUMX2PY2" },
                { "SUMXMY2","SUMXMY2" },
-               { "SWITCH", "SWITCH" },
+               { "SWITCH", "COM.MICROSOFT.SWITCH" },
                { "SYD","SYD" },
                { "T","T" },
                { "TAN","TAN" },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]