]> git.lyx.org Git - lyx.git/blobdiff - src/Spacing.C
Real fix from Bernhard Roider
[lyx.git] / src / Spacing.C
index 8846a742ea016f28fc4f3591b1af9ae95e0b92ed..35eecde79e0d2b268d4e26fdaa1ea6cb8f9ecb56 100644 (file)
 #include <sstream>
 #include <string>
 
-using lyx::support::strToDbl;
 
-//using std::ios;
+namespace lyx {
+
+
 using std::ostream;
 using std::ostringstream;
 using std::string;
@@ -45,11 +46,11 @@ string const Spacing::getValueAsString() const
 
 double Spacing::getValue() const
 {
-       return strToDbl(getValueAsString());
+       return convert<double>(getValueAsString());
 }
 
 
-void Spacing::set(Spacing::Space sp, float val)
+void Spacing::set(Spacing::Space sp, double val)
 {
        set(sp, convert<string>(val));
 }
@@ -59,7 +60,7 @@ void Spacing::set(Spacing::Space sp, string const & val)
 {
        space = sp;
        if (sp == Other) {
-               switch (int(strToDbl(val) * 1000 + 0.5)) {
+               switch (int(convert<double>(val) * 1000 + 0.5)) {
                case 1000:
                        space = Single;
                        break;
@@ -129,3 +130,6 @@ string const Spacing::writeEnvirEnd() const
        }
        return string();
 }
+
+
+} // namespace lyx