2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-1999 The LyX Team.
10 * ====================================================== */
17 using std::istringstream;
22 #include "support/LOstream.h"
45 float getValue() const
48 case Single: return 1.0;
49 case Onehalf: return 1.25;
50 case Double: return 1.667;
51 case Other: return value;
56 Spacing::Space getSpace() const
61 void set(Spacing::Space sp, float val = 1.0)
65 switch(int(val * 1000 + 0.5)) {
66 case 1000: space = Single; break;
67 case 1250: space = Onehalf; break;
68 case 1667: space = Double; break;
69 default: value = val; break;
74 void set(Spacing::Space sp, char const * val)
78 istringstream istr(val);
86 void writeFile(ostream &);
88 friend bool operator!=(Spacing const & a, Spacing const & b)
90 if (a.space == b.space && a.getValue() == b.getValue())