Fix import of latex documents with scaled fonts.

This commit is contained in:
Enrico Forestieri 2014-07-11 11:21:45 +02:00
parent 60a1b3b83c
commit b60b505fd8
3 changed files with 4 additions and 1 deletions

View File

@ -217,6 +217,7 @@ void init(int argc, char * argv[])
// Set environment's default locale // Set environment's default locale
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
setlocale(LC_NUMERIC, "C");
// Make sure that the TEMP variable is set // Make sure that the TEMP variable is set
// and sync the Windows environment. // and sync the Windows environment.

View File

@ -49,6 +49,7 @@ void init(int argc, char * argv[])
// Set environment's default locale // Set environment's default locale
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
setlocale(LC_NUMERIC, "C");
} }

View File

@ -424,7 +424,8 @@ bool scale_as_percentage(string const & scale, string & percentage)
if (pos != string::npos) { if (pos != string::npos) {
string value = scale.substr(pos + 1); string value = scale.substr(pos + 1);
if (isStrDbl(value)) { if (isStrDbl(value)) {
percentage = convert<string>(100 * convert<double>(value)); percentage = convert<string>(
static_cast<int>(100 * convert<double>(value)));
return true; return true;
} }
} }