X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSpacing.h;h=273786aced0a77d2d2dddc84543b36063e749bf8;hb=056550b31135c3812825c86719c4ceb7054910b5;hp=2a3bb755dddade3ccf61f49bcd8df3f9428fde11;hpb=9d0ba3ddf295225939fcb04ffc11d6de509abdc8;p=lyx.git diff --git a/src/Spacing.h b/src/Spacing.h index 2a3bb755dd..273786aced 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -1,24 +1,23 @@ // -*- C++ -*- -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2001 The LyX Team. +/** + * \file src/Spacing.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * ====================================================== */ + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. + */ #ifndef SPACING_H #define SPACING_H -#ifdef __GNUG__ -#pragma interface -#endif - #include +#include + + +namespace lyx { -#include "LString.h" /// class Spacing { @@ -37,12 +36,12 @@ 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, string const & val) { + Spacing(Spacing::Space sp, std::string const & val) { set(sp, val); } /// @@ -50,27 +49,29 @@ 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, string const & val) ; + void set(Spacing::Space sp, std::string const & val); /// void writeFile(std::ostream &, bool para = false) const; /// - string const writeEnvirBegin() const; + std::string const writeEnvirBegin() const; /// - string const writeEnvirEnd() const; - + std::string const writeEnvirEnd() const; + private: /// Space space; /// - float value; + std::string value; /// names of line spacing - static string const spacing_string[]; + static std::string const spacing_string[]; }; @@ -79,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(); } /// @@ -87,5 +88,8 @@ inline bool operator!=(Spacing const & a, Spacing const & b) { return !(a == b); + + +} // namespace lyx } #endif