]> git.lyx.org Git - features.git/commitdiff
Fix import of latex documents with scaled fonts.
authorEnrico Forestieri <forenr@lyx.org>
Fri, 11 Jul 2014 09:21:45 +0000 (11:21 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Fri, 11 Jul 2014 09:21:45 +0000 (11:21 +0200)
src/support/os_cygwin.cpp
src/support/os_unix.cpp
src/tex2lyx/Preamble.cpp

index 4179d491c300b3a108418eb46485ab0520b59e33..e0c0bd17a04a0e45217d8e45f1f56b9b7729da65 100644 (file)
@@ -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.
index 03dfb381c22480c03d08fcfaac692bb7154d4007..b298a7da85efd444e5640baa6a7dff9e82637d49 100644 (file)
@@ -49,6 +49,7 @@ void init(int argc, char * argv[])
 
        // Set environment's default locale
        setlocale(LC_ALL, "");
+       setlocale(LC_NUMERIC, "C");
 }
 
 
index d9c823f81dbc1e3153dbf4ed42cd9409270a20c3..934420a9c1cd364ae4793a5a4a82674e26795d16 100644 (file)
@@ -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;
                }
        }