]> git.lyx.org Git - lyx.git/blobdiff - src/Spacing.C
unify toclevel for articles and reports/books; proper numbering of Paragraph/SubParag...
[lyx.git] / src / Spacing.C
index c4fcdb1edddedee8902a7b9e2b3f0769b450e2d2..d8ca162657ee33a306e4e61c4b2836443fddaff3 100644 (file)
 
 #include "Spacing.h"
 #include "support/lstrings.h"
-#include "support/tostr.h"
+#include "support/convert.h"
 
 #include <sstream>
 #include <string>
 
-using lyx::support::strToDbl;
 
-//using std::ios;
 using std::ostream;
 using std::ostringstream;
 using std::string;
@@ -45,11 +43,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 +57,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;