[gnumeric] Fix import of currency symbols from ODF.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Fix import of currency symbols from ODF.
- Date: Tue, 23 Jun 2009 02:34:38 -0400 (EDT)
commit d648e7e9ef46805463ecc2ab189766e7e5cc6b80
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Tue Jun 23 00:33:28 2009 -0600
Fix import of currency symbols from ODF.
2009-06-23 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_currency_symbol_end): mark the
currency symbol as such.
2009-06-23 Andreas J. Guelzow <aguelzow pyrshep ca>
* functions.c (help_leftb): add warning
(help_midb): add warning
(help_rightb): add warning
NEWS | 1 +
plugins/fn-string/ChangeLog | 6 ++++++
plugins/fn-string/functions.c | 15 +++++++++------
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-read.c | 7 ++++++-
5 files changed, 27 insertions(+), 7 deletions(-)
---
diff --git a/NEWS b/NEWS
index 209a9ba..4cd4c33 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Andreas:
* Implement new functions LEFTB, MIDB, RIGHTB.
* Implement ASC and add new function JIS.
* Fix printing crash. [#586672]
+ * Fix import of currency symbols from ODF.
Morten:
* Make SUMIF/COUNTIF and the D* functions understand pattern. [#586215]
diff --git a/plugins/fn-string/ChangeLog b/plugins/fn-string/ChangeLog
index 030b866..014a91f 100644
--- a/plugins/fn-string/ChangeLog
+++ b/plugins/fn-string/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-23 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c (help_leftb): add warning
+ (help_midb): add warning
+ (help_rightb): add warning
+
2009-06-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* plugin.xml.in: new JIS
diff --git a/plugins/fn-string/functions.c b/plugins/fn-string/functions.c
index e76c3af..fc1826c 100644
--- a/plugins/fn-string/functions.c
+++ b/plugins/fn-string/functions.c
@@ -317,9 +317,10 @@ 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_("The semantics of this function is subject to change as various applications implement it.")},
{ 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_EXCEL, F_("While this function is syntactically Excel compatible, the differences in the underlying text encoding will usually yield different results.")},
+ { GNM_FUNC_HELP_ODF, F_("While this function is OpenFormula compatible, most of its behavior is, at this time, implementation specific.")},
{ 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 }
@@ -413,8 +414,9 @@ 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_NOTE, F_("The semantics of this function is subject to change as various applications implement it.")},
+ { GNM_FUNC_HELP_EXCEL, F_("While this function is syntactically Excel compatible, the differences in the underlying text encoding will usually yield different results.")},
+ { GNM_FUNC_HELP_ODF, F_("While this function is OpenFormula compatible, most of its behavior is, at this time, implementation specific.")},
{ 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 }
@@ -485,9 +487,10 @@ 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_("The semantics of this function is subject to change as various applications implement it.")},
{ 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_EXCEL, F_("While this function is syntactically Excel compatible, the differences in the underlying text encoding will usually yield different results.")},
+ { GNM_FUNC_HELP_ODF, F_("While this function is OpenFormula compatible, most of its behavior is, at this time, implementation specific.")},
{ 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 }
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index a25cf7d..e28cc31 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-23 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-read.c (odf_currency_symbol_end): mark the
+ currency symbol as such.
+
2009-06-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (xl_find_format): We may not use '+' inside a
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 97f9857..5c966d9 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -1842,8 +1842,13 @@ odf_currency_symbol_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
if (state->accum_fmt == NULL)
return;
-
+ if (0 == strcmp (xin->content->str, "$")) {
+ g_string_append_c (state->accum_fmt, '$');
+ return;
+ }
+ g_string_append (state->accum_fmt, "[$");
g_string_append (state->accum_fmt, xin->content->str);
+ g_string_append_c (state->accum_fmt, ']');
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]