]> git.lyx.org Git - lyx.git/blob - src/lengthcommon.C
fix starting up which binary is really a symlink; make sure insetinclude file browser...
[lyx.git] / src / lengthcommon.C
1 #include <config.h>
2
3 #include "lengthcommon.h"
4
5 int const num_units = LyXLength::UNIT_NONE;
6
7 // I am not sure if "mu" should be possible to select (Lgb)
8 char const * unit_name[num_units] = { "sp", "pt", "bp", "dd",
9                                       "mm", "pc", "cc", "cm",
10                                       "in", "ex", "em", "mu",
11                                       "%",  "c%", "p%", "l%" };
12
13
14 LyXLength::UNIT unitFromString(string const & data)
15 {
16         int i = 0;
17         while (i < num_units && data != unit_name[i])
18                 ++i;
19         return static_cast<LyXLength::UNIT>(i);
20 }