[gnumeric] lognorm.dist and megbinom.dist import from xlsx



commit bd4c1ebf737bb58ff9735f77ffbf907a613bcaa0
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Thu Jun 27 00:47:07 2013 -0600

    lognorm.dist and megbinom.dist import from xlsx
    
    2013-06-27  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * xlsx-utils.c (xlsx_func_lognormdist_handler): new
        (xlsx_func_negbinomdist_handler): new
        (xlsx_conventions_new): connect the above two

 plugins/excel/ChangeLog    |    8 +++++++-
 plugins/excel/xlsx-utils.c |   20 +++++++++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index d1cd2b0..847a6b2 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,6 +1,12 @@
+2013-06-27  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * xlsx-utils.c (xlsx_func_lognormdist_handler): new
+       (xlsx_func_negbinomdist_handler): new
+       (xlsx_conventions_new): connect the above two
+
 2013-06-26  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-       * xlsx-utils.c (lsx_func_binominv_handler): use GnmExprList
+       * xlsx-utils.c (xlsx_func_binominv_handler): use GnmExprList
        rather than GSList
        (xlsx_func_dist_handler): new
        (xlsx_func_chisqdist_handler): new
diff --git a/plugins/excel/xlsx-utils.c b/plugins/excel/xlsx-utils.c
index 22a114b..e1107c9 100644
--- a/plugins/excel/xlsx-utils.c
+++ b/plugins/excel/xlsx-utils.c
@@ -256,11 +256,27 @@ xlsx_func_chisqdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_U
 }
 
 static GnmExpr const *
-xlsx_func_fdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope, 
GnmExprList *args)
+xlsx_func_fdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope, 
+                        GnmExprList *args)
 {
        return xlsx_func_dist_handler (args, 4, "f.dist", "r.pf", "r.df");
 }
 
+static GnmExpr const *
+xlsx_func_lognormdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope, 
+                              GnmExprList *args)
+{
+       return xlsx_func_dist_handler (args, 4, "lognorm.dist", "r.plnorm", "r.dlnorm");
+}
+
+static GnmExpr const *
+xlsx_func_negbinomdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope, 
+                               GnmExprList *args)
+{
+       return xlsx_func_dist_handler (args, 4, "negbinom.dist", "r.pnbinom", "r.dnbinom");
+}
+
+
 
 static void
 xlsx_write_r_q_func (GnmConventionsOut *out, char const *name, char const *name_rt, 
@@ -486,6 +502,8 @@ xlsx_conventions_new (gboolean output)
                {"BINOM.INV", xlsx_func_binominv_handler},
                {"CHISQ.DIST", xlsx_func_chisqdist_handler},
                {"F.DIST", xlsx_func_fdist_handler},
+               {"NEGBINOM.DIST", xlsx_func_negbinomdist_handler},
+               {"LOGNORM.DIST", xlsx_func_lognormdist_handler},
                {NULL, NULL}
        };
 


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