lyx_mirror/src/lengthcommon.C
Jean-Marc Lasgouttes b12370f61a fix list of graphics extensions in browser; fix reading of figinsets with width/height expressed as a %
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4439 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-20 12:39:09 +00:00

22 lines
522 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",
"text%", "col%", "page%", "line%", // width units
"theight%", "pheight%" };
LyXLength::UNIT unitFromString(string const & data)
{
int i = 0;
while (i < num_units && data != unit_name[i])
++i;
return static_cast<LyXLength::UNIT>(i);
}