X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSpacing.C;h=35eecde79e0d2b268d4e26fdaa1ea6cb8f9ecb56;hb=024275f0690b41634e26dabe8758e3dc6cd31ee2;hp=c4fcdb1edddedee8902a7b9e2b3f0769b450e2d2;hpb=6a55be9506b112110826cf63bc21786044569f1d;p=lyx.git diff --git a/src/Spacing.C b/src/Spacing.C index c4fcdb1edd..35eecde79e 100644 --- a/src/Spacing.C +++ b/src/Spacing.C @@ -13,14 +13,15 @@ #include "Spacing.h" #include "support/lstrings.h" -#include "support/tostr.h" +#include "support/convert.h" #include #include -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(getValueAsString()); } -void Spacing::set(Spacing::Space sp, float val) +void Spacing::set(Spacing::Space sp, double val) { set(sp, convert(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(val) * 1000 + 0.5)) { case 1000: space = Single; break; @@ -129,3 +130,6 @@ string const Spacing::writeEnvirEnd() const } return string(); } + + +} // namespace lyx