[gnumeric] get rid of odf_parse_float
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] get rid of odf_parse_float
- Date: Wed, 16 Apr 2014 05:13:40 +0000 (UTC)
commit dd662b85031e2d475e992d3e19335c5e15aaa5fc
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Tue Apr 15 23:13:12 2014 -0600
get rid of odf_parse_float
2014-04-15 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_parse_float): delete
(odf_custom_shape_end): use gnm_strto
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-read.c | 19 ++-----------------
2 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index b1379cc..b2e54f3 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-15 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-read.c (odf_parse_float): delete
+ (odf_custom_shape_end): use gnm_strto
+
2014-04-15 Morten Welinder <terra gnome org>
* openoffice-read.c (oo_attr_float): Use gnm_float, not double.
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 3a9c195..c732566 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -1149,7 +1149,7 @@ oo_attr_percent_or_distance (GsfXMLIn *xin, xmlChar const * const *attrs,
gboolean *found_percent)
{
char *end;
- double tmp;
+ gnm_float tmp;
g_return_val_if_fail (attrs != NULL, FALSE);
g_return_val_if_fail (attrs[0] != NULL, FALSE);
@@ -9427,21 +9427,6 @@ odf_custom_shape_replace_object (OOParseState *state, SheetObject *so)
state->chart.so = so;
}
-static gnm_float
-odf_parse_float (char *text, char **end)
-{
- gnm_float x = gnm_strto (text, end);
-
- if (text == *end)
- x = 1.;
-
- if (**end == 'E' || **end == 'e') {
- gnm_float exp = gnm_strto (*end + 1, end);
- x *= gnm_pow10 (exp);
- }
- return x;
-}
-
static double
odf_get_cs_formula_value (GsfXMLIn *xin, char const *key, GHashTable *vals, gint level)
{
@@ -9696,7 +9681,7 @@ odf_custom_shape_end (GsfXMLIn *xin, GsfXMLBlob *blob)
while (*next != 0) {
char *end = next;
- gnm_float x = odf_parse_float (next, &end);
+ gnm_float x = gnm_strto (next, &end);
if (end > next) {
double *xp = g_new (double, 1);
char *name = g_strdup_printf ("$%i", i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]