]> git.lyx.org Git - lyx.git/blobdiff - src/support/convert.cpp
Fix bug #9193: Spacing modification not exact
[lyx.git] / src / support / convert.cpp
index 9c69abbce64cd71b080c27dee4a048cc7ebc71d6..6b985f50baf26042d972fa8d4ea8f70127763ea1 100644 (file)
@@ -17,6 +17,8 @@
 #include <boost/lexical_cast.hpp>
 
 #include <string>
+#include <sstream>
+//needed for Mac OSX 10.5.2 Leopard
 #include <cstdlib>
 
 using namespace std;
@@ -105,14 +107,18 @@ docstring convert<docstring>(long l)
 template<>
 string convert<string>(float f)
 {
-       return lexical_cast<string>(f);
+       std::ostringstream val;
+       val << f;
+       return val.str();
 }
 
 
 template<>
 string convert<string>(double d)
 {
-       return lexical_cast<string>(d);
+       std::ostringstream val;
+       val << d;
+       return val.str();
 }