]> git.lyx.org Git - lyx.git/blob - src/Spacing.C
8db1f3caab297b3350f04ce76cc309611e6e28c5
[lyx.git] / src / Spacing.C
1 #include <config.h>
2
3 #include "Spacing.h"
4 using std::ios;
5
6 /// how can I put this inside of Spacing (class)
7 static
8 char const * spacing_string[] = {"single", "onehalf", "double", "other"};
9
10
11 void Spacing::writeFile(ostream & os) const
12 {
13         if (getSpace() == Spacing::Other) {
14                 os.setf(ios::showpoint|ios::fixed);
15                 os.precision(2);
16                 os << "\\spacing " << spacing_string[getSpace()]
17                    << " " << getValue() << " \n";
18         } else {
19                 os << "\\spacing " << spacing_string[getSpace()] << " \n";
20         }       
21 }