mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
6b5a92d3d6
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3501 a592a061-630c-0410-9148-cb99ea01b6c8
21 lines
485 B
C
21 lines
485 B
C
#include <config.h>
|
|
|
|
#include "lengthcommon.h"
|
|
|
|
int const num_units = LyXLength::UNIT_NONE;
|
|
|
|
// I am not sure if "mu" should be possible to select (Lgb)
|
|
char const * unit_name[num_units] = { "sp", "pt", "bp", "dd",
|
|
"mm", "pc", "cc", "cm",
|
|
"in", "ex", "em", "mu",
|
|
"t%", "c%", "p%", "l%" };
|
|
|
|
|
|
LyXLength::UNIT unitFromString(string const & data)
|
|
{
|
|
int i = 0;
|
|
while (i < num_units && data != unit_name[i])
|
|
++i;
|
|
return static_cast<LyXLength::UNIT>(i);
|
|
}
|