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