[gnumeric] Add a bunch of functions



commit 1e0c1b7fad3ceac535e9a56a51a0065cad078e72
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sun Jun 21 13:05:30 2009 -0600

    Add a bunch of functions
    
    2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* plugin.xml.in: new LEFTB, MIDB, RIGHTB
    	* functions.c: new LEFTB, MIDB, RIGHTB functions
    	(help_asc): update
    	(gnm_asc_half): new
    	(gnumeric_asc): implement
    
    2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* plugin.xml.in: new csc, csh, sec, sech
    	* functions.c: new csc, csh, sec, sech functions
    	(help_ceil): update to new format
    	(help_ceiling): ditto
    	(help_floor): ditto
    
    2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* functions.c (help_get_formula): change to new format
    
    2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* functions.c: use GNM_FUNC_HELP_EXCEL throughout and add a
    	few GNM_FUNC_HELP_ODF
    
    2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* functions.c (help_r_dchisq): add some documentation item
    	(help_r_pchisq): ditto
    	(help_r_qchisq): ditto
    
    2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* dialog-function-select.c (describe_new_style): argument
    	  descriptions may refer to other arguments. Handle
    	  GNM_FUNC_HELP_EXCEL and GNM_FUNC_HELP_ODF
    
    2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/func.h (GnmFuncHelpType): add GNM_FUNC_HELP_EXCEL and
    	  GNM_FUNC_HELP_ODF
    	* src/func.c (function_dump_defs) handle new GnmFuncHelpType
    
    2009-06-21 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-read.c (oo_func_map_in): adjust function listing
    	* openoffice-write.c (odf_func_floor_ceiling_handler):
    	  handle all instances
    	(odf_func_sec_handler): new
    	(odf_func_sech_handler): new
    	(odf_expr_func_handler): change the default behaviour to always
    	  precede functions with ORG.GNUMERIC, so we don't have to worry
    	  to miss functions from new plugins or that have been added.
    	  Also handle "ODF...." functions that were imported.

 ChangeLog                             |    6 +
 NEWS                                  |    7 +
 plugins/fn-info/ChangeLog             |    4 +
 plugins/fn-info/functions.c           |   19 +-
 plugins/fn-math/ChangeLog             |    8 +
 plugins/fn-math/functions.c           |  157 ++++--
 plugins/fn-math/plugin.xml.in         |    4 +
 plugins/fn-r/ChangeLog                |    6 +
 plugins/fn-r/functions.c              |    3 +
 plugins/fn-stat/ChangeLog             |    5 +
 plugins/fn-stat/functions.c           |  151 +++---
 plugins/fn-string/ChangeLog           |    8 +
 plugins/fn-string/functions.c         |  306 ++++++++--
 plugins/fn-string/plugin.xml.in       |    3 +
 plugins/openoffice/ChangeLog          |   12 +
 plugins/openoffice/openoffice-read.c  |   75 ++--
 plugins/openoffice/openoffice-write.c | 1006 ++++++++++++++-------------------
 src/dialogs/ChangeLog                 |    6 +
 src/dialogs/dialog-function-select.c  |   18 +-
 src/func.c                            |    3 +-
 src/func.h                            |    4 +-
 21 files changed, 1008 insertions(+), 803 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f83d6e9..08de1bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/func.h (GnmFuncHelpType): add GNM_FUNC_HELP_EXCEL and
+	  GNM_FUNC_HELP_ODF
+	* src/func.c (function_dump_defs) handle new GnmFuncHelpType
+
 2009-06-20  Morten Welinder  <terra gnome org>
 
 	* src/gui-util.c (gnumeric_restore_window_geometry): Split out
diff --git a/NEWS b/NEWS
index 6ac492d..ee507c6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
 Gnumeric 1.9.10
 
