summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2013-09-24 15:49:31 +0000
committerMartin Owens <doctormo@gmail.com>2013-09-24 15:49:31 +0000
commitcb9e75a639073d83a523b2dff5ca91be730faf19 (patch)
tree2ec120176e1f385c795d6ef5e8e0c7a08357e022
parentchange names for displayName and detailedDescription, improve char code and r... (diff)
downloadinkscape-cb9e75a639073d83a523b2dff5ca91be730faf19.tar.gz
inkscape-cb9e75a639073d83a523b2dff5ca91be730faf19.zip
Replace xml node get_double with simple direct value.
Fixed bugs: - https://launchpad.net/bugs/1229558 (bzr r12585)
-rw-r--r--src/sp-flowtext.cpp2
-rw-r--r--src/xml/repr-util.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index 23eba73b1..5e13218f5 100644
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
@@ -204,7 +204,7 @@ void SPFlowtext::set(unsigned int key, const gchar* value) {
if ( val == NULL ) {
this->par_indent = 0.0;
} else {
- sp_repr_get_double((Inkscape::XML::Node*)opts, "par-indent", &this->par_indent);
+ this->par_indent = g_ascii_strtod(val, NULL);
}
}
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 8c8425de0..12280ea5a 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -432,13 +432,11 @@ unsigned int sp_repr_get_int(Inkscape::XML::Node *repr, gchar const *key, int *v
unsigned int sp_repr_get_double(Inkscape::XML::Node *repr, gchar const *key, double *val)
{
- gchar const *v;
-
g_return_val_if_fail(repr != NULL, FALSE);
g_return_val_if_fail(key != NULL, FALSE);
g_return_val_if_fail(val != NULL, FALSE);
- v = repr->attribute(key);
+ gchar const *v = repr->attribute(key);
if (v != NULL) {
*val = g_ascii_strtod(v, NULL);