summaryrefslogtreecommitdiffstats
path: root/src/file-update.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-02-10 22:25:22 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2017-02-10 22:25:22 +0000
commit7ed2fd359e5d30e850eb0ec5c84ed2e2627b017d (patch)
treef8f6622623ebd345d4a98cf646076ef926368ae5 /src/file-update.cpp
parentAdd missing "#include <glibmm/regex.h>" for previous commit (diff)
downloadinkscape-7ed2fd359e5d30e850eb0ec5c84ed2e2627b017d.tar.gz
inkscape-7ed2fd359e5d30e850eb0ec5c84ed2e2627b017d.zip
temporarily sets decimal separator locale to C to fix files correctly (Users with a comma decimal separator in their locale had files broken by the line update fix)
Fixed bugs: - https://launchpad.net/bugs/1663075 (bzr r15503)
Diffstat (limited to 'src/file-update.cpp')
-rw-r--r--src/file-update.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/file-update.cpp b/src/file-update.cpp
index 40a8bc834..2275ab1c3 100644
--- a/src/file-update.cpp
+++ b/src/file-update.cpp
@@ -19,6 +19,7 @@
#include "style.h"
#include "document.h"
#include <string>
+#include <clocale>
#include "text-editing.h"
using namespace std;
@@ -149,10 +150,12 @@ void fix_update(SPObject *o) {
void sp_file_convert_text_baseline_spacing(SPDocument *doc)
{
+ setlocale(LC_NUMERIC,"C");
sp_file_text_run_recursive(fix_blank_line, doc->getRoot());
sp_file_text_run_recursive(fix_line_spacing, doc->getRoot());
sp_file_text_run_recursive(fix_font_size, doc->getRoot());
sp_file_text_run_recursive(fix_update, doc->getRoot());
+ setlocale(LC_NUMERIC,"");
}
void sp_file_convert_font_name(SPDocument *doc)