X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSpacing.h;h=273786aced0a77d2d2dddc84543b36063e749bf8;hb=056550b31135c3812825c86719c4ceb7054910b5;hp=4d25b3fd9684d8872bf44ed32b1a2d271892fbbb;hpb=44cd0fc9a1687cc63911c7f98d978594458e7813;p=lyx.git diff --git a/src/Spacing.h b/src/Spacing.h index 4d25b3fd96..273786aced 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -1,6 +1,6 @@ // -*- C++ -*- /** - * \file Spacing.h + * \file src/Spacing.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -13,6 +13,10 @@ #define SPACING_H #include +#include + + +namespace lyx { /// @@ -32,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) { @@ -45,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; /// @@ -63,7 +69,7 @@ private: /// Space space; /// - float value; + std::string value; /// names of line spacing static std::string const spacing_string[]; }; @@ -74,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(); } /// @@ -82,5 +88,8 @@ inline bool operator!=(Spacing const & a, Spacing const & b) { return !(a == b); + + +} // namespace lyx } #endif