From 7ed2fd359e5d30e850eb0ec5c84ed2e2627b017d Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 10 Feb 2017 23:25:22 +0100 Subject: 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) --- src/file-update.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/file-update.cpp') 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 +#include #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) -- cgit v1.2.3