[gnumeric] erf import/export from/to xlsx



commit 5581d9bba3997d2be2f012e88badaa778083f593
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Jun 26 09:00:30 2013 -0600

    erf import/export from/to xlsx
    
    2013-06-26  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * xlsx-utils.c (xlsx_func_erf_output_handler): new
        (xlsx_conventions_new): connect the above and add erf.precise
        translation

 plugins/excel/ChangeLog    |    6 ++++++
 plugins/excel/xlsx-utils.c |   15 +++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index f2110aa..6967278 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,11 @@
 2013-06-26  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * xlsx-utils.c (xlsx_func_erf_output_handler): new
+       (xlsx_conventions_new): connect the above and add erf.precise 
+       translation
+
+2013-06-26  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * xlsx-utils.c (xlsx_conventions_new): add MODE.SNGL
        translation
 
diff --git a/plugins/excel/xlsx-utils.c b/plugins/excel/xlsx-utils.c
index 3bdc507..a8bea03 100644
--- a/plugins/excel/xlsx-utils.c
+++ b/plugins/excel/xlsx-utils.c
@@ -412,6 +412,18 @@ xlsx_func_floor_output_handler (GnmConventionsOut *out, GnmExprFunction const *f
        return FALSE;
 }
 
+static gboolean
+xlsx_func_erf_output_handler (GnmConventionsOut *out, GnmExprFunction const *func)
+{
+       /* func->argc == 1 is handled by the translation */
+       if (func->argc != 1) {
+               g_string_append (out->accum, "ERF");
+               gnm_expr_list_as_string (func->argc, func->argv, out);
+               return TRUE;
+       }
+       return FALSE;
+}
+
 
 GnmConventions *
 xlsx_conventions_new (gboolean output)
@@ -436,6 +448,7 @@ xlsx_conventions_new (gboolean output)
                {"R.QLNORM", xlsx_func_lognorminv_output_handler},
                {"R.QNORM", xlsx_func_norminv_output_handler},
                {"R.QT", xlsx_func_tinv_output_handler},
+               {"ERF", xlsx_func_erf_output_handler},
                {"FLOOR", xlsx_func_floor_output_handler},
                {NULL, NULL}
        };
@@ -453,6 +466,8 @@ xlsx_conventions_new (gboolean output)
                { "CHISQ.TEST", "CHITEST" },
                { "CONFIDENCE.NORM", "CONFIDENCE" },
                { "COVARIANCE.P", "COVAR" },
+               { "ERF.PRECISE", "ERF" },
+               { "ERFC.PRECISE", "ERFC" },
                { "EXPON.DIST", "EXPONDIST" },
                { "F.DIST.RT", "FDIST" },
                { "F.INV", "R.QF" }, /* see output handler */


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