From b60b505fd82866dc57d4522b3ff73ae5bd337612 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Fri, 11 Jul 2014 11:21:45 +0200 Subject: [PATCH] Fix import of latex documents with scaled fonts. --- src/support/os_cygwin.cpp | 1 + src/support/os_unix.cpp | 1 + src/tex2lyx/Preamble.cpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/support/os_cygwin.cpp b/src/support/os_cygwin.cpp index 4179d491c3..e0c0bd17a0 100644 --- a/src/support/os_cygwin.cpp +++ b/src/support/os_cygwin.cpp @@ -217,6 +217,7 @@ void init(int argc, char * argv[]) // Set environment's default locale setlocale(LC_ALL, ""); + setlocale(LC_NUMERIC, "C"); // Make sure that the TEMP variable is set // and sync the Windows environment. diff --git a/src/support/os_unix.cpp b/src/support/os_unix.cpp index 03dfb381c2..b298a7da85 100644 --- a/src/support/os_unix.cpp +++ b/src/support/os_unix.cpp @@ -49,6 +49,7 @@ void init(int argc, char * argv[]) // Set environment's default locale setlocale(LC_ALL, ""); + setlocale(LC_NUMERIC, "C"); } diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index d9c823f81d..934420a9c1 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -424,7 +424,8 @@ bool scale_as_percentage(string const & scale, string & percentage) if (pos != string::npos) { string value = scale.substr(pos + 1); if (isStrDbl(value)) { - percentage = convert(100 * convert(value)); + percentage = convert( + static_cast(100 * convert(value))); return true; } } -- 2.39.5