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 * ====================================================== */
21 #include "support/LOstream.h"
44 float getValue() const
47 case Single: return 1.0;
48 case Onehalf: return 1.25;
49 case Double: return 1.667;
50 case Other: return value;
55 Spacing::Space getSpace() const
60 void set(Spacing::Space sp, float val = 1.0)
64 switch(int(val * 1000 + 0.5)) {
65 case 1000: space = Single; break;
66 case 1250: space = Onehalf; break;
67 case 1667: space = Double; break;
68 default: value = val; break;
73 void set(Spacing::Space sp, char const * val)
77 istringstream istr(val);
85 void writeFile(ostream &);
87 friend bool operator!=(Spacing const & a, Spacing const & b)
89 if (a.space == b.space && a.getValue() == b.getValue())