]> git.lyx.org Git - lyx.git/blobdiff - src/support/convert.C
hopefully fix tex2lyx linking.
[lyx.git] / src / support / convert.C
index a3014fe41864d7d77def4d9b56fd8ed00cfbcec9..894d7647293cdb05d9514665bc6d4084439aa66c 100644 (file)
@@ -19,6 +19,9 @@
 
 #include <string>
 
+
+namespace lyx {
+
 using lyx::docstring;
 
 using boost::lexical_cast;
@@ -124,6 +127,13 @@ int convert<int>(string const s)
 }
 
 
+template<>
+int convert<int>(docstring const s)
+{
+       return strtol(lyx::to_ascii(s).c_str(), 0, 10);
+}
+
+
 template<>
 unsigned int convert<unsigned int>(string const s)
 {
@@ -150,3 +160,6 @@ double convert<double>(char const * cptr)
 {
        return strtod(cptr, 0);
 }
+
+
+} // namespace lyx