[gnumeric] Add new Excel and Openformula units ("pica" and "picapt") to CONVERT.



commit 447af960fbbc59d1c75d9d3fc8143c7838af3f1c
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Jun 29 12:42:39 2010 -0600

    Add new Excel and Openformula units ("pica" and "picapt") to CONVERT.
    
    2010-06-29 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* functions.c (help_convert): adjust
    	(gnumeric_convert): add "pica" (different from "Pica") and
    	  "picapt" (synonym for "Pica").

 NEWS                       |    3 +++
 plugins/fn-eng/ChangeLog   |    6 ++++++
 plugins/fn-eng/functions.c |   12 +++++++++---
 3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index 2108e86..bfd8f42 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 Gnumeric 1.10.8
 
+Andreas:
+	* Add new Excel and Openformula units ("pica" and "picapt") to CONVERT.
+
 --------------------------------------------------------------------------
 Gnumeric 1.10.7
 
diff --git a/plugins/fn-eng/ChangeLog b/plugins/fn-eng/ChangeLog
index 506d565..6321fcd 100644
--- a/plugins/fn-eng/ChangeLog
+++ b/plugins/fn-eng/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-29 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* functions.c (help_convert): adjust
+	(gnumeric_convert): add "pica" (different from "Pica") and
+	  "picapt" (synonym for "Pica").
+
 2010-06-28  Morten Welinder <terra gnome org>
 
 	* Release 1.10.7
diff --git a/plugins/fn-eng/functions.c b/plugins/fn-eng/functions.c
index 479fdf5..bf763d9 100644
--- a/plugins/fn-eng/functions.c
+++ b/plugins/fn-eng/functions.c
@@ -677,7 +677,9 @@ static GnmFuncHelp const help_convert[] = {
 					"\t'ft'  \t\t\tFoot\n"
 					"\t'yd'  \t\tYard\n"
 					"\t'ang' \t\tAngstrom\n"
-					"\t'Pica'\t\tPica\n\n"
+					"\t'Pica'\t\tPica Points\n\n"
+					"\t'picapt'\t\tPica Points\n\n"
+					"\t'pica'\t\tPica\n\n"
 					"Time:\n"
 					"\t'yr'  \t\t\tYear\n"
 					"\t'day' \t\tDay\n"
@@ -742,7 +744,8 @@ static GnmFuncHelp const help_convert[] = {
 					"\t'a'  \tatto  \t\t1E-18\n"
 					"\t'z'  \tzepto \t\t1E-21\n"
 					"\t'y'  \tyocto \t\t1E-24") },
- 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+ 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible (except \"picapt\").") },
+ 	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.") },
 	{ GNM_FUNC_HELP_EXAMPLES, "=CONVERT(3,\"lbm\",\"g\")" },
         { GNM_FUNC_HELP_EXAMPLES, "=CONVERT(5.8,\"m\",\"in\")" },
         { GNM_FUNC_HELP_EXAMPLES, "=CONVERT(7.9,\"cal\",\"J\")" },
@@ -830,7 +833,8 @@ gnumeric_convert (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 #define one_m_to_ft     (one_m_to_in / 12)
 #define one_m_to_yd     (one_m_to_ft / 3)
 #define one_m_to_ang    GNM_const (1e10)
-#define one_m_to_Pica   2834.645669
+#define one_m_to_pica   236.2204724409449
+#define one_m_to_Pica   one_m_to_pica * 12
 
 	/* Time constants */
 #define one_yr_to_day   365.25
@@ -914,6 +918,8 @@ gnumeric_convert (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 		{ "yd",   one_m_to_yd },
 		{ "ang",  one_m_to_ang },
 		{ "Pica", one_m_to_Pica },
+		{ "picapt", one_m_to_Pica },
+		{ "pica", one_m_to_pica },
 		{ NULL,   0.0 }
 	};
 



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