From 154cd4111964b6e009f323c3d55249b52d03cebd Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 3 Aug 2014 18:42:04 +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 ++- status.21x | 2 ++ 4 files changed, 6 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 0676cad19b..c87b766d08 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; } } diff --git a/status.21x b/status.21x index d58771c1bf..7997e0f26a 100644 --- a/status.21x +++ b/status.21x @@ -57,6 +57,8 @@ What's new - Fix wrong line spacing in last paragraph of a document if the font size is non-normal (bug 9231). +- Fix import of latex documents with scaled fonts. + * LYX2LYX -- 2.39.5