commit 154cd4111964b6e009f323c3d55249b52d03cebd
Author: Enrico Forestieri <for...@lyx.org>
Date:   Sun Aug 3 18:42:04 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 0676cad..c87b766 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;
                }
        }
diff --git a/status.21x b/status.21x
index d58771c..7997e0f 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

Reply via email to