summaryrefslogtreecommitdiffstats
path: root/src/util/units.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-09-12 23:14:21 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-09-12 23:14:21 +0000
commit51c44884aca2d41b8b38df329835e2a3c2d4e0ef (patch)
tree3b7576e868b9edbabc1bc77d5e0320971ddad243 /src/util/units.cpp
parentFinish fixing document unit change undo bug. (diff)
parentMerge in fix for critical blocker #166371 (diff)
downloadinkscape-51c44884aca2d41b8b38df329835e2a3c2d4e0ef.tar.gz
inkscape-51c44884aca2d41b8b38df329835e2a3c2d4e0ef.zip
Merge from trunk.
(bzr r12475.1.16)
Diffstat (limited to 'src/util/units.cpp')
-rw-r--r--src/util/units.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/units.cpp b/src/util/units.cpp
index 2b09337b6..414885040 100644
--- a/src/util/units.cpp
+++ b/src/util/units.cpp
@@ -257,9 +257,10 @@ Quantity UnitTable::getQuantity(Glib::ustring const& q) const
// Extract value
double value = 0;
- Glib::RefPtr<Glib::Regex> value_regex = Glib::Regex::create("[-+]*[\\d+]*\\.*[\\d+]*[eE]*[-+]*\\d+");
+ Glib::RefPtr<Glib::Regex> value_regex = Glib::Regex::create("[-+]*[\\d+]*[\\.,]*[\\d+]*[eE]*[-+]*\\d+");
if (value_regex->match(q, match_info)) {
- value = atof(match_info.fetch(0).c_str());
+ std::istringstream tmp_v(match_info.fetch(0));
+ tmp_v >> value;
}
// Extract unit abbreviation