+Andreas:
+	* Improve ODF export
+	* Add OpenFormula comp. descriptors to some function documentations
+	* Implement new functions CSC, CSCH, SEC, and SECH
+	* Implement new functions LEFTB, MIDB, RIGHTB
+	* Implement ASC
+
 Morten:
 	* Make SUMIF/COUNTIF and the D* functions understand pattern. [#586215]
 	* Make dialogs remember their sizes and positions.
diff --git a/plugins/fn-info/ChangeLog b/plugins/fn-info/ChangeLog
index 2cdfc37..1de66f3 100644
--- a/plugins/fn-info/ChangeLog
+++ b/plugins/fn-info/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* functions.c (help_get_formula): change to new format
+
 2009-06-20  Morten Welinder <terra gnome org>
 
 	* Release 1.9.9
diff --git a/plugins/fn-info/functions.c b/plugins/fn-info/functions.c
index 6fa8523..671137f 100644
--- a/plugins/fn-info/functions.c
+++ b/plugins/fn-info/functions.c
@@ -1206,18 +1206,13 @@ gnumeric_expression (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_get_formula[] = {
-	{ GNM_FUNC_HELP_OLD,
-	F_("@FUNCTION=GET.FORMULA\n"
-	   "@SYNTAX=GET.FORMULA(cell)\n"
-	   "@DESCRIPTION="
-	   "EXPRESSION returns expression in @cell as a string, or "
-	   "empty if the cell is not an expression.\n"
-	   "@EXAMPLES=\n"
-	   "entering '=GET.FORMULA(A3)' in A2 = empty (assuming there is nothing in A3).\n"
-	   "entering '=GET.FORMULA(A2)' in A1 = '=GET.FORMULA(A3)'.\n"
-	   "\n"
-	   "@SEEALSO=EXPRESSION")
-	},
+	{ GNM_FUNC_HELP_NAME, F_("GET.FORMULA:The formula in the referenced cell as a string.")},
+	{ GNM_FUNC_HELP_ARG, F_("cell:the referenced cell")},
+	{ GNM_FUNC_HELP_ODF, F_("GET.FORMULA is the OpenFormula function FORMULA.") },
+	{ GNM_FUNC_HELP_EXAMPLES, F_("If A1 is empty and A2 contains =B1+B2, then\n"
+				     "GET.FORMULA(A2) yields '=B1+B2' and\n"
+				     "GET.FORMULA(A1) yields ''.") },
+	{ GNM_FUNC_HELP_SEEALSO, "EXPRESSION"},
 	{ GNM_FUNC_HELP_END }
 };
 
diff --git a/plugins/fn-math/ChangeLog b/plugins/fn-math/ChangeLog
index 5e2111d..27121f8 100644
--- a/plugins/fn-math/ChangeLog
+++ b/plugins/fn-math/ChangeLog
@@ -1,3 +1,11 @@
+2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* plugin.xml.in: new csc, csh, sec, sech
+	* functions.c: new csc, csh, sec, sech functions
+	(help_ceil): update to new format
+	(help_ceiling): ditto
+	(help_floor): ditto
+
 2009-06-20  Morten Welinder <terra gnome org>
 
 	* Release 1.9.9
diff --git a/plugins/fn-math/functions.c b/plugins/fn-math/functions.c
index a406e8a..fc66dd8 100644
--- a/plugins/fn-math/functions.c
+++ b/plugins/fn-math/functions.c
@@ -533,20 +533,14 @@ gnumeric_atan2 (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_ceil[] = {
-	{ GNM_FUNC_HELP_OLD,
-	F_("@FUNCTION=CEIL\n"
-	   "@SYNTAX=CEIL(x)\n"
-
-	   "@DESCRIPTION="
-	   "CEIL function rounds @x up to the next nearest integer.\n\n"
-	   "\n"
-	   "@EXAMPLES=\n"
-	   "CEIL(0.4) equals 1.\n"
-	   "CEIL(-1.1) equals -1.\n"
-	   "CEIL(-2.9) equals -2.\n"
-	   "\n"
-	   "@SEEALSO=CEILING, FLOOR, ABS, INT, MOD")
-	},
+	{ GNM_FUNC_HELP_NAME, F_("CEIL:smallest integer larger than or equal to @{x}")},
+	{ GNM_FUNC_HELP_ARG, F_("x:number")},	
+	{ GNM_FUNC_HELP_DESCRIPTION, F_("CEIL(@{x}) is the smallest integer that is at least as large as @{x}.")},
+	{ GNM_FUNC_HELP_ODF, F_("This function is the OpenFormula function CEILING(@{x}).")},
+	{ GNM_FUNC_HELP_EXAMPLES, F_("CEIL(0.4) equals 1.\n"
+				     "CEIL(-1.1) equals -1.\n"
+				     "CEIL(-2.9) equals -2.")},	
+	{ GNM_FUNC_HELP_SEEALSO, ("CEILING,FLOOR,ABS,INT,MOD")},
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -773,26 +767,18 @@ gnumeric_sumif (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_ceiling[] = {
-	{ GNM_FUNC_HELP_OLD,
-	F_("@FUNCTION=CEILING\n"
-	   "@SYNTAX=CEILING(x[,significance])\n"
-
-	   "@DESCRIPTION="
-	   "CEILING function rounds @x up to the nearest multiple of "
-	   "@significance.\n"
-	   "\n"
-	   "* If @x or @significance is non-numeric CEILING returns "
-	   "#VALUE! error.\n"
-	   "* If @x and @significance have different signs CEILING returns "
-	   "#NUM! error.\n"
-	   "* This function is Excel compatible.\n"
-	   "\n"
-	   "@EXAMPLES=\n"
-	   "CEILING(2.43,1) equals 3.\n"
-	   "CEILING(123.123,3) equals 126.\n"
-	   "\n"
-	   "@SEEALSO=CEIL, FLOOR, ABS, INT, MOD")
-	},
+	{ GNM_FUNC_HELP_NAME, F_("CEILING:nearest multiple of @{significance} whose absolute value is at least ABS(@{x})")},
+	{ GNM_FUNC_HELP_ARG, F_("x:number")},	
+	{ GNM_FUNC_HELP_ARG, F_("significance:base multiple (defaults to 1 for @{x} > 0 and -1 for @{x} <0)")},	
+	{ GNM_FUNC_HELP_DESCRIPTION, F_("CEILING(@{x},@{significance}) is the nearest multiple of @{significance} whose absolute value is at least ABS(@{x}).")},
+	{ GNM_FUNC_HELP_NOTE, F_("If @{x} or @{significance} is non-numeric, CEILING returns a #VALUE! error.")},
+	{ GNM_FUNC_HELP_NOTE, F_("If @{x} and @{significance} have different signs, CEILING returns a #NUM! error.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_ODF, F_("CEILING(@{x}) is exported to ODF as CEILING(@{x},SIGN(@{x}),1). CEILING(@{x},@{significance}) is the OpenFormula function CEILING(@{x},@{significance},1).")},
+	{ GNM_FUNC_HELP_EXAMPLES, F_("CEILING(2.43,1) equals 3.\n"
+				     "CEILING(123.123,3) equals 126.\n"
+				     "CEILING(-2.43,-1) equals -3.")},	
+	{ GNM_FUNC_HELP_SEEALSO, ("CEIL,FLOOR,ABS,INT,MOD")},
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -1115,13 +1101,14 @@ gnumeric_combin (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_floor[] = {
-	{ GNM_FUNC_HELP_NAME, F_("FLOOR:rounds down.") },
+	{ GNM_FUNC_HELP_NAME, F_("FLOOR:nearest multiple of @{significance} whose absolute value is at most ABS(@{x}).") },
 	{ GNM_FUNC_HELP_ARG, F_("x:value.") },
-	{ GNM_FUNC_HELP_ARG, F_("significance:base multiple (defaults to 1 for @x > 0 and -1 for @x <0)") },
+	{ GNM_FUNC_HELP_ARG, F_("significance:base multiple (defaults to 1 for @{x} > 0 and -1 for @{x} <0)") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_(
-	   "FLOOR function rounds @x down to the next nearest multiple "
-	   "of @significance.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("FLOOR(0.5) equals 0.") },
+	   "FLOOR(@{x},@{significance}) is the nearest multiple of @{significance} whose absolute value is at most ABS(@{x})") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_ODF, F_("FLOOR(@{x}) is exported to ODF as FLOOR(@{x},SIGN(@{x}),1). FLOOR(@{x},@{significance}) is the OpenFormula function FLOOR(@{x},@{significance},1).")},
+       	{ GNM_FUNC_HELP_EXAMPLES, F_("FLOOR(0.5) equals 0.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("FLOOR(5,2) equals 4.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("FLOOR(-5,-2) equals -4.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("FLOOR(-5,2) equals #NUM!.") },
@@ -1461,7 +1448,7 @@ gnumeric_radians (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 static GnmFuncHelp const help_sin[] = {
 	{ GNM_FUNC_HELP_NAME, F_("SIN:Sine function")},
 	{ GNM_FUNC_HELP_ARG, F_("x:angle in radians")},
-	{ GNM_FUNC_HELP_SEEALSO, "COS,TAN,SINH,COSH,TANH,RADIANS,DEGREES"},
+	{ GNM_FUNC_HELP_SEEALSO, "COS,TAN,CSC,SEC,SINH,COSH,TANH,RADIANS,DEGREES"},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("SIN((0.5) equals 0.479426") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:Sine.html") },
@@ -1477,6 +1464,84 @@ gnumeric_sin (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 
 /***************************************************************************/
 
+static GnmFuncHelp const help_csc[] = {
+	{ GNM_FUNC_HELP_NAME, F_("CSC:Cosecant")},
+	{ GNM_FUNC_HELP_ARG, F_("x:angle in radians")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is not Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.") },
+	{ GNM_FUNC_HELP_EXAMPLES, F_("CSC((0.5) equals 2.085829642933488") },
+	{ GNM_FUNC_HELP_SEEALSO, "SIN,COS,TAN,SEC,SINH,COSH,TANH,RADIANS,DEGREES"},
+	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:Cosecant.html") },
+	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Trigonometric_functions") },
+	{ GNM_FUNC_HELP_END }
+};
+
+static GnmValue *
+gnumeric_csc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
+{
+	return value_new_float (1./gnm_sin (value_get_as_float (argv[0])));
+}
+
+/***************************************************************************/
+
+static GnmFuncHelp const help_csch[] = {
+	{ GNM_FUNC_HELP_NAME, F_("CSC:Hyperbolic cosecant")},
+	{ GNM_FUNC_HELP_ARG, F_("x:angle in radians")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is not Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.") },
+	{ GNM_FUNC_HELP_EXAMPLES, F_("CSCH((0.5) equals 1.919034751334944") },
+	{ GNM_FUNC_HELP_SEEALSO, "SIN,COS,TAN,CSC,SEC,SINH,COSH,TANH,RADIANS,DEGREES"},
+	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:HyperbolicCosecant.html") },
+	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Hyperbolic_function") },
+	{ GNM_FUNC_HELP_END }
+};
+
+static GnmValue *
+gnumeric_csch (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
+{
+	return value_new_float (1./gnm_sinh (value_get_as_float (argv[0])));
+}
+
+/***************************************************************************/
+
+static GnmFuncHelp const help_sec[] = {
+	{ GNM_FUNC_HELP_NAME, F_("SEC:Secant")},
+	{ GNM_FUNC_HELP_ARG, F_("x:angle in radians")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is not Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("SEC(@{x}) is exported to OpenFormula as 1/COS(@{x}).") },
+	{ GNM_FUNC_HELP_EXAMPLES, F_("SEC((0.5) equals 1.139493927324549") },
+	{ GNM_FUNC_HELP_SEEALSO, "SIN,COS,TAN,CSC,SINH,COSH,TANH,RADIANS,DEGREES"},
+	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:Secant.html") },
+	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Trigonometric_functions") },
+	{ GNM_FUNC_HELP_END }
+};
+
+static GnmValue *
+gnumeric_sec (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
+{
+	return value_new_float (1./gnm_cos (value_get_as_float (argv[0])));
+}
+
+/***************************************************************************/
+
+static GnmFuncHelp const help_sech[] = {
+	{ GNM_FUNC_HELP_NAME, F_("SEC:Hyperbolic secant")},
+	{ GNM_FUNC_HELP_ARG, F_("x:angle in radians")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is not Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("SECH(@{x}) is exported to OpenFormula as 1/COSH(@{x}).") },
+	{ GNM_FUNC_HELP_EXAMPLES, F_("SECH((0.5) equals 0.88681888397007") },
+	{ GNM_FUNC_HELP_SEEALSO, "SIN,COS,TAN,CSC,SEC,SINH,COSH,TANH,RADIANS,DEGREES"},
+	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:HyperbolicSecant.html") },
+	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Hyperbolic_function") },
+	{ GNM_FUNC_HELP_END }
+};
+
+static GnmValue *
+gnumeric_sech (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
+{
+	return value_new_float (1./gnm_cosh (value_get_as_float (argv[0])));
+}
+/***************************************************************************/
 static GnmFuncHelp const help_sinh[] = {
 	{ GNM_FUNC_HELP_OLD,
 	F_("@FUNCTION=SINH\n"
@@ -3274,6 +3339,12 @@ GnmFuncDescriptor const math_functions[] = {
 	{ "combin",  "ff", N_("n,k"),      help_combin,
 	  gnumeric_combin, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
+	{ "csc",     "f", N_("number"),    help_csc,
+	  gnumeric_csc, NULL, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+	{ "csch",     "f", N_("number"),    help_csch,
+	  gnumeric_csch, NULL, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
 	{ "floor",   "f|f", N_("number"),  help_floor,
 	  gnumeric_floor, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
@@ -3350,6 +3421,12 @@ GnmFuncDescriptor const math_functions[] = {
 	  gnumeric_roundup, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
 	  GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
+	{ "sec",     "f", N_("number"),    help_sec,
+	  gnumeric_sec, NULL, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+	{ "sech",     "f", N_("number"),    help_sech,
+	  gnumeric_sech, NULL, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
 	{ "seriessum", "fffA", N_("x,n,m,coefficients"), help_seriessum,
 	  gnumeric_seriessum, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/plugins/fn-math/plugin.xml.in b/plugins/fn-math/plugin.xml.in
index 0e1cc74..0d36c06 100644
--- a/plugins/fn-math/plugin.xml.in
+++ b/plugins/fn-math/plugin.xml.in
@@ -30,6 +30,8 @@
 				<function name="countif"/>
 				<function name="ceil"/>
 				<function name="ceiling"/>
+				<function name="csc"/>
+				<function name="csch"/>
 				<function name="degrees"/>
 				<function name="even"/>
 				<function name="exp"/>
@@ -61,6 +63,8 @@
 				<function name="round"/>
 				<function name="rounddown"/>
 				<function name="roundup"/>
+				<function name="sec"/>
+				<function name="sech"/>
 				<function name="seriessum"/>
 				<function name="sign"/>
 				<function name="sin"/>
diff --git a/plugins/fn-r/ChangeLog b/plugins/fn-r/ChangeLog
index 0fd0d58..f99c3bf 100644
--- a/plugins/fn-r/ChangeLog
+++ b/plugins/fn-r/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* functions.c (help_r_dchisq): add some documentation item
+	(help_r_pchisq): ditto
+	(help_r_qchisq): ditto
+
 2009-06-20  Morten Welinder <terra gnome org>
 
 	* Release 1.9.9
diff --git a/plugins/fn-r/functions.c b/plugins/fn-r/functions.c
index a975586..ac44c03 100644
--- a/plugins/fn-r/functions.c
+++ b/plugins/fn-r/functions.c
@@ -489,6 +489,7 @@ static GnmFuncHelp const help_r_dchisq[] = {
 	{ GNM_FUNC_HELP_ARG, F_("df:the number of degrees of freedom of the distribution") },
 	{ GNM_FUNC_HELP_ARG, F_("give_log:if true, log of the result will be returned instead.  This is useful if the result would otherwise underflow to 0.  Defaults to false.") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the probability density function of the chi-square distribution.") },
+	{ GNM_FUNC_HELP_ODF, "A two argument invocation R.DCHISQ(@{x},@{df}) is exported to OpenFormula as CHISQDIST(@{x},@{df},FALSE())." },
 	{ GNM_FUNC_HELP_SEEALSO, "R.PCHISQ,R.QCHISQ" },
 	{ GNM_FUNC_HELP_END }
 };
@@ -513,6 +514,7 @@ static GnmFuncHelp const help_r_pchisq[] = {
 	{ GNM_FUNC_HELP_ARG, F_("lower_tail:if true (the default), the lower tail of the distribution is considered.") },
 	{ GNM_FUNC_HELP_ARG, F_("log_p:if true, log of the probability is used.  This is useful if the probability would otherwise underflow to 0.  Defaults to false.") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the cumulative distribution function of the chi-square distribution.") },
+	{ GNM_FUNC_HELP_ODF, "A two argument invocation R.PCHISQ(@{x},@{df}) is exported to OpenFormula as CHISQDIST(@{x},@{df})." },
 	{ GNM_FUNC_HELP_SEEALSO, "R.DCHISQ,R.QCHISQ" },
 	{ GNM_FUNC_HELP_END }
 };
@@ -538,6 +540,7 @@ static GnmFuncHelp const help_r_qchisq[] = {
 	{ GNM_FUNC_HELP_ARG, F_("lower_tail:if true (the default), the lower tail of the distribution is considered.") },
 	{ GNM_FUNC_HELP_ARG, F_("log_p:if true, log of the probability is used.  This is useful if the probability would otherwise underflow to 0.  Defaults to false.") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the probability quantile function, i.e., the inverse of the cumulative distribution function, of the chi-square distribution.") },
+	{ GNM_FUNC_HELP_ODF, "A two argument invocation R.QCHISQ(@{p},@{df}) is exported to OpenFormula as CHISQINV(@{p},@{df})." },
 	{ GNM_FUNC_HELP_SEEALSO, "R.DCHISQ,R.PCHISQ" },
 	{ GNM_FUNC_HELP_END }
 };
diff --git a/plugins/fn-stat/ChangeLog b/plugins/fn-stat/ChangeLog
index bf7dc22..fa3f0ae 100644
--- a/plugins/fn-stat/ChangeLog
+++ b/plugins/fn-stat/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* functions.c: use GNM_FUNC_HELP_EXCEL throughout and add a
+	few GNM_FUNC_HELP_ODF
+
 2009-06-20  Morten Welinder <terra gnome org>
 
 	* Release 1.9.9
diff --git a/plugins/fn-stat/functions.c b/plugins/fn-stat/functions.c
index 71c8b6c..e5a8d03 100644
--- a/plugins/fn-stat/functions.c
+++ b/plugins/fn-stat/functions.c
@@ -80,7 +80,7 @@ static GnmFuncHelp const help_var[] = {
 	{ GNM_FUNC_HELP_ARG, F_("area2:second cell area")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("VAR is also known as the N-1-variance. Under reasonable conditions, it is the maximum-likelihood estimator for the "
 	   "true variance.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then VAR(A1:A5) equals 117.64.")},
 	{ GNM_FUNC_HELP_SEEALSO, ("VARP,STDEV")},
@@ -110,7 +110,7 @@ static GnmFuncHelp const help_stdev[] = {
 					"Under reasonable conditions, it is the maximum-likelihood "
 					"estimator for the true population standard deviation.")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("To obtain the population standard deviation of a whole population use STDEVP.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then STDEV(A1:A5) equals 10.84619749.")},
 	{ GNM_FUNC_HELP_SEEALSO, ("AVERAGE,DSTDEV,DSTDEVP,STDEVA,STDEVPA,VAR")},
@@ -137,7 +137,7 @@ static GnmFuncHelp const help_stdevp[] = {
 	{ GNM_FUNC_HELP_ARG, F_("area1:first cell area")},	
 	{ GNM_FUNC_HELP_ARG, F_("area2:second cell area")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("This is also known as the N-standard deviation")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then STDEVP(A1:A5) equals 9.701133954.")},	
 	{ GNM_FUNC_HELP_SEEALSO, ("STDEV,STDEVA,STDEVPA")},
@@ -164,7 +164,7 @@ static GnmFuncHelp const help_rank[] = {
 	{ GNM_FUNC_HELP_ARG, F_("x:number whose rank you want to find")},
 	{ GNM_FUNC_HELP_ARG, F_("ref:list of numbers")},
 	{ GNM_FUNC_HELP_ARG, F_("order:If this is 0, numbers are ranked in descending order, otherwise numbers are ranked in ascending order.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then RANK(17.3,A1:A5) equals 4.")},
 	{ GNM_FUNC_HELP_SEEALSO, ("PERCENTRANK")},
@@ -215,7 +215,7 @@ static GnmFuncHelp const help_trimmean[] = {
 	{ GNM_FUNC_HELP_ARG, F_("fraction:fraction of the data set excluded from the mean")},	
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("If @{fraction}=0.2 and the data set contains 40 numbers, 8 numbers are trimmed from the data set (40 x 0.2): "
 					"the 4 largest and the 4 smallest. To avoid a bias, the number of points to be excluded is always rounded down to the nearest even number.")},	
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.")},
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then TRIMMEAN(A1:A5,0.2) equals 23.2 and TRIMMEAN(A1:A5,0.4) equals 21.5.")},
 	{ GNM_FUNC_HELP_SEEALSO, ("AVERAGE,GEOMEAN,HARMEAN,MEDIAN,MODE")},
@@ -263,7 +263,7 @@ static GnmFuncHelp const help_covar[] = {
 	{ GNM_FUNC_HELP_ARG, F_("array1:first data set")},
 	{ GNM_FUNC_HELP_ARG, F_("array2:set data set")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("Strings and empty cells are simply ignored.") },
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 	   "11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
 	   "B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
@@ -293,7 +293,7 @@ static GnmFuncHelp const help_correl[] = {
 	{ GNM_FUNC_HELP_ARG, F_("array1:first data set")},
 	{ GNM_FUNC_HELP_ARG, F_("array2:second data set")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("Strings and empty cells are simply ignored.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 	   "11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
 	   "B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
@@ -326,7 +326,7 @@ static GnmFuncHelp const help_negbinomdist[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{f} or @{t} is a non-integer it is truncated.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If (@{f} + @{t} -1) <= 0 this function returns a #NUM! error.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this functions returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("NEGBINOMDIST(2,5,0.55) equals 0.152872629.") },
 	{ GNM_FUNC_HELP_SEEALSO, "BINOMDIST,COMBIN,FACT,HYPGEOMDIST,PERMUT"},
 	{ GNM_FUNC_HELP_END }
@@ -350,7 +350,8 @@ gnumeric_negbinomdist (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 static GnmFuncHelp const help_normsdist[] = {
 	{ GNM_FUNC_HELP_NAME, F_("NORMSDIST:cumulative density function of the standard normal distribution")},
 	{ GNM_FUNC_HELP_ARG, F_("x:")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("NORMSDIST is the OpenFormula function LEGACY.NORMSDIST.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("NORMSDIST(2) equals 0.977249868.") },
 	{ GNM_FUNC_HELP_SEEALSO, "NORMDIST"},
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Normal_distribution") },
@@ -374,7 +375,8 @@ static GnmFuncHelp const help_normsinv[] = {
 	{ GNM_FUNC_HELP_NAME, F_("NORMSINV:inverse of the cumulative density function of the standard normal distribution")},
 	{ GNM_FUNC_HELP_ARG, F_("p:given probability")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this function returns #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("NORMSINV is the OpenFormula function LEGACY.NORMSINV.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("NORMSINV(0.2) equals -0.841621234.") },
 	{ GNM_FUNC_HELP_SEEALSO, "NORMDIST,NORMINV,NORMSDIST,STANDARDIZE,ZTEST"},
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Normal_distribution") },
@@ -404,7 +406,7 @@ static GnmFuncHelp const help_lognormdist[] = {
 	{ GNM_FUNC_HELP_ARG, F_("stddev:standard deviation")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{stddev} = 0 LOGNORMDIST returns a #DIV/0! error.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} <= 0, @{mean} < 0 or @{stddev} <= 0 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("LOGNORMDIST(3,1,2) equals 0.519662338.") },
 	{ GNM_FUNC_HELP_SEEALSO, "NORMDIST"},
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Log-normal_distribution") },
@@ -433,7 +435,7 @@ static GnmFuncHelp const help_loginv[] = {
 	{ GNM_FUNC_HELP_ARG, F_("mean:mean")},
 	{ GNM_FUNC_HELP_ARG, F_("stddev:standard deviation")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 or @{stddev} <= 0 this function returns #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("LOGINV(0.5,2,3) equals 7.389056099.")},
 	{ GNM_FUNC_HELP_SEEALSO, ("EXP,LN,LOG,LOG10,LOGNORMDIST")},
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Log-normal_distribution") },
@@ -462,7 +464,7 @@ static GnmFuncHelp const help_fisherinv[] = {
 	{ GNM_FUNC_HELP_NAME, F_("FISHERINV:inverse of the Fisher transformation")},
 	{ GNM_FUNC_HELP_ARG, F_("x:")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} is a non-number this function returns a #VALUE! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("FISHERINV(2) equals 0.96402758.") },
 	{ GNM_FUNC_HELP_SEEALSO, "FISHER,TANH"},
 	{ GNM_FUNC_HELP_END }
@@ -482,7 +484,7 @@ static GnmFuncHelp const help_mode[] = {
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("Strings and empty cells are simply ignored.")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("If the data set does not contain any duplicates this function returns a #N/A error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 11.4, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then MODE(A1:A5) equals 11.4.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,MEDIAN"},
@@ -509,7 +511,7 @@ static GnmFuncHelp const help_harmean[] = {
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("The harmonic mean of N data points is  N divided by the sum of the reciprocals of the data points).")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then HARMEAN(A1:A5) equals 19.529814427.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,GEOMEAN,MEDIAN,MODE,TRIMMEAN"},
@@ -536,7 +538,7 @@ static GnmFuncHelp const help_geomean[] = {
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("The geometric mean is equal to the Nth root of the product of the N values.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then GEOMEAN(A1:A5) equals 21.279182482.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,HARMEAN,MEDIAN,MODE,TRIMMEAN"},
@@ -562,7 +564,7 @@ static GnmFuncHelp const help_count[] = {
 	{ GNM_FUNC_HELP_NAME, F_("COUNT:total number of integer or floating point arguments passed")},
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then COUNT(A1:A5) equals 5.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE"},
@@ -598,7 +600,7 @@ static GnmFuncHelp const help_counta[] = {
 	{ GNM_FUNC_HELP_NAME, F_("COUNTA:number of arguments passed not including empty cells")},
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, \"missing\", \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then COUNTA(A1:A5) equals 5.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,COUNT,DCOUNT,DCOUNTA,PRODUCT,SUM"},
@@ -632,7 +634,7 @@ static GnmFuncHelp const help_average[] = {
 	{ GNM_FUNC_HELP_NAME, F_("AVERAGE:average of all the numeric values and cells")},
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then AVERAGE(A1:A5) equals 23.2.")},
 	{ GNM_FUNC_HELP_SEEALSO, ("SUM, COUNT")},
@@ -658,7 +660,7 @@ static GnmFuncHelp const help_min[] = {
 	{ GNM_FUNC_HELP_NAME, F_("MIN:smallest value, with negative numbers considered smaller than positive numbers")},
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then MIN(A1:A5) equals 11.4.") },
 	{ GNM_FUNC_HELP_SEEALSO, "MAX,ABS"},
@@ -693,7 +695,7 @@ static GnmFuncHelp const help_max[] = {
 	{ GNM_FUNC_HELP_NAME, F_("MAX:largest value, with negative numbers considered smaller than positive numbers.")},
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then MAX(A1:A5) equals 40.1.") },
 	{ GNM_FUNC_HELP_SEEALSO, "MIN,ABS"},
@@ -733,7 +735,7 @@ static GnmFuncHelp const help_skew[] = {
 				 "distribution really has a third moment.  The skewness of a "
 				 "symmetric (e.g., normal) distribution is zero.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If less than three numbers are given, this function returns a #DIV/0! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then SKEW(A1:A5) equals 0.976798268.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,VAR,SKEWP,KURT"},
@@ -787,7 +789,7 @@ static GnmFuncHelp const help_expondist[] = {
 	   "@{y} * exp (- {y}*@{x}),otherwise it will return\t"
 	   "1 - exp (- {y}*@{x}).")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} < 0 or @{y} <= 0 this will return an error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("EXPONDIST(2,4,0) equals 0.001341851.") },
 	{ GNM_FUNC_HELP_SEEALSO, "POISSON"},
 	{ GNM_FUNC_HELP_END }
@@ -852,7 +854,7 @@ static GnmFuncHelp const help_gammaln[] = {
 	{ GNM_FUNC_HELP_ARG, F_("x:")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} is non-number then this function returns a #VALUE! error.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} <= 0 then this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("GAMMALN(23) equals 48.471181352.") },
 	{ GNM_FUNC_HELP_SEEALSO, "POISSON"},
 	{ GNM_FUNC_HELP_END }
@@ -885,7 +887,7 @@ static GnmFuncHelp const help_gammadist[] = {
 	{ GNM_FUNC_HELP_ARG, F_("cumulative:whether to evaluate the density function or the cumulative distribution function")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} < 0 this function returns a #NUM! error.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{alpha} <= 0 or @{beta} <= 0, this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("GAMMADIST(1,2,3,0) equals 0.07961459.") },
 	{ GNM_FUNC_HELP_SEEALSO, "GAMMAINV"},
 	{ GNM_FUNC_HELP_END }
@@ -917,7 +919,7 @@ static GnmFuncHelp const help_gammainv[] = {
 	{ GNM_FUNC_HELP_ARG, F_("beta:scale parameter")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{alpha} <= 0 or @{beta} <= 0 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("GAMMAINV(0.34,2,4) equals 4.829093908.") },
 	{ GNM_FUNC_HELP_SEEALSO, "GAMMADIST"},
 	{ GNM_FUNC_HELP_END }
@@ -947,7 +949,8 @@ static GnmFuncHelp const help_chidist[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{dof} is non-integer it is truncated.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{dof} < 1 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("CHIDIST(@{x},@{dof}) is the OpenFormula function LEGACY.CHIDIST(@{x},@{dof}).") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("CHIDIST(5.3,2) equals 0.070651213.") },
 	{ GNM_FUNC_HELP_SEEALSO, "CHIINV,CHITEST"},
 	{ GNM_FUNC_HELP_END }
@@ -973,7 +976,8 @@ static GnmFuncHelp const help_chiinv[] = {
 	{ GNM_FUNC_HELP_ARG, F_("dof:number of degrees of freedom")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 or @{dof} < 1 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("CHIINV(@{p},@{dof}) is the OpenFormula function LEGACY.CHIDIST(@{p},@{dof}).") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("CHIINV(0.98,7) equals 1.564293004.") },
 	{ GNM_FUNC_HELP_SEEALSO, "CHIDIST,CHITEST"},
 	{ GNM_FUNC_HELP_END }
@@ -999,7 +1003,8 @@ static GnmFuncHelp const help_chitest[] = {
 	{ GNM_FUNC_HELP_ARG, F_("theoretical_range:expected values")},
 	{ GNM_FUNC_HELP_NOTE, F_("If the actual range is not an n by 1 or 1 by n range, "
 				 "the returned value appears to have no sensible meaning.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("CHITEST is the OpenFormula function LEGACY.CHITEST.") },
 	{ GNM_FUNC_HELP_SEEALSO, "CHIDIST,CHIINV"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -1088,7 +1093,7 @@ static GnmFuncHelp const help_betadist[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} < @{a} or @{x} > @{b} this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{alpha} <= 0 or @{beta} <= 0, this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{a} >= @{b} this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("BETADIST(0.12,2,3) equals 0.07319808.") },
 	{ GNM_FUNC_HELP_SEEALSO, "BETAINV"},
 	{ GNM_FUNC_HELP_END }
@@ -1125,7 +1130,7 @@ static GnmFuncHelp const help_betainv[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{alpha} <= 0 or @{beta} <= 0, this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{a} >= @{b} this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("BETAINV(0.45,1.6,1) equals 0.607096629.") },
 	{ GNM_FUNC_HELP_SEEALSO, "BETADIST"},
 	{ GNM_FUNC_HELP_END }
@@ -1192,7 +1197,7 @@ static GnmFuncHelp const help_tinv[] = {
 	{ GNM_FUNC_HELP_ARG, F_("dof:number of degrees of freedom")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },	
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 or @{dof} < 1 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_NOTE, F_("The parameterization of this function is different from "
 	   "what is used for, e.g., NORMSINV.  This is a common source of "
 	   "mistakes, but necessary for compatibility.") },
@@ -1229,7 +1234,8 @@ static GnmFuncHelp const help_fdist[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} < 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{dof_of_num} < 1 or @{dof_of_denom} < 1, this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("FDIST is the OpenFormula function LEGACY.FDIST.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("FDIST(2,5,5) equals 0.232511319.") },
 	{ GNM_FUNC_HELP_SEEALSO, "FINV"},
 	{ GNM_FUNC_HELP_END }
@@ -1394,7 +1400,8 @@ static GnmFuncHelp const help_finv[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },	
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{dof_of_num} < 1 or @{dof_of_denom} < 1 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("FINV is the OpenFormula function LEGACY.FINV.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("FINV(0.2,2,4) equals 2.472135955.") },
 	{ GNM_FUNC_HELP_SEEALSO, "FDIST"},
 	{ GNM_FUNC_HELP_END }
@@ -1425,7 +1432,7 @@ static GnmFuncHelp const help_binomdist[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{n} < 0 or @{trials} < 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{n} > @{trials} this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("BINOMDIST(3,5,0.8,0) equals 0.2048.") },
 	{ GNM_FUNC_HELP_SEEALSO, "POISSON"},
 	{ GNM_FUNC_HELP_END }
@@ -1490,7 +1497,7 @@ static GnmFuncHelp const help_critbinom[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{trials} < 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{alpha} < 0 or @{alpha} > 1 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("CRITBINOM(10,0.5,0.75) equals 6.") },
 	{ GNM_FUNC_HELP_SEEALSO, "BINOMDIST"},
 	{ GNM_FUNC_HELP_END }
@@ -1517,7 +1524,7 @@ static GnmFuncHelp const help_permut[] = {
 	{ GNM_FUNC_HELP_ARG, F_("k:number of elements in each permutation")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{n} = 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{n} < @{k} this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("PERMUT(7,3) equals 7 times 6 times 5 = 210.") },
 	{ GNM_FUNC_HELP_SEEALSO, "COMBIN"},
 	{ GNM_FUNC_HELP_END }
@@ -1547,7 +1554,7 @@ static GnmFuncHelp const help_hypgeomdist[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x},@{n},@{M} or @{N} is a non-integer it is truncated.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x},@{n},@{M} or @{N} < 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} > @{M} or @{n} > @{N} this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("HYPGEOMDIST(1,2,3,10) equals 0.4666667.") },
 	{ GNM_FUNC_HELP_SEEALSO, "BINOMDIST,POISSON"},
 	{ GNM_FUNC_HELP_END }
@@ -1582,7 +1589,7 @@ static GnmFuncHelp const help_confidence[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{size} is non-integer it is truncated.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{size} < 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{size} is 0 this function returns a #DIV/0! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("CONFIDENCE(0.05,1,33) equals 0.341185936.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE"},
 	{ GNM_FUNC_HELP_END }
@@ -1609,7 +1616,7 @@ static GnmFuncHelp const help_standardize[] = {
 	{ GNM_FUNC_HELP_ARG, F_("mean:mean of the original distribution")},
 	{ GNM_FUNC_HELP_ARG, F_("stddev:standard deviation of the original distribution")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{stddev} is 0 this function returns a #DIV/0! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("STANDARDIZE(3,2,4) equals 0.25.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE"},
 	{ GNM_FUNC_HELP_END }
@@ -1641,7 +1648,7 @@ static GnmFuncHelp const help_weibull[] = {
            "(@{alpha}/@{beta}^ {alpha}) * @{x}^(@{alpha}-1) * exp(-(@{x}/@{beta}^ {alpha})).") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} < 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{alpha} <= 0 or @{beta} <= 0 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("WEIBULL(3,2,4,0) equals 0.213668559.") },
 	{ GNM_FUNC_HELP_SEEALSO, "POISSON"},
 	{ GNM_FUNC_HELP_END }
@@ -1673,7 +1680,7 @@ static GnmFuncHelp const help_normdist[] = {
 	{ GNM_FUNC_HELP_ARG, F_("stddev:standard deviation of the distribution")},
 	{ GNM_FUNC_HELP_ARG, F_("cumulative:whether to evaluate the density function or the cumulative distribution function")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{stddev} is 0 this function returns a #DIV/0! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("NORMDIST(2,1,2,0) equals 0.176032663.") },
 	{ GNM_FUNC_HELP_SEEALSO, "POISSON"},
 	{ GNM_FUNC_HELP_END }
@@ -1705,7 +1712,7 @@ static GnmFuncHelp const help_norminv[] = {
 	{ GNM_FUNC_HELP_ARG, F_("mean:mean of the distribution")},
 	{ GNM_FUNC_HELP_ARG, F_("stddev:standard deviation of the distribution")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 or @{stddev} <= 0 this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("NORMINV(0.76,2,3) equals 4.118907689.") },
 	{ GNM_FUNC_HELP_SEEALSO, "NORMDIST,NORMSDIST,NORMSINV,STANDARDIZE,ZTEST"},
 	{ GNM_FUNC_HELP_END }
@@ -1738,7 +1745,7 @@ static GnmFuncHelp const help_kurt[] = {
 	   "kurtosis.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If fewer than four numbers are given or all of them are equal "
 				 "this function returns a #DIV/0! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then KURT(A1:A5) equals 1.234546305.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,VAR,SKEW,KURTP"},
@@ -1788,7 +1795,7 @@ static GnmFuncHelp const help_avedev[] = {
 	{ GNM_FUNC_HELP_NAME, F_("AVEDEV:average of the absolute deviations of a data set")},
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then AVEDEV(A1:A5) equals 7.84.") },
 	{ GNM_FUNC_HELP_SEEALSO, "STDEV"},
@@ -1813,7 +1820,7 @@ static GnmFuncHelp const help_devsq[] = {
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("Strings and empty cells are simply ignored.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then DEVSQ(A1:A5) equals 470.56.") },
 	{ GNM_FUNC_HELP_SEEALSO, "STDEV"},
@@ -1838,7 +1845,7 @@ static GnmFuncHelp const help_fisher[] = {
            { GNM_FUNC_HELP_ARG, F_("x:")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} is not a number, this function returns a #VALUE! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} <= -1 or @{x} >= 1, this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("FISHER(0.332) equals 0.345074339.") },
 	{ GNM_FUNC_HELP_SEEALSO, "FISHERINV,ATANH"},
 	{ GNM_FUNC_HELP_END }
@@ -1870,7 +1877,7 @@ static GnmFuncHelp const help_poisson[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} is a non-integer it is truncated.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x} < 0 this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{mean} <= 0 POISSON returns the #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("POISSON(3,6,0) equals 0.089235078.")},
 	{ GNM_FUNC_HELP_SEEALSO, ("NORMDIST,WEIBULL")},
 	{ GNM_FUNC_HELP_END }
@@ -1899,7 +1906,7 @@ static GnmFuncHelp const help_pearson[] = {
 	{ GNM_FUNC_HELP_ARG, F_("array1:first component values")},
 	{ GNM_FUNC_HELP_ARG, F_("array2:second component values")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("Strings and empty cells are simply ignored.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_SEEALSO, "INTERCEPT,LINEST,RSQ,SLOPE,STEYX"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -1918,7 +1925,7 @@ static GnmFuncHelp const help_rsq[] = {
 	{ GNM_FUNC_HELP_ARG, F_("array1:first component values")},
 	{ GNM_FUNC_HELP_ARG, F_("array2:second component values")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("Strings and empty cells are simply ignored.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_SEEALSO, ("CORREL,COVAR,INTERCEPT,LINEST,LOGEST,PEARSON,SLOPE,STEYX,TREND")},
 	{ GNM_FUNC_HELP_END }
 };
@@ -1944,7 +1951,7 @@ static GnmFuncHelp const help_median[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("Strings and empty cells are simply ignored.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If even numbers are given MEDIAN returns the average of the two "
 	   "numbers in the center.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then MEDIAN(A1:A5) equals 21.3.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE,COUNT,COUNTA,DAVERAGE,MODE,SSMEDIAN,SUM"},
@@ -2066,7 +2073,7 @@ static GnmFuncHelp const help_large[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If data set is empty this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{k} <= 0 or @{k} is greater than the number of data items given "
 				 "this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then LARGE(A1:A5,2) equals 25.9."
@@ -2109,7 +2116,7 @@ static GnmFuncHelp const help_small[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If data set is empty this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{k} <= 0 or @{k} is greater than the number of data items given "
 				 "this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then SMALL(A1:A5,2) equals 17.3."
@@ -2183,7 +2190,7 @@ static GnmFuncHelp const help_prob[] = {
 				 "error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{x_range} and @{prob_range} contain a different number of data "
 				 "entries, this function returns a #N/A error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_SEEALSO, "BINOMDIST,CRITBINOM"},
 	{ GNM_FUNC_HELP_END }
 };
@@ -2263,7 +2270,7 @@ static GnmFuncHelp const help_steyx[] = {
 	{ GNM_FUNC_HELP_ARG, F_("known_x's:known x-values")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{known_y}'s and @{known_x}'s are empty or have a different "
 				 "number of arguments then this function returns a #N/A error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
 				     "B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
@@ -2413,7 +2420,7 @@ static GnmFuncHelp const help_ztest[] = {
 	{ GNM_FUNC_HELP_ARG, F_("stddev:population stadard deviation, defaults to the sample standard deviation")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{ref} contains less than two data items ZTEST "
 				 "returns #DIV/0! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then ZTEST(A1:A5,20) equals 0.254717826.")},
@@ -2471,7 +2478,7 @@ static GnmFuncHelp const help_averagea[] = {
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
 	HELP_DESCRIPTION_TEXT_INCLUSION,
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then AVERAGEA(A1:A5) equals 18.94.") },
 	{ GNM_FUNC_HELP_SEEALSO, "AVERAGE"},
@@ -2496,7 +2503,7 @@ static GnmFuncHelp const help_maxa[] = {
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
 	HELP_DESCRIPTION_TEXT_INCLUSION,
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings "
 				     "11.4, 17.3, \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then MAXA(A1:A5) equals 40.1.") },
@@ -2523,7 +2530,7 @@ static GnmFuncHelp const help_mina[] = {
 	{ GNM_FUNC_HELP_ARG, F_("number1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("number2:second value")},
 	HELP_DESCRIPTION_TEXT_INCLUSION,
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings "
 				     "11.4, 17.3, \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then MINA(A1:A5) equals 0.") },
@@ -2554,7 +2561,7 @@ static GnmFuncHelp const help_vara[] = {
 					"true variance")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("To get the true variance of a complete population use VARPA.") },
 	HELP_DESCRIPTION_TEXT_INCLUSION,
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings "
 				     "11.4, 17.3, \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then VARA(A1:A5) equals 228.613.") },
@@ -2581,7 +2588,7 @@ static GnmFuncHelp const help_varpa[] = {
 	{ GNM_FUNC_HELP_ARG, F_("area2:second cell area")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("VARPA is also known as the N-variance.") },
 	HELP_DESCRIPTION_TEXT_INCLUSION,
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings "
 				     "11.4, 17.3, \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then VARPA(A1:A5) equals 182.8904.") },
@@ -2614,7 +2621,7 @@ static GnmFuncHelp const help_stdeva[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("To obtain the population standard deviation of a whole population "
 					"use STDEVPA.")},
 	HELP_DESCRIPTION_TEXT_INCLUSION,
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings "
 				     "11.4, 17.3, \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then STDEVA(A1:A5) equals 15.119953704.") },
@@ -2641,7 +2648,7 @@ static GnmFuncHelp const help_stdevpa[] = {
 	{ GNM_FUNC_HELP_ARG, F_("area2:second cell area")},
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("This is also known as the N-standard deviation")},
 	HELP_DESCRIPTION_TEXT_INCLUSION,
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers and strings "
 				     "11.4, 17.3, \"missing\", 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then STDEVPA(A1:A5) equals 13.523697719.") },
@@ -2765,7 +2772,7 @@ static GnmFuncHelp const help_percentile[] = {
 	{ GNM_FUNC_HELP_ARG, F_("k:which percentile to calculate")},
 	{ GNM_FUNC_HELP_NOTE, F_("If @{array} is empty, this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{k} < 0 or @{k} > 1, this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then PERCENTILE(A1:A5,0.42) equals 20.02.") },
 	{ GNM_FUNC_HELP_SEEALSO, "QUARTILE"},
@@ -2809,7 +2816,7 @@ static GnmFuncHelp const help_quartile[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("If @{array} is empty, this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{quart} < 0 or @{quart} > 4, this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{quart} is not an integer, it is truncated.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then QUARTILE(A1:A5,1) equals 17.3.") },
 	{ GNM_FUNC_HELP_SEEALSO, "LARGE,MAX,MEDIAN,MIN,PERCENTILE,SMALL"},
@@ -2850,7 +2857,7 @@ static GnmFuncHelp const help_ftest[] = {
 				 "variances of two populations")},
 	{ GNM_FUNC_HELP_ARG, F_("array1:sample from the first population")},
 	{ GNM_FUNC_HELP_ARG, F_("array2:sample from the second population")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
 				     "B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
@@ -2916,7 +2923,7 @@ static GnmFuncHelp const help_ttest[] = {
 	{ GNM_FUNC_HELP_NOTE, F_("@{tails} and @{type} are truncated to integers.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{tails} is not one or two, this function returns a #NUM! error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{type} is any other than one, two, or three, this function returns a #NUM! error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
 				     "B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
@@ -3082,7 +3089,7 @@ static GnmFuncHelp const help_frequency[] = {
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("If the @{bin_array} is empty, this function "
 					"returns the number of data points "
 					"in @{data_array}.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -4209,7 +4216,7 @@ static GnmFuncHelp const help_forecast[] = {
 				 "number of data entries, this function returns a #N/A error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_x} is zero, this function returns a #DIV/0 "
 				 "error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
 				     "B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
@@ -4273,7 +4280,7 @@ static GnmFuncHelp const help_intercept[] = {
 				 "number of data entries, this function returns a #N/A error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_x} is zero, this function returns "
 				 "#DIV/0 error.")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
 				     "11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
 				     "B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
@@ -4315,7 +4322,7 @@ static GnmFuncHelp const help_slope[] = {
 	{ GNM_FUNC_HELP_NAME, F_("SLOPE:calculates the slope of a linear regression line")},
 	{ GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
 	{ GNM_FUNC_HELP_ARG, F_("known_x's:known x-values")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{known_x} or @{known_y} contains no data entries or different "
 				 "number of data entries, this function returns a #N/A error.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_x} is zero, this function returns "
@@ -4374,7 +4381,7 @@ static GnmFuncHelp const help_subtotal[] = {
 			)},
 	{ GNM_FUNC_HELP_ARG, F_("ref1:first value")},
 	{ GNM_FUNC_HELP_ARG, F_("ref2:second value")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 23, 27, 28, 33, and 39.") },
 	{ GNM_FUNC_HELP_EXAMPLES, F_("Then SUBTOTAL(1,A1:A5) equals 30."
 				     "SUBTOTAL(6,A1:A5) equals 22378356."
diff --git a/plugins/fn-string/ChangeLog b/plugins/fn-string/ChangeLog
index 355483a..025c0f8 100644
--- a/plugins/fn-string/ChangeLog
+++ b/plugins/fn-string/ChangeLog
@@ -1,3 +1,11 @@
+2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* plugin.xml.in: new LEFTB, MIDB, RIGHTB
+	* functions.c: new LEFTB, MIDB, RIGHTB functions
+	(help_asc): update
+	(gnm_asc_half): new
+	(gnumeric_asc): implement
+	
 2009-06-20  Morten Welinder <terra gnome org>
 
 	* Release 1.9.9
diff --git a/plugins/fn-string/functions.c b/plugins/fn-string/functions.c
index fdad58b..e2a8347 100644
--- a/plugins/fn-string/functions.c
+++ b/plugins/fn-string/functions.c
@@ -285,20 +285,13 @@ gnumeric_lenb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_left[] = {
-	{ GNM_FUNC_HELP_OLD,
-	F_("@FUNCTION=LEFT\n"
-	   "@SYNTAX=LEFT(text[,num_chars])\n"
-
-	   "@DESCRIPTION="
-	   "LEFT returns the leftmost @num_chars characters or the left "
-	   "character if @num_chars is not specified.\n\n"
-           "* This function is Excel compatible.\n"
-	   "\n"
-	   "@EXAMPLES=\n"
-	   "LEFT(\"Directory\",3) equals \"Dir\".\n"
-	   "\n"
-	   "@SEEALSO=MID, RIGHT")
-	},
+	{ GNM_FUNC_HELP_NAME, F_("LEFT:the first @{num_chars} characters.")},
+	{ GNM_FUNC_HELP_ARG, F_("num_chars:the number of characters to return (defaults to 1)")},   
+	{ GNM_FUNC_HELP_NOTE, F_("If the string is in a right-to-left script, the returned first characters are from the right of the string.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
+	{ GNM_FUNC_HELP_EXAMPLES, F_("LEFT(\"Directory\",3) equals \"Dir\".")},
+	{ GNM_FUNC_HELP_SEEALSO, ("MID,RIGHT,LEN,MIDB,RIGHTB,LENB")},
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -321,6 +314,37 @@ gnumeric_left (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 
 /***************************************************************************/
 
+static GnmFuncHelp const help_leftb[] = {
+	{ GNM_FUNC_HELP_NAME, F_("LEFTB:the first characters comprising at most @{num_bytes} bytes.")},
+	{ GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},   
+	{ GNM_FUNC_HELP_NOTE, F_("If the string is in a right-to-left script, the returned first characters are from the right of the string.")},
+/* 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")}, */
+/* 	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")}, */
+	{ GNM_FUNC_HELP_EXAMPLES, F_("LEFTB(\"Directory\",3) equals \"Dir\".")},
+	{ GNM_FUNC_HELP_SEEALSO, ("MIDB,RIGHTB,LENB,LEFT,MID,RIGHT,LEN")},
+	{ GNM_FUNC_HELP_END }
+};
+
+static GnmValue *
+gnumeric_leftb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
+{
+	const guchar *peek = (const guchar *)value_peek_string (argv[0]);
+	gnm_float count = argv[1] ? value_get_as_float (argv[1]) : 1.0;
+	int len = strlen (peek);
+	int icount, newlen;
+
+	if (count < 0)
+		return value_new_error_VALUE (ei->pos);
+	icount = (int)MIN ((gnm_float)INT_MAX, count);
+	if (icount >= len)
+		return value_new_string (peek);
+       
+	newlen = ((const guchar *)g_utf8_find_prev_char (peek, peek + icount + 1)) - peek;
+
+	return value_new_string_nocopy (g_strndup (peek, newlen));
+}
+/***************************************************************************/
+
 static GnmFuncHelp const help_lower[] = {
 	{ GNM_FUNC_HELP_OLD,
 	F_("@FUNCTION=LOWER\n"
@@ -347,20 +371,14 @@ gnumeric_lower (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_mid[] = {
-	{ GNM_FUNC_HELP_OLD,
-	F_("@FUNCTION=MID\n"
-	   "@SYNTAX=MID(string, position, length)\n"
-
-	   "@DESCRIPTION="
-	   "MID returns a substring from @string starting at @position for "
-	   "@length characters.\n\n"
-           "* This function is Excel compatible.\n"
-	   "\n"
-	   "@EXAMPLES=\n"
-	   "MID(\"testing\",2,3) equals \"est\".\n"
-	   "\n"
-	   "@SEEALSO=LEFT, RIGHT")
-	},
+	{ GNM_FUNC_HELP_NAME, F_("MID:the substring starting at position @{position} consisting of @{length} characters.")},
+	{ GNM_FUNC_HELP_ARG, F_("string")},   
+	{ GNM_FUNC_HELP_ARG, F_("position:the starting position (defaults to 0)")},   
+	{ GNM_FUNC_HELP_ARG, F_("length:the number of characters to return (defaults to 1)")},   
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
+	{ GNM_FUNC_HELP_EXAMPLES, F_("MID(\"Directory\",4,3) equals \"cto\".")},
+	{ GNM_FUNC_HELP_SEEALSO, ("LEFT,RIGHT,LEN,LEFTB,MIDB,RIGHTB,LENB")},
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -391,22 +409,53 @@ gnumeric_mid (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 
 /***************************************************************************/
 
-static GnmFuncHelp const help_right[] = {
-	{ GNM_FUNC_HELP_OLD,
-	F_("@FUNCTION=RIGHT\n"
-	   "@SYNTAX=RIGHT(text[,num_chars])\n"
+static GnmFuncHelp const help_midb[] = {
+	{ GNM_FUNC_HELP_NAME, F_("MIDB:the characters following  the first @{start_ps} bytes comprising at most @{num_bytes} bytes.")},
+	{ GNM_FUNC_HELP_ARG, F_("start_pos:the number of the byte with which to start (defaults to 1)")},   
+	{ GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},   
+/* 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")}, */
+/* 	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")}, */
+	{ GNM_FUNC_HELP_EXAMPLES, F_("MIDB(\"Directory\",4,3) equals \"cto\".")},
+	{ GNM_FUNC_HELP_SEEALSO, ("LEFTB,RIGHTB,LENB,LEFT,MID,RIGHT,LEN")},
+	{ GNM_FUNC_HELP_END }
+};
 
-	   "@DESCRIPTION="
-	   "RIGHT returns the rightmost @num_chars characters or the right "
-	   "character if @num_chars is not specified.\n\n"
-           "* This function is Excel compatible.\n"
-	   "\n"
-	   "@EXAMPLES=\n"
-	   "RIGHT(\"end\") equals \"d\".\n"
-	   "RIGHT(\"end\",2) equals \"nd\".\n"
-	   "\n"
-	   "@SEEALSO=MID, LEFT")
-	},
+static GnmValue *
+gnumeric_midb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
+{
+	const guchar *peek = (const guchar *)value_peek_string (argv[0]);
+	gnm_float pos = value_get_as_float (argv[1]);
+	gnm_float len = value_get_as_float (argv[2]);
+ 	int slen = strlen (peek);
+	int ipos, ilen, newlen;
+
+	if ((len < 0) || (pos < 1))
+		return value_new_error_VALUE (ei->pos);
+	ipos = (int)MIN ((gnm_float)INT_MAX, pos) - 1;
+	ilen = (int)MIN ((gnm_float)INT_MAX, len);
+	if ((ipos >= slen) || 
+	    ((gunichar)-1 == g_utf8_get_char_validated (peek + ipos, -1)))
+		return value_new_error_VALUE (ei->pos);
+
+	if ((ipos + ilen) >= slen)
+		return value_new_string (peek + ipos);
+       
+	newlen = ((const guchar *)g_utf8_find_prev_char (peek + ipos, peek + ipos + ilen + 1))
+		- (peek + ipos);
+
+	return value_new_string_nocopy (g_strndup (peek + ipos, newlen));
+}
+
+/***************************************************************************/
+
+static GnmFuncHelp const help_right[] = {
+	{ GNM_FUNC_HELP_NAME, F_("RIGHT:the last @{num_chars} characters")},
+	{ GNM_FUNC_HELP_ARG, F_("num_chars:the number of characters to return (defaults to 1)")},   
+	{ GNM_FUNC_HELP_NOTE, F_("If the string is in a right-to-left script, the returned last characters are from the left of the string.")},
+	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
+	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
+	{ GNM_FUNC_HELP_EXAMPLES, F_("RIGHT(\"Directory\",3) equals \"ory\".")},
+	{ GNM_FUNC_HELP_SEEALSO, ("LEFT,MID,LEN,LEFTB,MIDB,RIGHTB,LENB")},
 	{ GNM_FUNC_HELP_END }
 };
 
@@ -433,6 +482,38 @@ gnumeric_right (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 
 /***************************************************************************/
 
+static GnmFuncHelp const help_rightb[] = {
+	{ GNM_FUNC_HELP_NAME, F_("RIGHTB:the last characters comprising at most @{num_bytes} bytes.")},
+	{ GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},   
+	{ GNM_FUNC_HELP_NOTE, F_("If the string is in a right-to-left script, the returned last characters are from the left of the string.")},
+/* 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")}, */
+/* 	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")}, */
+	{ GNM_FUNC_HELP_EXAMPLES, F_("RIGHTB(\"Directory\",3) equals \"ory\".")},
+	{ GNM_FUNC_HELP_SEEALSO, ("LEFTB,MIDB,LENB,LEFT,MID,RIGHT,LEN")},
+	{ GNM_FUNC_HELP_END }
+};
+
+static GnmValue *
+gnumeric_rightb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
+{
+	const guchar *peek = (const guchar *)value_peek_string (argv[0]);
+	gnm_float count = argv[1] ? value_get_as_float (argv[1]) : 1.0;
+	int len = strlen (peek);
+	int icount;
+	gchar *res;
+
+	if (count < 0)
+		return value_new_error_VALUE (ei->pos);
+	icount = (int)MIN ((gnm_float)INT_MAX, count);
+	if (icount >= len)
+		return value_new_string (peek);
+
+	res = g_utf8_find_next_char (peek + len - icount - 1, peek + len);
+	return value_new_string ((res == NULL) ? "" : res);
+}
+
+/***************************************************************************/
+
 static GnmFuncHelp const help_upper[] = {
 	{ GNM_FUNC_HELP_OLD,
 	F_("@FUNCTION=UPPER\n"
@@ -1210,26 +1291,128 @@ gnumeric_search (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_asc[] = {
-	{ GNM_FUNC_HELP_OLD,
-	F_("@FUNCTION=ASC\n"
-	   "@SYNTAX=ASC(string)\n"
-
-	   "@DESCRIPTION="
-	   "ASC a compatibility function that is meaningless in Gnumeric.  "
-	   "In MS Excel (tm) it converts 2 byte @string into single byte text.\n"
-	   "\n"
-	   "@EXAMPLES=\n"
-	   "CHAR(\"Foo\") equals \"Foo\".\n"
-	   "\n"
-	   "@SEEALSO=")
-	},
+	{ GNM_FUNC_HELP_NAME, F_("ASC:text with full-width katakana and ASCII characters converted to half-width.")},
+	{ GNM_FUNC_HELP_ARG, F_("text:")},   
+	{ GNM_FUNC_HELP_DESCRIPTION, F_("ASC converts full-width katakana and ASCII characters to half-width equivalent characters, copying all others. ")},   
+	{ GNM_FUNC_HELP_DESCRIPTION, F_("The distinction between half-width and full-width characters is described in http://www.unicode.org/reports/tr11/.";)},
+	{ GNM_FUNC_HELP_EXCEL, F_("For most strings, this function has the same effect as in Excel.")},
+	{ GNM_FUNC_HELP_NOTE, F_("While in obsolete encodings ASC used to translate between 2-byte and 1-byte characters, this is not the case in UTF-8.")},
+	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
+	{ GNM_FUNC_HELP_EXAMPLES, F_("ASC(\"\xef\xbc\xa1\xef\xbc\xa2\xef\xbc\xa3\") yields \"ABC\"")},
+	{ GNM_FUNC_HELP_SEEALSO, ("JIS")},
 	{ GNM_FUNC_HELP_END }
 };
 
+static gunichar
+gnm_asc_half (gunichar c, GString *str)
+{
+	if (c < 0x2015)
+		return c;
+	if (c == 0x2015)
+		return (0xff70);
+	if (c == 0x2018)
+		return (0x0060);
+	if (c == 0x2019)
+		return (0x0027);
+	if (c == 0x201d)
+		return (0x0022);
+	if (c < 0x3001)
+		return c;
+	if (c == 0x3001)
+		return (0xff64);
+	if (c == 0x3002)
+		return (0xff61);
+	if (c == 0x300c)
+		return (0xff62);
+	if (c == 0x300d)
+		return (0xff63);
+	if (c == 0x309b)
+		return (0xff9e);
+	if (c == 0x309c)
+		return (0xff9f);
+	if (c < 0x30a1)
+		return c;
+	if (0x30a1 <= c && c <= 0x30aa)
+		return (c%2 == 0) ? ((c - 0x30a2)/2 + 0xff71)
+			: ((c - 0x30a1)/2 + 0xff67);
+	if (c <= 0x30c2) {
+		if (c%2 == 1)
+			return ((c - 0x30ab)/2 + 0xff76);
+		else {
+			g_string_append_unichar 
+				(str, (c - 0x30ac)/2 + 0xff76);
+			return 0xff9e;
+		}
+	}
+	if (c == 0x30c3)
+		return (0xff6f);
+	if (c <= 0x30c9) {
+		if (c%2 == 0)
+			return ((c - 0x30c4)/2 + 0xff82);
+		else {
+			g_string_append_unichar 
+				(str, (c - 0x30c5)/2 + 0xff82);
+			return 0xff9e;
+		}
+	}
+	if (c <= 0x30ce)
+		return (c - 0x30ca + 0xff85);
+	if (c <= 0x30dd)
+		switch (c%2) {
+		case 0:
+			return ((c - 0x30cf)/3 + 0xff8a);
+		case 1:
+			g_string_append_unichar 
+				(str, (c - 0x30d0)/3 + 0xff8a);
+			return 0xff9e;
+		case 2:
+		default:
+			g_string_append_unichar 
+				(str, (c - 0x30d1)/3 + 0xff8a);
+			return 0xff9f;
+		}
+	if (c <= 30e2)
+		return (c - 0x30de + 0xff8f);
+	if (c <= 0x30e8) {
+		if (c%2 == 0)
+			return ((c - 0x30e4)/2 + 0xff94);
+		else
+			return ((c - 0x30e3)/2 + 0xff6c);
+	}			
+	if (c <= 0x30ed)
+		return (c - 0x30e9 + 0xff97);
+	if (c == 0x30ef)
+		return (0xff9c);
+	if (c == 0x30f2)
+		return (0xff66);
+	if (c == 0x30f3)
+		return (0xff9d);
+	if (c == 0x30fb)
+		return (0xff65);
+	if (c == 0x30fc)
+		return (0xff70);
+	if (c < 0xff01)
+		return c;
+	if (c <= 0xff5e)
+		return (c - 0xff01 + 0x0021);
+	if (c == 0xffe5)
+		return (0x005c);
+	return c;
+}
+
 static GnmValue *
 gnumeric_asc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 {
-	return value_new_string (value_peek_string (argv[0]));
+	char const *peek = value_peek_string (argv[0]);
+	GString *str = g_string_new (NULL);
+
+	while ((*peek) != '\0') {
+		gunichar wc = gnm_asc_half (g_utf8_get_char (peek), str);
+		g_string_append_unichar (str, wc);
+		peek = g_utf8_next_char(peek);
+	}
+
+	return value_new_string_nocopy (g_string_free (str, FALSE));
 }
 
 /***************************************************************************/
@@ -1270,6 +1453,9 @@ GnmFuncDescriptor const string_functions[] = {
         { "left",       "S|f",   N_("text,num_chars"),          help_left,
 	  gnumeric_left, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
+        { "leftb",       "S|f",   N_("text,num_bytes"),          help_leftb,
+	  gnumeric_leftb, NULL, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
         { "len",        "S",     N_("text"),                    help_len,
 	  gnumeric_len, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
@@ -1282,6 +1468,9 @@ GnmFuncDescriptor const string_functions[] = {
         { "mid",        "Sff",   N_("text,pos,num"),            help_mid,
 	  gnumeric_mid, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
+        { "midb",        "Sff",   N_("text,pos,num"),            help_midb,
+	  gnumeric_midb, NULL, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
         { "proper",     "S",     N_("text"),                    help_proper,
 	  gnumeric_proper, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
@@ -1294,6 +1483,9 @@ GnmFuncDescriptor const string_functions[] = {
         { "right",      "S|f",   N_("text,num_chars"),          help_right,
 	  gnumeric_right, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
+        { "rightb",       "S|f",   N_("text,num_bytes"),          help_rightb,
+	  gnumeric_rightb, NULL, NULL, NULL, NULL,
+	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
         { "search",     "SS|f",  N_("search_string,text,start_num"),   help_search,
 	  gnumeric_search, NULL, NULL, NULL, NULL,
 	  GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/plugins/fn-string/plugin.xml.in b/plugins/fn-string/plugin.xml.in
index d583325..4f06b1d 100644
--- a/plugins/fn-string/plugin.xml.in
+++ b/plugins/fn-string/plugin.xml.in
@@ -21,14 +21,17 @@
 				<function name="find"/>
 				<function name="fixed"/>
 				<function name="left"/>
+				<function name="leftb"/>
 				<function name="len"/>
 				<function name="lenb"/>
 				<function name="lower"/>
 				<function name="mid"/>
+				<function name="midb"/>
 				<function name="proper"/>
 				<function name="replace"/>
 				<function name="rept"/>
 				<function name="right"/>
+				<function name="rightb"/>
 				<function name="search"/>
 				<function name="substitute"/>
 				<function name="t"/>
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 32a04a8..05124de 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,15 @@
+2009-06-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* openoffice-read.c (oo_func_map_in): adjust function listing
+	* openoffice-write.c (odf_func_floor_ceiling_handler):
+	  handle all instances
+	(odf_func_sec_handler): new
+	(odf_func_sech_handler): new
+	(odf_expr_func_handler): change the default behaviour to always
+	  precede functions with ORG.GNUMERIC, so we don't have to worry
+	  to miss functions from new plugins or that have been added.
+	  Also handle "ODF...." functions that were imported.
+
 2009-06-20  Morten Welinder <terra gnome org>
 
 	* Release 1.9.9
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index df89b43..18fd8a1 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -3867,43 +3867,40 @@ 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                                 */
 
-/* { "ARABIC","ARABIC" }, */
-/* { "AVERAGEIFS","AVERAGEIFS" }, */
-/* { "B","B" }, */
-/* { "CHISQDIST","CHISQDIST" }, */
-/* { "CHISQINV","CHISQINV" }, */
-/* { "COMBINA","COMBINA" }, */
-/* { "COTH","COTH" }, */
-/* { "COUNTIFS","COUNTIFS" }, */
-/* { "CSC","CSC" }, */
-/* { "CSCH","CSCH" }, */
-/* { "DAYS","DAYS" }, */
-/* { "DDE","DDE" }, */
-/* { "FINDB","FINDB" }, */
-/* { "GAMMA","GAMMA" }, */
-/* { "GAUSS","GAUSS" }, */
-/* { "IFNA","IFNA" }, */
-/* { "ISFORMULA","ISFORMULA" }, */
-/* { "JIS","JIS" }, */
-/* { "MIDB","MIDB" }, */
-/* { "MULTIPLE.OPERATIONS","MULTIPLE.OPERATIONS" }, */
-/* { "MUNIT","MUNIT" }, */
-/* { "NUMBERVALUE","NUMBERVALUE" }, */
-/* { "PDURATION","PDURATION" }, */
-/* { "PERMUTATIONA","PERMUTATIONA" }, */
-/* { "PHI","PHI" }, */
-/* { "REPLACEB","REPLACEB" }, */
-/* { "RIGHTB","RIGHTB" }, */
-/* { "RRI","RRI" }, */
-/* { "SEARCHB","SEARCHB" }, */
-/* { "SHEET","SHEET" }, */
-/* { "SHEETS","SHEETS" }, */
-/* { "SUMIFS","SUMIFS" }, */
-		{ "USDOLLAR","DOLLAR" },
+		{ "ARABIC","ODF.ARABIC" },
+		{ "AVERAGEIFS","ODF.AVERAGEIFS" },
+		{ "B","ODF.B" },
+		{ "COMBINA","ODF.COMBINA" },
+		{ "COUNTIFS","ODF.COUNTIFS" },
+		{ "DAYS","ODF.DAYS" },
+		{ "DDE","ODF.DDE" },
+		{ "FINDB","ODF.FINDB" },
+		{ "GAMMA","ODF.GAMMA" },
+		{ "GAUSS","ODF.GAUSS" },
+		{ "IFNA","ODF.IFNA" },
+		{ "ISFORMULA","ODF.ISFORMULA" },
+		{ "JIS","ODF.JIS" },
+		{ "MULTIPLE.OPERATIONS","ODF.MULTIPLE.OPERATIONS" },
+		{ "MUNIT","ODF.MUNIT" },
+		{ "NUMBERVALUE","ODF.NUMBERVALUE" },
+		{ "PDURATION","ODF.PDURATION" },
+		{ "PERMUTATIONA","ODF.PERMUTATIONA" },
+		{ "PHI","ODF.PHI" },
+		{ "REPLACEB","ODF.REPLACEB" },
+		{ "RRI","ODF.RRI" },
+		{ "SEARCHB","ODF.SEARCHB" },
+		{ "SHEET","ODF.SHEET" },
+		{ "SHEETS","ODF.SHEETS" },
+		{ "SUMIFS","ODF.SUMIFS" },
 
 /* The following is a complete list of the functions defined in ODF OpenFormula draft 20090508 */
 /* We should determine whether any mapping is needed. */
 
+		{ "CEILING","ODF.CEILING" },          /* see handler */
+		{ "CHISQINV","R.QCHISQ" },
+		{ "CHISQDIST","ODF.CHISQDIST" },      /* see handler */
+		{ "FLOOR","ODF.FLOOR" },              /* see handler */
+		{ "FORMULA","GET.FORMULA" },
 		{ "LEGACY.CHIDIST","CHIDIST" },
 		{ "LEGACY.CHIINV","CHIINV" },
 		{ "LEGACY.CHITEST","CHITEST" },
@@ -3911,8 +3908,7 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
 		{ "LEGACY.FINV","FINV" },
 		{ "LEGACY.NORMSDIST","NORMSDIST" },
 		{ "LEGACY.NORMSINV","NORMSINV" },
-		{ "CHISQINV","R.QCHISQ" },    /* also see handler */
-		{ "FORMULA","GET.FORMULA" },
+		{ "USDOLLAR","DOLLAR" },
 
 /* { "ABS","ABS" }, */
 /* { "ACCRINT","ACCRINT" }, */
@@ -3921,7 +3917,7 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
 /* { "ACOSH","ACOSH" }, */
 /* { "ACOT","ACOT" }, */
 /* { "ACOTH","ACOTH" }, */
-/* { "ADDRESS","ADDRESS" }, */
+/* { "ADDRESS","ADDRESS" },       also  see handler */
 /* { "AMORDEGRC","AMORDEGRC" }, */
 /* { "AMORLINC","AMORLINC" }, */
 /* { "AND","AND" }, */
@@ -3954,10 +3950,7 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
 /* { "BITOR","BITOR" }, */
 /* { "BITRSHIFT","BITRSHIFT" }, */
 /* { "BITXOR","BITXOR" }, */
-/* { "CEILING","CEILING" },               see handler */
 /* { "CHAR","CHAR" }, */
-/* { "CHISQDIST","CHISQDIST" }, */
-/* { "CHISQINV","CHISQINV" }, */
 /* { "CHOOSE","CHOOSE" }, */
 /* { "CLEAN","CLEAN" }, */
 /* { "CODE","CODE" }, */
@@ -3988,7 +3981,6 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
 /* { "COVAR","COVAR" }, */
 /* { "CRITBINOM","CRITBINOM" }, */
 /* { "CSC","CSC" }, */
-/* { "CSC","CSC" }, */
 /* { "CSCH","CSCH" }, */
 /* { "CUMIPMT","CUMIPMT" }, */
 /* { "CUMPRINC","CUMPRINC" }, */
@@ -4043,9 +4035,8 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
 /* { "FINDB","FINDB" }, */
 /* { "FINV","FINV" }, */
 /* { "FISHER","FISHER" }, */
-/* { "FISHERINV","FISHERINV" }, */
+/* { "FISHERINV","FISHERINV" }, */        
 /* { "FIXED","FIXED" }, */
-/* { "FLOOR","FLOOR" }, */
 /* { "FORECAST","FORECAST" }, */
 /* { "FREQUENCY","FREQUENCY" }, */
 /* { "FTEST","FTEST" }, */
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 888a8ad..c511a9a 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -1341,9 +1341,31 @@ odf_func_floor_ceiling_handler (GnmConventionsOut *out, GnmExprFunction const *f
 			g_string_append_c (target, ')');
 		}
 		g_string_append (target, ";1)");
-		return TRUE;
+	} else {
+		g_string_append (target, func->func->name);
+		g_string_append (target, "()");
 	}
-	return FALSE;
+	return TRUE;
+}
+
+static gboolean
+odf_func_sec_handler (GnmConventionsOut *out, GnmExprFunction const *func)
+{
+	GString *target = out->accum;
+	g_string_append (target, "(1/COS");
+	gnm_expr_list_as_string (func->argc, func->argv, out);
+	g_string_append_c (target, ')');
+	return TRUE;
+}
+
+static gboolean
+odf_func_sech_handler (GnmConventionsOut *out, GnmExprFunction const *func)
+{
+	GString *target = out->accum;
+	g_string_append (target, "(1/COSH");
+	gnm_expr_list_as_string (func->argc, func->argv, out);
+	g_string_append_c (target, ')');
+	return TRUE;
 }
 
 
@@ -1354,11 +1376,13 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
 		char const *gnm_name;
 		gpointer handler;
 	} const sc_func_handlers[] = {
+			{"CEILING",  odf_func_floor_ceiling_handler},
+			{"FLOOR",    odf_func_floor_ceiling_handler},
 			{"R.QCHISQ", odf_func_r_qchisq_handler},
 			{"R.DCHISQ", odf_func_r_dchisq_handler},
 			{"R.PCHISQ", odf_func_r_pchisq_handler},
-			{"CEILING",  odf_func_floor_ceiling_handler},
-			{"FLOOR",  odf_func_floor_ceiling_handler},
+			{"SEC",      odf_func_sec_handler},
+			{"SECH",      odf_func_sech_handler},
 			{NULL, NULL}
 	};
 	
@@ -1366,7 +1390,224 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
 		char const *gnm_name;
 		char const *odf_name;
 	} const sc_func_renames[] = {
+
+		/* The default behaviour is to precede each function name with            */
+		/* ORG.GNUMERIC. So we need not list gnumeric unique names or those that  */
+		/* come from unknown plugins                                              */
+
+		/* The following are functions that exist in OpenFormula, this listing is */
+		/* alphabetical by the second entry, the OpenFormula name.                */
+
+		{ "ABS","ABS" },
+		{ "ACCRINT","ACCRINT" },
+		{ "ACCRINTM","ACCRINTM" },
+		{ "ACOS","ACOS" },
+		{ "ACOSH","ACOSH" },
+		{ "ACOT","ACOT" },
+		{ "ACOTH","ACOTH" },
+		{ "ADDRESS","ADDRESS" },
+		{ "AMORDEGRC","AMORDEGRC" },
+		{ "AMORLINC","AMORLINC" },
+		{ "AND","AND" },
+		/* { "ODF.ARABIC","ARABIC" },  not implemented */
+		{ "AREAS","AREAS" },
+		{ "ASC","ASC" },
+		{ "ASIN","ASIN" },
+		{ "ASINH","ASINH" },
+		{ "ATAN","ATAN" },
+		{ "ATAN2","ATAN2" },
+		{ "ATANH","ATANH" },
+		{ "AVEDEV","AVEDEV" },
+		{ "AVERAGE","AVERAGE" },
+		{ "AVERAGEA","AVERAGEA" },
+		/* { "ODF.AVERAGEIFS","AVERAGEIFS" },  not implemented */
+		/* { "ODF.B","B" },  not implemented */
+		{ "BASE","BASE" },
+		{ "BESSELI","BESSELI" },
+		{ "BESSELJ","BESSELJ" },
+		{ "BESSELK","BESSELK" },
+		{ "BESSELY","BESSELY" },
+		{ "BETADIST","BETADIST" },
+		{ "BETAINV","BETAINV" },
+		{ "BIN2DEC","BIN2DEC" },
+		{ "BIN2HEX","BIN2HEX" },
+		{ "BIN2OCT","BIN2OCT" },
+		{ "BINOMDIST","BINOMDIST" },
+		{ "BITAND","BITAND" },
+		{ "BITLSHIFT","BITLSHIFT" },
+		{ "BITOR","BITOR" },
+		{ "BITRSHIFT","BITRSHIFT" },
+		{ "BITXOR","BITXOR" },
 		{ "CEIL", "CEILING" },
+		/* { "ODF.CEILING","CEILING" },  see the handler code for CEILING*/
+		{ "CELL","CELL" },
+		{ "CHAR","CHAR" },
+		/* { "ODF.CHISQDIST","CHISQDIST" },  we have related r.*chisq functions */
+		/* { "ODF.CHISQINV","CHISQINV" },   we have related r.*chisq functions */
+		{ "CHOOSE","CHOOSE" },
+		{ "CLEAN","CLEAN" },
+		{ "CODE","CODE" },
+		{ "COLUMN","COLUMN" },
+		{ "COLUMNS","COLUMNS" },
+		{ "COMBIN","COMBIN" },
+		/* { "COMBINA","COMBINA" },  not implemented */
+		{ "COMPLEX","COMPLEX" },
+		{ "CONCATENATE","CONCATENATE" },
+		{ "CONFIDENCE","CONFIDENCE" },
+		{ "CONVERT","CONVERT" },
+		{ "CORREL","CORREL" },
+		{ "COS","COS" },
+		{ "COSH","COSH" },
+		{ "COT","COT" },
+		{ "COTH","COTH" },
+		{ "COUNT","COUNT" },
+		{ "COUNTA","COUNTA" },
+		{ "COUNTBLANK","COUNTBLANK" },
+		{ "COUNTIF","COUNTIF" },
+		/* { "COUNTIFS","COUNTIFS" },  not implemented */
+		{ "COUPDAYBS","COUPDAYBS" },
+		{ "COUPDAYS","COUPDAYS" },
+		{ "COUPDAYSNC","COUPDAYSNC" },
+		{ "COUPNCD","COUPNCD" },
+		{ "COUPNUM","COUPNUM" },
+		{ "COUPPCD","COUPPCD" },
+		{ "COVAR","COVAR" },
+		{ "CRITBINOM","CRITBINOM" },
+		{ "CSC","CSC" },
+		{ "CSCH","CSCH" },
+		{ "CUMIPMT","CUMIPMT" },
+		{ "CUMPRINC","CUMPRINC" },
+		{ "DATE","DATE" },
+		{ "DATEDIF","DATEDIF" },
+		{ "DATEVALUE","DATEVALUE" },
+		{ "DAVERAGE","DAVERAGE" },
+		{ "DAY","DAY" },
+		/* { "DAYS","DAYS" },  not implemented */
+		{ "DAYS360","DAYS360" },
+		{ "DB","DB" },
+		{ "DCOUNT","DCOUNT" },
+		{ "DCOUNTA","DCOUNTA" },
+		{ "DDB","DDB" },
+		/* { "DDE","DDE" },  not implemented */
+		{ "DEC2BIN","DEC2BIN" },
+		{ "DEC2HEX","DEC2HEX" },
+		{ "DEC2OCT","DEC2OCT" },
+		{ "DECIMAL","DECIMAL" },
+		{ "DEGREES","DEGREES" },
+		{ "DELTA","DELTA" },
+		{ "DEVSQ","DEVSQ" },
+		{ "DGET","DGET" },
+		{ "DISC","DISC" },
+		{ "DMAX","DMAX" },
+		{ "DMIN","DMIN" },
+		{ "DOLLAR","DOLLAR" },
+		{ "DOLLARDE","DOLLARDE" },
+		{ "DOLLARFR","DOLLARFR" },
+		{ "DPRODUCT","DPRODUCT" },
+		{ "DSTDEV","DSTDEV" },
+		{ "DSTDEVP","DSTDEVP" },
+		{ "DSUM","DSUM" },
+		{ "DURATION","DURATION" },
+		{ "DVAR","DVAR" },
+		{ "DVARP","DVARP" },
+		{ "EDATE","EDATE" },
+		{ "EFFECT","EFFECT" },
+		{ "EOMONTH","EOMONTH" },
+		{ "ERF","ERF" },
+		{ "ERFC","ERFC" },
+		{ "ERROR.TYPE","ERROR.TYPE" },
+		{ "EUROCONVERT","EUROCONVERT" },
+		{ "EVEN","EVEN" },
+		{ "EXACT","EXACT" },
+		{ "EXP","EXP" },
+		{ "EXPONDIST","EXPONDIST" },
+		{ "FACT","FACT" },
+		{ "FACTDOUBLE","FACTDOUBLE" },
+		{ "FALSE","FALSE" },
+		{ "FIND","FIND" },
+		/* { "FINDB","FINDB" },  not implemented */
+		{ "FISHER","FISHER" },
+		{ "FISHERINV","FISHERINV" },
+		{ "FIXED","FIXED" },
+		{ "FLOOR","FLOOR" },
+		{ "FORECAST","FORECAST" },
+		{ "GET.FORMULA","FORMULA" },
+		{ "FREQUENCY","FREQUENCY" },
+		{ "FTEST","FTEST" },
+		{ "FV","FV" },
+		{ "FVSCHEDULE","FVSCHEDULE" },
+		/* { "GAMMA","GAMMA" },  not implemented */
+		{ "GAMMADIST","GAMMADIST" },
+		{ "GAMMAINV","GAMMAINV" },
+		{ "GAMMALN","GAMMALN" },
+		/* { "GAUSS","GAUSS" },  not implemented */
+		{ "GCD","GCD" },
+		{ "GEOMEAN","GEOMEAN" },
+		{ "GESTEP","GESTEP" },
+		{ "GETPIVOTDATA","GETPIVOTDATA" },
+		{ "GROWTH","GROWTH" },
+		{ "HARMEAN","HARMEAN" },
+		{ "HEX2BIN","HEX2BIN" },
+		{ "HEX2DEC","HEX2DEC" },
+		{ "HEX2OCT","HEX2OCT" },
+		{ "HLOOKUP","HLOOKUP" },
+		{ "HOUR","HOUR" },
+		{ "HYPERLINK","HYPERLINK" },
+		{ "HYPGEOMDIST","HYPGEOMDIST" },
+		{ "IF","IF" },
+		{ "IFERROR","IFERROR" },
+		/* { "IFNA","IFNA" },  not implemented */
+		{ "IMABS","IMABS" },
+		{ "IMAGINARY","IMAGINARY" },
+		{ "IMARGUMENT","IMARGUMENT" },
+		{ "IMCONJUGATE","IMCONJUGATE" },
+		{ "IMCOS","IMCOS" },
+		{ "IMCOT","IMCOT" },
+		{ "IMCSC","IMCSC" },
+		{ "IMCSCH","IMCSCH" },
+		{ "IMDIV","IMDIV" },
+		{ "IMEXP","IMEXP" },
+		{ "IMLN","IMLN" },
+		{ "IMLOG10","IMLOG10" },
+		{ "IMLOG2","IMLOG2" },
+		{ "IMPOWER","IMPOWER" },
+		{ "IMPRODUCT","IMPRODUCT" },
+		{ "IMREAL","IMREAL" },
+		{ "IMSEC","IMSEC" },
+		{ "IMSECH","IMSECH" },
+		{ "IMSIN","IMSIN" },
+		{ "IMSQRT","IMSQRT" },
+		{ "IMSUB","IMSUB" },
+		{ "IMSUM","IMSUM" },
+		{ "IMTAN","IMTAN" },
+		{ "INDEX","INDEX" },
+		{ "INDIRECT","INDIRECT" },
+		{ "INFO","INFO" },
+		{ "INT","INT" },
+		{ "INTERCEPT","INTERCEPT" },
+		{ "INTRATE","INTRATE" },
+		{ "IPMT","IPMT" },
+		{ "IRR","IRR" },
+		{ "ISBLANK","ISBLANK" },
+		{ "ISERR","ISERR" },
+		{ "ISERROR","ISERROR" },
+		{ "ISEVEN","ISEVEN" },
+		/* { "ISFORMULA","ISFORMULA" },  not implemented */
+		{ "ISLOGICAL","ISLOGICAL" },
+		{ "ISNA","ISNA" },
+		{ "ISNONTEXT","ISNONTEXT" },
+		{ "ISNUMBER","ISNUMBER" },
+		{ "ISODD","ISODD" },
+		{ "ISOWEEKNUM","ISOWEEKNUM" },
+		{ "ISPMT","ISPMT" },
+		{ "ISREF","ISREF" },
+		{ "ISTEXT","ISTEXT" },
+		/* { "JIS","JIS" },  not implemented */
+		{ "KURT","KURT" },
+		{ "LARGE","LARGE" },
+		{ "LCM","LCM" },
+		{ "LEFT","LEFT" },
+		{ "LEFTB","LEFTB" },
 		{ "CHIDIST","LEGACY.CHIDIST" },
 		{ "CHIINV","LEGACY.CHIINV" },
 		{ "CHITEST","LEGACY.CHITEST" },
@@ -1374,574 +1615,179 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
 		{ "FINV","LEGACY.FINV" },
 		{ "NORMSDIST","LEGACY.NORMSDIST" },
 		{ "NORMSINV","LEGACY.NORMSINV" },
-		{ "GET.FORMULA","FORMULA" },
-		
-/* The following Gnumeric specific functions should be preceded by ORG.GNUMERIC.*/
-		
-		{ "ATL_LAST","ORG.GNUMERIC.ATL_LAST" },
-		{ "BERNOULLI","ORG.GNUMERIC.BERNOULLI" },
-		{ "BETA","ORG.GNUMERIC.BETA" },
-		{ "BETALN","ORG.GNUMERIC.BETALN" },
-		{ "CAUCHY","ORG.GNUMERIC.CAUCHY" },
-		{ "COLUMNNUMBER","ORG.GNUMERIC.COLUMNNUMBER" },
-		{ "CRONBACH","ORG.GNUMERIC.CRONBACH" },
-		{ "CUM_BIV_NORM_DIST","ORG.GNUMERIC.CUM_BIV_NORM_DIST" },
-		{ "DATE2UNIX","ORG.GNUMERIC.DATE2UNIX" },
-		{ "DAYS360","ORG.GNUMERIC.DAYS360" },
-		{ "DIMCIRC","ORG.GNUMERIC.DIMCIRC" },
-		{ "ERROR","ORG.GNUMERIC.ERROR" },
-		{ "EURO","ORG.GNUMERIC.EURO" },
-		{ "EXECSQL","ORG.GNUMERIC.EXECSQL" },
-		{ "EXPM1","ORG.GNUMERIC.EXPM1" },
-		{ "EXPPOWDIST","ORG.GNUMERIC.EXPPOWDIST" },
-		{ "EXPRESSION","ORG.GNUMERIC.EXPRESSION" },
-		{ "FIB","ORG.GNUMERIC.FIB" },
-		{ "G_DURATION","ORG.GNUMERIC.G_DURATION" },
-		{ "GEOMDIST","ORG.GNUMERIC.GEOMDIST" },
-		{ "GETENV","ORG.GNUMERIC.GETENV" },
-		{ "G_PRODUCT","ORG.GNUMERIC.G_PRODUCT" },
-		{ "HYPOT","ORG.GNUMERIC.HYPOT" },
-		{ "IMARCCOS","ORG.GNUMERIC.IMARCCOS" },
-		{ "IMARCCOSH","ORG.GNUMERIC.IMARCCOSH" },
-		{ "IMARCCOT","ORG.GNUMERIC.IMARCCOT" },
-		{ "IMARCCOTH","ORG.GNUMERIC.IMARCCOTH" },
-		{ "IMARCCSC","ORG.GNUMERIC.IMARCCSC" },
-		{ "IMARCCSCH","ORG.GNUMERIC.IMARCCSCH" },
-		{ "IMARCSEC","ORG.GNUMERIC.IMARCSEC" },
-		{ "IMARCSECH","ORG.GNUMERIC.IMARCSECH" },
-		{ "IMARCSIN","ORG.GNUMERIC.IMARCSIN" },
-		{ "IMARCSINH","ORG.GNUMERIC.IMARCSINH" },
-		{ "IMARCTAN","ORG.GNUMERIC.IMARCTAN" },
-		{ "IMARCTANH","ORG.GNUMERIC.IMARCTANH" },
-		{ "IMCOSH","ORG.GNUMERIC.IMCOSH" },
-		{ "IMCOTH","ORG.GNUMERIC.IMCOTH" },
-		{ "IMINV","ORG.GNUMERIC.IMINV" },
-		{ "IMNEG","ORG.GNUMERIC.IMNEG" },
-		{ "IMSINH","ORG.GNUMERIC.IMSINH" },
-		{ "IMTANH","ORG.GNUMERIC.IMTANH" },
-		{ "INTERPOLATION","ORG.GNUMERIC.INTERPOLATION" },
-		{ "INVSUMINV","ORG.GNUMERIC.INVSUMINV" },
-		{ "ISOYEAR","ORG.GNUMERIC.ISOYEAR" },
-		{ "ISPRIME","ORG.GNUMERIC.ISPRIME" },
-		{ "ITHPRIME","ORG.GNUMERIC.ITHPRIME" },
-		{ "KURTP","ORG.GNUMERIC.KURTP" },
-		{ "LANDAU","ORG.GNUMERIC.LANDAU" },
-		{ "LAPLACE","ORG.GNUMERIC.LAPLACE" },
-		{ "LN1P","ORG.GNUMERIC.LN1P" },
-		{ "LOG2","ORG.GNUMERIC.LOG2" },
-		{ "LOGFIT","ORG.GNUMERIC.LOGFIT" },
-		{ "LOGISTIC","ORG.GNUMERIC.LOGISTIC" },
-		{ "LOGREG","ORG.GNUMERIC.LOGREG" },
-		{ "NT_D","ORG.GNUMERIC.NT_D" },
-		{ "NT_MU","ORG.GNUMERIC.NT_MU" },
-		{ "NT_PHI","ORG.GNUMERIC.NT_PHI" },
-		{ "NT_PI","ORG.GNUMERIC.NT_PI" },
-		{ "NT_SIGMA","ORG.GNUMERIC.NT_SIGMA" },
-		{ "OFFCAP","ORG.GNUMERIC.OFFCAP" },
-		{ "OFFTRAF","ORG.GNUMERIC.OFFTRAF" },
-		{ "OPT_2_ASSET_CORRELATION","ORG.GNUMERIC.OPT_2_ASSET_CORRELATION" },
-		{ "OPT_AMER_EXCHANGE","ORG.GNUMERIC.OPT_AMER_EXCHANGE" },
-		{ "OPT_BAW_AMER","ORG.GNUMERIC.OPT_BAW_AMER" },
-		{ "OPT_BINOMIAL","ORG.GNUMERIC.OPT_BINOMIAL" },
-		{ "OPT_BJER_STENS","ORG.GNUMERIC.OPT_BJER_STENS" },
-		{ "OPT_BS","ORG.GNUMERIC.OPT_BS" },
-		{ "OPT_BS_CARRYCOST","ORG.GNUMERIC.OPT_BS_CARRYCOST" },
-		{ "OPT_BS_DELTA","ORG.GNUMERIC.OPT_BS_DELTA" },
-		{ "OPT_BS_GAMMA","ORG.GNUMERIC.OPT_BS_GAMMA" },
-		{ "OPT_BS_RHO","ORG.GNUMERIC.OPT_BS_RHO" },
-		{ "OPT_BS_THETA","ORG.GNUMERIC.OPT_BS_THETA" },
-		{ "OPT_BS_VEGA","ORG.GNUMERIC.OPT_BS_VEGA" },
-		{ "OPT_COMPLEX_CHOOSER","ORG.GNUMERIC.OPT_COMPLEX_CHOOSER" },
-		{ "OPT_EURO_EXCHANGE","ORG.GNUMERIC.OPT_EURO_EXCHANGE" },
-		{ "OPT_EXEC","ORG.GNUMERIC.OPT_EXEC" },
-		{ "OPT_EXTENDIBLE_WRITER","ORG.GNUMERIC.OPT_EXTENDIBLE_WRITER" },
-		{ "OPT_FIXED_STRK_LKBK","ORG.GNUMERIC.OPT_FIXED_STRK_LKBK" },
-		{ "OPT_FLOAT_STRK_LKBK","ORG.GNUMERIC.OPT_FLOAT_STRK_LKBK" },
-		{ "OPT_FORWARD_START","ORG.GNUMERIC.OPT_FORWARD_START" },
-		{ "OPT_FRENCH","ORG.GNUMERIC.OPT_FRENCH" },
-		{ "OPT_GARMAN_KOHLHAGEN","ORG.GNUMERIC.OPT_GARMAN_KOHLHAGEN" },
-		{ "OPT_JUMP_DIFF","ORG.GNUMERIC.OPT_JUMP_DIFF" },
-		{ "OPT_MILTERSEN_SCHWARTZ","ORG.GNUMERIC.OPT_MILTERSEN_SCHWARTZ" },
-		{ "OPT_ON_OPTIONS","ORG.GNUMERIC.OPT_ON_OPTIONS" },
-		{ "OPT_RGW","ORG.GNUMERIC.OPT_RGW" },
-		{ "OPT_SIMPLE_CHOOSER","ORG.GNUMERIC.OPT_SIMPLE_CHOOSER" },
-		{ "OPT_SPREAD_APPROX","ORG.GNUMERIC.OPT_SPREAD_APPROX" },
-		{ "OPT_TIME_SWITCH","ORG.GNUMERIC.OPT_TIME_SWITCH" },
-		{ "PARETO","ORG.GNUMERIC.PARETO" },
-		{ "periodogram","ORG.GNUMERIC.periodogram" },
-		{ "PFACTOR","ORG.GNUMERIC.PFACTOR" },
-		{ "PROBBLOCK","ORG.GNUMERIC.PROBBLOCK" },
-		{ "RANDBERNOULLI","ORG.GNUMERIC.RANDBERNOULLI" },
-		{ "RANDBETA","ORG.GNUMERIC.RANDBETA" },
-		{ "RANDBINOM","ORG.GNUMERIC.RANDBINOM" },
-		{ "RANDCAUCHY","ORG.GNUMERIC.RANDCAUCHY" },
-		{ "RANDCHISQ","ORG.GNUMERIC.RANDCHISQ" },
-		{ "RANDDISCRETE","ORG.GNUMERIC.RANDDISCRETE" },
-		{ "RANDEXP","ORG.GNUMERIC.RANDEXP" },
-		{ "RANDEXPPOW","ORG.GNUMERIC.RANDEXPPOW" },
-		{ "RANDFDIST","ORG.GNUMERIC.RANDFDIST" },
-		{ "RANDGAMMA","ORG.GNUMERIC.RANDGAMMA" },
-		{ "RANDGEOM","ORG.GNUMERIC.RANDGEOM" },
-		{ "RANDGUMBEL","ORG.GNUMERIC.RANDGUMBEL" },
-		{ "RANDHYPERG","ORG.GNUMERIC.RANDHYPERG" },
-		{ "RANDLANDAU","ORG.GNUMERIC.RANDLANDAU" },
-		{ "RANDLAPLACE","ORG.GNUMERIC.RANDLAPLACE" },
-		{ "RANDLEVY","ORG.GNUMERIC.RANDLEVY" },
-		{ "RANDLOG","ORG.GNUMERIC.RANDLOG" },
-		{ "RANDLOGISTIC","ORG.GNUMERIC.RANDLOGISTIC" },
-		{ "RANDLOGNORM","ORG.GNUMERIC.RANDLOGNORM" },
-		{ "RANDNEGBINOM","ORG.GNUMERIC.RANDNEGBINOM" },
-		{ "RANDNORM","ORG.GNUMERIC.RANDNORM" },
-		{ "RANDNORMTAIL","ORG.GNUMERIC.RANDNORMTAIL" },
-		{ "RANDPARETO","ORG.GNUMERIC.RANDPARETO" },
-		{ "RANDPOISSON","ORG.GNUMERIC.RANDPOISSON" },
-		{ "RANDRAYLEIGH","ORG.GNUMERIC.RANDRAYLEIGH" },
-		{ "RANDRAYLEIGHTAIL","ORG.GNUMERIC.RANDRAYLEIGHTAIL" },
-		{ "RANDTDIST","ORG.GNUMERIC.RANDTDIST" },
-		{ "RANDUNIFORM","ORG.GNUMERIC.RANDUNIFORM" },
-		{ "RANDWEIBULL","ORG.GNUMERIC.RANDWEIBULL" },
-		{ "RAYLEIGH","ORG.GNUMERIC.RAYLEIGH" },
-		{ "RAYLEIGHTAIL","ORG.GNUMERIC.RAYLEIGHTAIL" },
-		{ "READDBTABLE","ORG.GNUMERIC.READDBTABLE" },
-		{ "R.DBETA","ORG.GNUMERIC.R.DBETA" },
-		{ "R.DBINOM","ORG.GNUMERIC.R.DBINOM" },
-		{ "R.DCAUCHY","ORG.GNUMERIC.R.DCAUCHY" },
-		{ "R.DCHISQ","ORG.GNUMERIC.R.DCHISQ" },   /* also see the handler code */
-		{ "R.DEXP","ORG.GNUMERIC.R.DEXP" },
-		{ "R.DF","ORG.GNUMERIC.R.DF" },
-		{ "R.DGAMMA","ORG.GNUMERIC.R.DGAMMA" },
-		{ "R.DGEOM","ORG.GNUMERIC.R.DGEOM" },
-		{ "R.DHYPER","ORG.GNUMERIC.R.DHYPER" },
-		{ "R.DLNORM","ORG.GNUMERIC.R.DLNORM" },
-		{ "R.DNBINOM","ORG.GNUMERIC.R.DNBINOM" },
-		{ "R.DNORM","ORG.GNUMERIC.R.DNORM" },
-		{ "R.DPOIS","ORG.GNUMERIC.R.DPOIS" },
-		{ "R.DT","ORG.GNUMERIC.R.DT" },
-		{ "R.DWEIBULL","ORG.GNUMERIC.R.DWEIBULL" },
-		{ "R.PBETA","ORG.GNUMERIC.R.PBETA" },
-		{ "R.PBINOM","ORG.GNUMERIC.R.PBINOM" },
-		{ "R.PCAUCHY","ORG.GNUMERIC.R.PCAUCHY" },
-		{ "R.PCHISQ","ORG.GNUMERIC.R.PCHISQ" },  /* also see the handler code */
-		{ "R.PEXP","ORG.GNUMERIC.R.PEXP" },
-		{ "R.PF","ORG.GNUMERIC.R.PF" },
-		{ "R.PGAMMA","ORG.GNUMERIC.R.PGAMMA" },
-		{ "R.PGEOM","ORG.GNUMERIC.R.PGEOM" },
-		{ "R.PHYPER","ORG.GNUMERIC.R.PHYPER" },
-		{ "R.PLNORM","ORG.GNUMERIC.R.PLNORM" },
-		{ "R.PNBINOM","ORG.GNUMERIC.R.PNBINOM" },
-		{ "R.PNORM","ORG.GNUMERIC.R.PNORM" },
-		{ "R.PPOIS","ORG.GNUMERIC.R.PPOIS" },
-		{ "R.PT","ORG.GNUMERIC.R.PT" },
-		{ "R.PWEIBULL","ORG.GNUMERIC.R.PWEIBULL" },
-		{ "R.QBETA","ORG.GNUMERIC.R.QBETA" },
-		{ "R.QBINOM","ORG.GNUMERIC.R.QBINOM" },
-		{ "R.QCAUCHY","ORG.GNUMERIC.R.QCAUCHY" },
-		{ "R.QCHISQ","ORG.GNUMERIC.R.QCHISQ" }, /* also  see the handler code */
-		{ "R.QEXP","ORG.GNUMERIC.R.QEXP" },
-		{ "R.QF","ORG.GNUMERIC.R.QF" },
-		{ "R.QGAMMA","ORG.GNUMERIC.R.QGAMMA" },
-		{ "R.QGEOM","ORG.GNUMERIC.R.QGEOM" },
-		{ "R.QHYPER","ORG.GNUMERIC.R.QHYPER" },
-		{ "R.QLNORM","ORG.GNUMERIC.R.QLNORM" },
-		{ "R.QNBINOM","ORG.GNUMERIC.R.QNBINOM" },
-		{ "R.QNORM","ORG.GNUMERIC.R.QNORM" },
-		{ "R.QPOIS","ORG.GNUMERIC.R.QPOIS" },
-		{ "R.QT","ORG.GNUMERIC.R.QT" },
-		{ "R.QWEIBULL","ORG.GNUMERIC.R.QWEIBULL" },
-		{ "SIMTABLE","ORG.GNUMERIC.SIMTABLE" },
-		{ "SSMEDIAN","ORG.GNUMERIC.SSMEDIAN" },
-		{ "SUMA","ORG.GNUMERIC.SUMA" },
-		{ "UNIX2DATE","ORG.GNUMERIC.UNIX2DATE" },
-
-/* { "ABS","ABS" }, */
-/* { "ACCRINT","ACCRINT" }, */
-/* { "ACCRINTM","ACCRINTM" }, */
-/* { "ACOS","ACOS" }, */
-/* { "ACOSH","ACOSH" }, */
-/* { "ACOT","ACOT" }, */
-/* /\* { "ACOTH","ACOTH" }, *\/ */
-/* { "ADDRESS","ADDRESS" }, */
-/* { "AMORDEGRC","AMORDEGRC" }, */
-/* { "AMORLINC","AMORLINC" }, */
-/* { "AND","AND" }, */
-/* /\* { "ARABIC","ARABIC" }, *\/ */
-/* { "AREAS","AREAS" }, */
-/* { "ASC","ASC" }, */
-/* { "ASIN","ASIN" }, */
-/* { "ASINH","ASINH" }, */
-/* { "ATAN","ATAN" }, */
-/* { "ATAN2","ATAN2" }, */
-/* { "ATANH","ATANH" }, */
-/* { "AVEDEV","AVEDEV" }, */
-/* { "AVERAGE","AVERAGE" }, */
-/* { "AVERAGEA","AVERAGEA" }, */
-/* /\* { "AVERAGEIFS","AVERAGEIFS" }, *\/ */
-/* /\* { "B","B" }, *\/ */
-/* { "BASE","BASE" }, */
-/* { "BESSELI","BESSELI" }, */
-/* { "BESSELJ","BESSELJ" }, */
-/* { "BESSELK","BESSELK" }, */
-/* { "BESSELY","BESSELY" }, */
-/* { "BETADIST","BETADIST" }, */
-/* { "BETAINV","BETAINV" }, */
-/* { "BIN2DEC","BIN2DEC" }, */
-/* { "BIN2HEX","BIN2HEX" }, */
-/* { "BIN2OCT","BIN2OCT" }, */
-/* { "BINOMDIST","BINOMDIST" }, */
-/* { "BITAND","BITAND" }, */
-/* { "BITLSHIFT","BITLSHIFT" }, */
-/* { "BITOR","BITOR" }, */
-/* { "BITRSHIFT","BITRSHIFT" }, */
-/* { "BITXOR","BITXOR" }, */
-/* { "CEILING","CEILING" },    see the handler code */
-/* { "CELL","CELL" }, */
-/* { "CHAR","CHAR" }, */
-/* /\* { "CHISQDIST","CHISQDIST" }, *\/ */
-/* /\* { "CHISQINV","CHISQINV" }, *\/ */
-/* { "CHOOSE","CHOOSE" }, */
-/* { "CLEAN","CLEAN" }, */
-/* { "CODE","CODE" }, */
-/* { "COLUMN","COLUMN" }, */
-/* { "COLUMNS","COLUMNS" }, */
-/* { "COMBIN","COMBIN" }, */
-/* /\* { "COMBINA","COMBINA" }, *\/ */
-/* { "COMPLEX","COMPLEX" }, */
-/* { "CONCATENATE","CONCATENATE" }, */
-/* { "CONFIDENCE","CONFIDENCE" }, */
-/* { "CONVERT","CONVERT" }, */
-/* { "CORREL","CORREL" }, */
-/* { "COS","COS" }, */
-/* { "COSH","COSH" }, */
-/* { "COT","COT" }, */
-/* /\* { "COTH","COTH" }, *\/ */
-/* { "COUNT","COUNT" }, */
-/* { "COUNTA","COUNTA" }, */
-/* { "COUNTBLANK","COUNTBLANK" }, */
-/* { "COUNTIF","COUNTIF" }, */
-/* /\* { "COUNTIFS","COUNTIFS" }, *\/ */
-/* { "COUPDAYBS","COUPDAYBS" }, */
-/* { "COUPDAYS","COUPDAYS" }, */
-/* { "COUPDAYSNC","COUPDAYSNC" }, */
-/* { "COUPNCD","COUPNCD" }, */
-/* { "COUPNUM","COUPNUM" }, */
-/* { "COUPPCD","COUPPCD" }, */
-/* { "COVAR","COVAR" }, */
-/* { "CRITBINOM","CRITBINOM" }, */
-/* /\* { "CSC","CSC" }, *\/ */
-/* /\* { "CSCH","CSCH" }, *\/ */
-/* { "CUMIPMT","CUMIPMT" }, */
-/* { "CUMPRINC","CUMPRINC" }, */
-/* { "DATE","DATE" }, */
-/* { "DATEDIF","DATEDIF" }, */
-/* { "DATEVALUE","DATEVALUE" }, */
-/* { "DAVERAGE","DAVERAGE" }, */
-/* { "DAY","DAY" }, */
-/* /\* { "DAYS","DAYS" }, *\/ */
-/* { "DAYS360","DAYS360" }, */
-/* { "DB","DB" }, */
-/* { "DCOUNT","DCOUNT" }, */
-/* { "DCOUNTA","DCOUNTA" }, */
-/* { "DDB","DDB" }, */
-/* /\* { "DDE","DDE" }, *\/ */
-/* { "DEC2BIN","DEC2BIN" }, */
-/* { "DEC2HEX","DEC2HEX" }, */
-/* { "DEC2OCT","DEC2OCT" }, */
-/* { "DECIMAL","DECIMAL" }, */
-/* { "DEGREES","DEGREES" }, */
-/* { "DELTA","DELTA" }, */
-/* { "DEVSQ","DEVSQ" }, */
-/* { "DGET","DGET" }, */
-/* { "DISC","DISC" }, */
-/* { "DMAX","DMAX" }, */
-/* { "DMIN","DMIN" }, */
-/* { "DOLLAR","DOLLAR" }, */
-/* { "DOLLARDE","DOLLARDE" }, */
-/* { "DOLLARFR","DOLLARFR" }, */
-/* { "DPRODUCT","DPRODUCT" }, */
-/* { "DSTDEV","DSTDEV" }, */
-/* { "DSTDEVP","DSTDEVP" }, */
-/* { "DSUM","DSUM" }, */
-/* { "DURATION","DURATION" }, */
-/* { "DVAR","DVAR" }, */
-/* { "DVARP","DVARP" }, */
-/* { "EDATE","EDATE" }, */
-/* { "EFFECT","EFFECT" }, */
-/* { "EOMONTH","EOMONTH" }, */
-/* { "ERF","ERF" }, */
-/* { "ERFC","ERFC" }, */
-/* { "ERROR.TYPE","ERROR.TYPE" }, */
-/* { "EUROCONVERT","EUROCONVERT" }, */
-/* { "EVEN","EVEN" }, */
-/* { "EXACT","EXACT" }, */
-/* { "EXP","EXP" }, */
-/* { "EXPONDIST","EXPONDIST" }, */
-/* { "FACT","FACT" }, */
-/* { "FACTDOUBLE","FACTDOUBLE" }, */
-/* { "FALSE","FALSE" }, */
-/* { "FIND","FIND" }, */
-/* /\* { "FINDB","FINDB" }, *\/ */
-/* { "FISHER","FISHER" }, */
-/* { "FISHERINV","FISHERINV" }, */
-/* { "FIXED","FIXED" }, */
-/* { "FLOOR","FLOOR" }, */
-/* { "FORECAST","FORECAST" }, */
-/* /\* { "FORMULA","FORMULA" }, *\/ */
-/* { "FREQUENCY","FREQUENCY" }, */
-/* { "FTEST","FTEST" }, */
-/* { "FV","FV" }, */
-/* { "FVSCHEDULE","FVSCHEDULE" }, */
-/* /\* { "GAMMA","GAMMA" }, *\/ */
-/* { "GAMMADIST","GAMMADIST" }, */
-/* { "GAMMAINV","GAMMAINV" }, */
-/* { "GAMMALN","GAMMALN" }, */
-/* /\* { "GAUSS","GAUSS" }, *\/ */
-/* { "GCD","GCD" }, */
-/* { "GEOMEAN","GEOMEAN" }, */
-/* { "GESTEP","GESTEP" }, */
-/* { "GETPIVOTDATA","GETPIVOTDATA" }, */
-/* { "GROWTH","GROWTH" }, */
-/* { "HARMEAN","HARMEAN" }, */
-/* { "HEX2BIN","HEX2BIN" }, */
-/* { "HEX2DEC","HEX2DEC" }, */
-/* { "HEX2OCT","HEX2OCT" }, */
-/* { "HLOOKUP","HLOOKUP" }, */
-/* { "HOUR","HOUR" }, */
-/* { "HYPERLINK","HYPERLINK" }, */
-/* { "HYPGEOMDIST","HYPGEOMDIST" }, */
-/* { "IF","IF" }, */
-/* { "IFERROR","IFERROR" }, */
-/* /\* { "IFNA","IFNA" }, *\/ */
-/* { "IMABS","IMABS" }, */
-/* { "IMAGINARY","IMAGINARY" }, */
-/* { "IMARGUMENT","IMARGUMENT" }, */
-/* { "IMCONJUGATE","IMCONJUGATE" }, */
-/* { "IMCOS","IMCOS" }, */
-/* { "IMCOT","IMCOT" }, */
-/* { "IMCSC","IMCSC" }, */
-/* { "IMCSCH","IMCSCH" }, */
-/* { "IMDIV","IMDIV" }, */
-/* { "IMEXP","IMEXP" }, */
-/* { "IMLN","IMLN" }, */
-/* { "IMLOG10","IMLOG10" }, */
-/* { "IMLOG2","IMLOG2" }, */
-/* { "IMPOWER","IMPOWER" }, */
-/* { "IMPRODUCT","IMPRODUCT" }, */
-/* { "IMREAL","IMREAL" }, */
-/* { "IMSEC","IMSEC" }, */
-/* { "IMSECH","IMSECH" }, */
-/* { "IMSIN","IMSIN" }, */
-/* { "IMSQRT","IMSQRT" }, */
-/* { "IMSUB","IMSUB" }, */
-/* { "IMSUM","IMSUM" }, */
-/* { "IMTAN","IMTAN" }, */
-/* { "INDEX","INDEX" }, */
-/* { "INDIRECT","INDIRECT" }, */
-/* { "INFO","INFO" }, */
-/* { "INT","INT" }, */
-/* { "INTERCEPT","INTERCEPT" }, */
-/* { "INTRATE","INTRATE" }, */
-/* { "IPMT","IPMT" }, */
-/* { "IRR","IRR" }, */
-/* { "ISBLANK","ISBLANK" }, */
-/* { "ISERR","ISERR" }, */
-/* { "ISERROR","ISERROR" }, */
-/* { "ISEVEN","ISEVEN" }, */
-/* /\* { "ISFORMULA","ISFORMULA" }, *\/ */
-/* { "ISLOGICAL","ISLOGICAL" }, */
-/* { "ISNA","ISNA" }, */
-/* { "ISNONTEXT","ISNONTEXT" }, */
-/* { "ISNUMBER","ISNUMBER" }, */
-/* { "ISODD","ISODD" }, */
-/* { "ISOWEEKNUM","ISOWEEKNUM" }, */
-/* { "ISPMT","ISPMT" }, */
-/* { "ISREF","ISREF" }, */
-/* { "ISTEXT","ISTEXT" }, */
-/* /\* { "JIS","JIS" }, *\/ */
-/* { "KURT","KURT" }, */
-/* { "LARGE","LARGE" }, */
-/* { "LCM","LCM" }, */
-/* { "LEFT","LEFT" }, */
-/* { "LEFTB","LEFTB" }, */
-/* { "LEGACY.CHIDIST","LEGACY.CHIDIST" }, */
-/* { "LEGACY.CHIINV","LEGACY.CHIINV" }, */
-/* { "LEGACY.CHITEST","LEGACY.CHITEST" }, */
-/* { "LEGACY.FDIST","LEGACY.FDIST" }, */
-/* { "LEGACY.FINV","LEGACY.FINV" }, */
-/* { "LEGACY.NORMSDIST","LEGACY.NORMSDIST" }, */
-/* { "LEGACY.NORMSINV","LEGACY.NORMSINV" }, */
-/* { "LEN","LEN" }, */
-/* { "LENB","LENB" }, */
-/* { "LINEST","LINEST" }, */
-/* { "LN","LN" }, */
-/* { "LOG","LOG" }, */
-/* { "LOG10","LOG10" }, */
-/* { "LOGEST","LOGEST" }, */
-/* { "LOGINV","LOGINV" }, */
-/* { "LOGNORMDIST","LOGNORMDIST" }, */
-/* { "LOOKUP","LOOKUP" }, */
-/* { "LOWER","LOWER" }, */
-/* { "MATCH","MATCH" }, */
-/* { "MAX","MAX" }, */
-/* { "MAXA","MAXA" }, */
-/* { "MDETERM","MDETERM" }, */
-/* { "MDURATION","MDURATION" }, */
-/* { "MEDIAN","MEDIAN" }, */
-/* { "MID","MID" }, */
-/* /\* { "MIDB","MIDB" }, *\/ */
-/* { "MIN","MIN" }, */
-/* { "MINA","MINA" }, */
-/* { "MINUTE","MINUTE" }, */
-/* { "MINVERSE","MINVERSE" }, */
-/* { "MIRR","MIRR" }, */
-/* { "MMULT","MMULT" }, */
-/* { "MOD","MOD" }, */
-/* { "MODE","MODE" }, */
-/* { "MONTH","MONTH" }, */
-/* { "MROUND","MROUND" }, */
-/* { "MULTINOMIAL","MULTINOMIAL" }, */
-/* /\* { "MULTIPLE.OPERATIONS","MULTIPLE.OPERATIONS" }, *\/ */
-/* /\* { "MUNIT","MUNIT" }, *\/ */
-/* { "N","N" }, */
-/* { "NA","NA" }, */
-/* { "NEGBINOMDIST","NEGBINOMDIST" }, */
-/* { "NETWORKDAYS","NETWORKDAYS" }, */
-/* { "NOMINAL","NOMINAL" }, */
-/* { "NORMDIST","NORMDIST" }, */
-/* { "NORMINV","NORMINV" }, */
-/* { "NOT","NOT" }, */
-/* { "NOW","NOW" }, */
-/* { "NPER","NPER" }, */
-/* { "NPV","NPV" }, */
-/* /\* { "NUMBERVALUE","NUMBERVALUE" }, *\/ */
-/* { "OCT2BIN","OCT2BIN" }, */
-/* { "OCT2DEC","OCT2DEC" }, */
-/* { "OCT2HEX","OCT2HEX" }, */
-/* { "ODD","ODD" }, */
-/* { "ODDFPRICE","ODDFPRICE" }, */
-/* { "ODDFYIELD","ODDFYIELD" }, */
-/* { "ODDLPRICE","ODDLPRICE" }, */
-/* { "ODDLYIELD","ODDLYIELD" }, */
-/* { "OFFSET","OFFSET" }, */
-/* { "OR","OR" }, */
-/* /\* { "PDURATION","PDURATION" }, *\/ */
-/* { "PEARSON","PEARSON" }, */
-/* { "PERCENTILE","PERCENTILE" }, */
-/* { "PERCENTRANK","PERCENTRANK" }, */
-/* { "PERMUT","PERMUT" }, */
-/* /\* { "PERMUTATIONA","PERMUTATIONA" }, *\/ */
-/* /\* { "PHI","PHI" }, *\/ */
-/* { "PI","PI" }, */
-/* { "PMT","PMT" }, */
-/* { "POISSON","POISSON" }, */
-/* { "POWER","POWER" }, */
-/* { "PPMT","PPMT" }, */
-/* { "PRICE","PRICE" }, */
-/* { "PRICEDISC","PRICEDISC" }, */
-/* { "PRICEMAT","PRICEMAT" }, */
-/* { "PROB","PROB" }, */
-/* { "PRODUCT","PRODUCT" }, */
-/* { "PROPER","PROPER" }, */
-/* { "PV","PV" }, */
-/* { "QUARTILE","QUARTILE" }, */
-/* { "QUOTIENT","QUOTIENT" }, */
-/* { "RADIANS","RADIANS" }, */
-/* { "RAND","RAND" }, */
-/* { "RANDBETWEEN","RANDBETWEEN" }, */
-/* { "RANK","RANK" }, */
-/* { "RATE","RATE" }, */
-/* { "RECEIVED","RECEIVED" }, */
-/* { "REPLACE","REPLACE" }, */
-/* /\* { "REPLACEB","REPLACEB" }, *\/ */
-/* { "REPT","REPT" }, */
-/* { "RIGHT","RIGHT" }, */
-/* /\* { "RIGHTB","RIGHTB" }, *\/ */
-/* { "ROMAN","ROMAN" }, */
-/* { "ROUND","ROUND" }, */
-/* { "ROUNDDOWN","ROUNDDOWN" }, */
-/* { "ROUNDUP","ROUNDUP" }, */
-/* { "ROW","ROW" }, */
-/* { "ROWS","ROWS" }, */
-/* /\* { "RRI","RRI" }, *\/ */
-/* { "RSQ","RSQ" }, */
-/* { "SEARCH","SEARCH" }, */
-/* /\* { "SEARCHB","SEARCHB" }, *\/ */
-/* { "SEC","SEC" }, */
-/* { "SECH","SECH" }, */
-/* { "SECOND","SECOND" }, */
-/* { "SERIESSUM","SERIESSUM" }, */
-/* /\* { "SHEET","SHEET" }, *\/ */
-/* /\* { "SHEETS","SHEETS" }, *\/ */
-/* { "SIGN","SIGN" }, */
-/* { "SIN","SIN" }, */
-/* { "SINH","SINH" }, */
-/* { "SKEW","SKEW" }, */
-/* { "SKEWP","SKEWP" }, */
-/* { "SLN","SLN" }, */
-/* { "SLOPE","SLOPE" }, */
-/* { "SMALL","SMALL" }, */
-/* { "SQRT","SQRT" }, */
-/* { "SQRTPI","SQRTPI" }, */
-/* { "STANDARDIZE","STANDARDIZE" }, */
-/* { "STDEV","STDEV" }, */
-/* { "STDEVA","STDEVA" }, */
-/* { "STDEVP","STDEVP" }, */
-/* { "STDEVPA","STDEVPA" }, */
-/* { "STEYX","STEYX" }, */
-/* { "SUBSTITUTE","SUBSTITUTE" }, */
-/* { "SUBTOTAL","SUBTOTAL" }, */
-/* { "SUM","SUM" }, */
-/* { "SUMIF","SUMIF" }, */
-/* /\* { "SUMIFS","SUMIFS" }, *\/ */
-/* { "SUMPRODUCT","SUMPRODUCT" }, */
-/* { "SUMSQ","SUMSQ" }, */
-/* { "SUMX2MY2","SUMX2MY2" }, */
-/* { "SUMX2PY2","SUMX2PY2" }, */
-/* { "SUMXMY2","SUMXMY2" }, */
-/* { "SYD","SYD" }, */
-/* { "T","T" }, */
-/* { "TAN","TAN" }, */
-/* { "TANH","TANH" }, */
-/* { "TBILLEQ","TBILLEQ" }, */
-/* { "TBILLPRICE","TBILLPRICE" }, */
-/* { "TBILLYIELD","TBILLYIELD" }, */
-/* { "TDIST","TDIST" }, */
-/* { "TEXT","TEXT" }, */
-/* { "TIME","TIME" }, */
-/* { "TIMEVALUE","TIMEVALUE" }, */
-/* { "TINV","TINV" }, */
-/* { "TODAY","TODAY" }, */
-/* { "TRANSPOSE","TRANSPOSE" }, */
-/* { "TREND","TREND" }, */
-/* { "TRIM","TRIM" }, */
-/* { "TRIMMEAN","TRIMMEAN" }, */
-/* { "TRUE","TRUE" }, */
-/* { "TRUNC","TRUNC" }, */
-/* { "TTEST","TTEST" }, */
-/* { "TYPE","TYPE" }, */
-/* { "UNICHAR","UNICHAR" }, */
-/* { "UNICODE","UNICODE" }, */
-/* /\* { "USDOLLAR","USDOLLAR" }, *\/ */
-/* { "UPPER","UPPER" }, */
-/* { "VALUE","VALUE" }, */
-/* { "VAR","VAR" }, */
-/* { "VARA","VARA" }, */
-/* { "VARP","VARP" }, */
-/* { "VARPA","VARPA" }, */
-/* { "VDB","VDB" }, */
-/* { "VLOOKUP","VLOOKUP" }, */
-/* { "WEEKDAY","WEEKDAY" }, */
-/* { "WEEKNUM","WEEKNUM" }, */
-/* { "WEIBULL","WEIBULL" }, */
-/* { "WORKDAY","WORKDAY" }, */
-/* { "XIRR","XIRR" }, */
-/* { "XNPV","XNPV" }, */
-/* { "XOR","XOR" }, */
-/* { "YEAR","YEAR" }, */
-/* { "YEARFRAC","YEARFRAC" }, */
-/* { "YIELD","YIELD" }, */
-/* { "YIELDDISC","YIELDDISC" }, */
-/* { "YIELDMAT","YIELDMAT" }, */
-/* { "ZTEST","ZTEST" }, */
+		{ "LEN","LEN" },
+		{ "LENB","LENB" },
+		{ "LINEST","LINEST" },
+		{ "LN","LN" },
+		{ "LOG","LOG" },
+		{ "LOG10","LOG10" },
+		{ "LOGEST","LOGEST" },
+		{ "LOGINV","LOGINV" },
+		{ "LOGNORMDIST","LOGNORMDIST" },
+		{ "LOOKUP","LOOKUP" },
+		{ "LOWER","LOWER" },
+		{ "MATCH","MATCH" },
+		{ "MAX","MAX" },
+		{ "MAXA","MAXA" },
+		{ "MDETERM","MDETERM" },
+		{ "MDURATION","MDURATION" },
+		{ "MEDIAN","MEDIAN" },
+		{ "MID","MID" },
+		{ "MIDB","MIDB" },
+		{ "MIN","MIN" },
+		{ "MINA","MINA" },
+		{ "MINUTE","MINUTE" },
+		{ "MINVERSE","MINVERSE" },
+		{ "MIRR","MIRR" },
+		{ "MMULT","MMULT" },
+		{ "MOD","MOD" },
+		{ "MODE","MODE" },
+		{ "MONTH","MONTH" },
+		{ "MROUND","MROUND" },
+		{ "MULTINOMIAL","MULTINOMIAL" },
+		/* { "MULTIPLE.OPERATIONS","MULTIPLE.OPERATIONS" },  not implemented */
+		/* { "MUNIT","MUNIT" },  not implemented */
+		{ "N","N" },
+		{ "NA","NA" },
+		{ "NEGBINOMDIST","NEGBINOMDIST" },
+		{ "NETWORKDAYS","NETWORKDAYS" },
+		{ "NOMINAL","NOMINAL" },
+		{ "NORMDIST","NORMDIST" },
+		{ "NORMINV","NORMINV" },
+		{ "NOT","NOT" },
+		{ "NOW","NOW" },
+		{ "NPER","NPER" },
+		{ "NPV","NPV" },
+		/* { "NUMBERVALUE","NUMBERVALUE" },  not implemented */
+		{ "OCT2BIN","OCT2BIN" },
+		{ "OCT2DEC","OCT2DEC" },
+		{ "OCT2HEX","OCT2HEX" },
+		{ "ODD","ODD" },
+		{ "ODDFPRICE","ODDFPRICE" },
+		{ "ODDFYIELD","ODDFYIELD" },
+		{ "ODDLPRICE","ODDLPRICE" },
+		{ "ODDLYIELD","ODDLYIELD" },
+		{ "OFFSET","OFFSET" },
+		{ "OR","OR" },
+		/* { "PDURATION","PDURATION" },  not implemented */
+		{ "PEARSON","PEARSON" },
+		{ "PERCENTILE","PERCENTILE" },
+		{ "PERCENTRANK","PERCENTRANK" },
+		{ "PERMUT","PERMUT" },
+		/* { "PERMUTATIONA","PERMUTATIONA" },  not implemented */
+		/* { "PHI","PHI" },  not implemented */
+		{ "PI","PI" },
+		{ "PMT","PMT" },
+		{ "POISSON","POISSON" },
+		{ "POWER","POWER" },
+		{ "PPMT","PPMT" },
+		{ "PRICE","PRICE" },
+		{ "PRICEDISC","PRICEDISC" },
+		{ "PRICEMAT","PRICEMAT" },
+		{ "PROB","PROB" },
+		{ "PRODUCT","PRODUCT" },
+		{ "PROPER","PROPER" },
+		{ "PV","PV" },
+		{ "QUARTILE","QUARTILE" },
+		{ "QUOTIENT","QUOTIENT" },
+		{ "RADIANS","RADIANS" },
+		{ "RAND","RAND" },
+		{ "RANDBETWEEN","RANDBETWEEN" },
+		{ "RANK","RANK" },
+		{ "RATE","RATE" },
+		{ "RECEIVED","RECEIVED" },
+		{ "REPLACE","REPLACE" },
+		/* { "REPLACEB","REPLACEB" },  not implemented */
+		{ "REPT","REPT" },
+		{ "RIGHT","RIGHT" },
+		{ "RIGHTB","RIGHTB" },
+		{ "ROMAN","ROMAN" },
+		{ "ROUND","ROUND" },
+		{ "ROUNDDOWN","ROUNDDOWN" },
+		{ "ROUNDUP","ROUNDUP" },
+		{ "ROW","ROW" },
+		{ "ROWS","ROWS" },
+		/* { "RRI","RRI" },  not implemented */
+		{ "RSQ","RSQ" },
+		{ "SEARCH","SEARCH" },
+		/* { "SEARCHB","SEARCHB" },  not implemented */
+		{ "SEC","SEC" },
+		{ "SECH","SECH" },
+		{ "SECOND","SECOND" },
+		{ "SERIESSUM","SERIESSUM" },
+		/* { "SHEET","SHEET" }, not implemented  */
+		/* { "SHEETS","SHEETS" },  not implemented */
+		{ "SIGN","SIGN" },
+		{ "SIN","SIN" },
+		{ "SINH","SINH" },
+		{ "SKEW","SKEW" },
+		{ "SKEWP","SKEWP" },
+		{ "SLN","SLN" },
+		{ "SLOPE","SLOPE" },
+		{ "SMALL","SMALL" },
+		{ "SQRT","SQRT" },
+		{ "SQRTPI","SQRTPI" },
+		{ "STANDARDIZE","STANDARDIZE" },
+		{ "STDEV","STDEV" },
+		{ "STDEVA","STDEVA" },
+		{ "STDEVP","STDEVP" },
+		{ "STDEVPA","STDEVPA" },
+		{ "STEYX","STEYX" },
+		{ "SUBSTITUTE","SUBSTITUTE" },
+		{ "SUBTOTAL","SUBTOTAL" },
+		{ "SUM","SUM" },
+		{ "SUMIF","SUMIF" },
+		/* { "SUMIFS","SUMIFS" },  not implemented */
+		{ "SUMPRODUCT","SUMPRODUCT" },
+		{ "SUMSQ","SUMSQ" },
+		{ "SUMX2MY2","SUMX2MY2" },
+		{ "SUMX2PY2","SUMX2PY2" },
+		{ "SUMXMY2","SUMXMY2" },
+		{ "SYD","SYD" },
+		{ "T","T" },
+		{ "TAN","TAN" },
+		{ "TANH","TANH" },
+		{ "TBILLEQ","TBILLEQ" },
+		{ "TBILLPRICE","TBILLPRICE" },
+		{ "TBILLYIELD","TBILLYIELD" },
+		{ "TDIST","TDIST" },
+		{ "TEXT","TEXT" },
+		{ "TIME","TIME" },
+		{ "TIMEVALUE","TIMEVALUE" },
+		{ "TINV","TINV" },
+		{ "TODAY","TODAY" },
+		{ "TRANSPOSE","TRANSPOSE" },
+		{ "TREND","TREND" },
+		{ "TRIM","TRIM" },
+		{ "TRIMMEAN","TRIMMEAN" },
+		{ "TRUE","TRUE" },
+		{ "TRUNC","TRUNC" },
+		{ "TTEST","TTEST" },
+		{ "TYPE","TYPE" },
+		{ "UNICHAR","UNICHAR" },
+		{ "UNICODE","UNICODE" },
+		/* { "USDOLLAR","USDOLLAR" }, this is a synonym to DOLLAR */
+		{ "UPPER","UPPER" },
+		{ "VALUE","VALUE" },
+		{ "VAR","VAR" },
+		{ "VARA","VARA" },
+		{ "VARP","VARP" },
+		{ "VARPA","VARPA" },
+		{ "VDB","VDB" },
+		{ "VLOOKUP","VLOOKUP" },
+		{ "WEEKDAY","WEEKDAY" },
+		{ "WEEKNUM","WEEKNUM" },
+		{ "WEIBULL","WEIBULL" },
+		{ "WORKDAY","WORKDAY" },
+		{ "XIRR","XIRR" },
+		{ "XNPV","XNPV" },
+		{ "XOR","XOR" },
+		{ "YEAR","YEAR" },
+		{ "YEARFRAC","YEARFRAC" },
+		{ "YIELD","YIELD" },
+		{ "YIELDDISC","YIELDDISC" },
+		{ "YIELDMAT","YIELDMAT" },
+		{ "ZTEST","ZTEST" },
 		{ NULL, NULL }
 	};
 	static GHashTable *namemap = NULL;
@@ -1976,12 +1822,18 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
 		GString *target = out->accum;
 			
 		if (new_name == NULL) {
-			char *new_u_name;
-			if (*(name + 1) == '.')
+			if (0 == g_ascii_strncasecmp (name, "ODF.", 4)) {
+				char *new_u_name;
+				new_u_name = g_ascii_strup (name + 4, -1);
+				g_string_append (target,  new_u_name);
+				g_free (new_u_name);
+			} else {
+				char *new_u_name;
 				g_string_append (target, "ORG.GNUMERIC.");
-			new_u_name = g_ascii_strup (name, -1);
-			g_string_append (target, new_u_name);
-			g_free (new_u_name);
+				new_u_name = g_ascii_strup (name, -1);
+				g_string_append (target, new_u_name);
+				g_free (new_u_name);
+			}
 		}
 		else
 			g_string_append (target, new_name);
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 978368e..7d541cd 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* dialog-function-select.c (describe_new_style): argument
+	  descriptions may refer to other arguments. Handle 
+	  GNM_FUNC_HELP_EXCEL and GNM_FUNC_HELP_ODF
+
 2009-06-20  Morten Welinder <terra gnome org>
 
 	* Release 1.9.9
diff --git a/src/dialogs/dialog-function-select.c b/src/dialogs/dialog-function-select.c
index 1344df8..9f0950e 100644
--- a/src/dialogs/dialog-function-select.c
+++ b/src/dialogs/dialog-function-select.c
@@ -448,7 +448,7 @@ describe_new_style (GtkTextBuffer *description, GnmFunc const *func)
 
 			ADD_BOLD_TEXT (text, colon - text);
 			ADD_TEXT (": ");
-			ADD_TEXT (colon + 1);
+			ADD_TEXT_WITH_ARGS (colon + 1);
 			ADD_TEXT ("\n");
 			break;
 		}
@@ -540,6 +540,22 @@ describe_new_style (GtkTextBuffer *description, GnmFunc const *func)
 			seen_extref = TRUE;
 			break;
 		}
+		case GNM_FUNC_HELP_EXCEL: {
+			const char *text = F_(help->text);
+			ADD_TEXT ("\n");
+			ADD_TEXT (_("Microsoft Excel: "));
+			ADD_TEXT_WITH_ARGS (text);
+			ADD_TEXT ("\n");
+			break;
+		}
+		case GNM_FUNC_HELP_ODF: {
+			const char *text = F_(help->text);
+			ADD_TEXT ("\n");
+			ADD_TEXT (_("ODF (OpenFormula): "));
+			ADD_TEXT_WITH_ARGS (text);
+			ADD_TEXT ("\n");
+			break;
+		}
 		default:
 			break;
 		}
diff --git a/src/func.c b/src/func.c
index 1d00315..78975eb 100644
--- a/src/func.c
+++ b/src/func.c
@@ -444,8 +444,9 @@ function_dump_defs (char const *filename, int dump_type)
 				case GNM_FUNC_HELP_EXAMPLES:
 				case GNM_FUNC_HELP_END:
 				case GNM_FUNC_HELP_NOTE:
+				case GNM_FUNC_HELP_EXCEL:
+				case GNM_FUNC_HELP_ODF:
 					break;
-
 				}
 			}
 			g_string_free (syntax, TRUE);
diff --git a/src/func.h b/src/func.h
index 550f4c4..1714f1b 100644
--- a/src/func.h
+++ b/src/func.h
@@ -142,7 +142,9 @@ typedef enum {
 	GNM_FUNC_HELP_NOTE,		/* <SPECIAL CASES (reference args using @{arg})>		(translated) */
 	GNM_FUNC_HELP_EXAMPLES,		/* <TEXT and EXAMPLES ?? get a hook to enter the sample ?? >	(translated) */
 	GNM_FUNC_HELP_SEEALSO,		/* name,name,name ...			(not translated) */
-	GNM_FUNC_HELP_EXTREF            /* wolfram:Sine.html wiki:en:Trigonometric_functions */
+	GNM_FUNC_HELP_EXTREF,           /* wolfram:Sine.html wiki:en:Trigonometric_functions */
+	GNM_FUNC_HELP_EXCEL,             /* <SPECIAL NOTE RE EXCEL (reference args using @{arg})>       	(translated) */
+	GNM_FUNC_HELP_ODF               /* <SPECIAL NOTE RE ODF (reference args using @{arg})>       	(translated) */
 } GnmFuncHelpType;
 typedef struct {
     GnmFuncHelpType	 type;



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