X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSpacing.h;h=273786aced0a77d2d2dddc84543b36063e749bf8;hb=4080450341a4ed1cec0e4f72d9c917d2c7378157;hp=495a97d16aadaf71b7cbb7e3ff824420e7717e85;hpb=f67fd3cb29b4e57c4a28ec1e94a47be4799d343c;p=lyx.git diff --git a/src/Spacing.h b/src/Spacing.h index 495a97d16a..273786aced 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -16,6 +16,9 @@ #include +namespace lyx { + + /// class Spacing { public: @@ -33,9 +36,9 @@ public: Default }; /// - Spacing() : space(Default), value(1.0) {} + Spacing() : space(Default), value("1.0") {} /// - Spacing(Spacing::Space sp, float val = 1.0) { + Spacing(Spacing::Space sp, double val = 1.0) { set(sp, val); } Spacing(Spacing::Space sp, std::string const & val) { @@ -46,13 +49,15 @@ public: return space == Default; } /// - float getValue() const; + std::string const getValueAsString() const; + /// + double getValue() const; /// Spacing::Space getSpace() const { return space; } /// - void set(Spacing::Space sp, float val = 1.0); + void set(Spacing::Space sp, double val = 1.0); /// - void set(Spacing::Space sp, std::string const & val) ; + void set(Spacing::Space sp, std::string const & val); /// void writeFile(std::ostream &, bool para = false) const; /// @@ -64,7 +69,7 @@ private: /// Space space; /// - float value; + std::string value; /// names of line spacing static std::string const spacing_string[]; }; @@ -75,7 +80,7 @@ inline bool operator==(Spacing const & a, Spacing const & b) { return a.getSpace() == b.getSpace() - && a.getValue() == b.getValue(); + && a.getValueAsString() == b.getValueAsString(); } /// @@ -83,5 +88,8 @@ inline bool operator!=(Spacing const & a, Spacing const & b) { return !(a == b); + + +} // namespace lyx } #endif