commit b60b505fd82866dc57d4522b3ff73ae5bd337612 Author: Enrico Forestieri <for...@lyx.org> Date: Fri Jul 11 11:21:45 2014 +0200
Fix import of latex documents with scaled fonts. diff --git a/src/support/os_cygwin.cpp b/src/support/os_cygwin.cpp index 4179d49..e0c0bd1 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 03dfb38..b298a7d 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 d9c823f..934420a 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<string>(100 * convert<double>(value)); + percentage = convert<string>( + static_cast<int>(100 * convert<double>(value))); return true; } }