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 * ====================================================== */
16 #include "support/LOstream.h"
40 float getValue() const
43 case Single: return 1.0;
44 case Onehalf: return 1.25;
45 case Double: return 1.667;
46 case Other: return value;
51 Spacing::Space getSpace() const
56 void set(Spacing::Space sp, float val = 1.0)
60 switch(int(val * 1000 + 0.5)) {
61 case 1000: space = Single; break;
62 case 1250: space = Onehalf; break;
63 case 1667: space = Double; break;
64 default: value = val; break;
69 void set(Spacing::Space sp, char const * val)
72 sscanf(val, "%f", &fval);
76 void writeFile(ostream &);
78 friend bool operator!=(Spacing const & a, Spacing const & b)
80 if (a.space == b.space && a.getValue() == b.getValue())