2 * \file lengthcommon.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Matthias Ettrich
10 * Full author contact details are available in file CREDITS.
25 // I am not sure if "mu" should be possible to select (Lgb)
28 char const * const unit_name[] = {
29 "sp", "pt", "bp", "dd", "mm", "pc",
30 "cc", "cm", "in", "ex", "em", "mu",
31 "text%", "col%", "page%", "line%",
32 "theight%", "pheight%", "" };
34 int const num_units = int(sizeof(unit_name) / sizeof(unit_name[0]) - 1);
37 char const * const unit_name_gui[] = {
38 N_("sp"), N_("pt"), N_("bp"), N_("dd"), N_("mm"), N_("pc"),
39 N_("cc"), N_("cm"), N_("in"), N_("ex"), N_("em"), N_("mu"),
40 N_("Text Width %"), N_("Column Width %"), N_("Page Width %"), N_("Line Width %"),
41 N_("Text Height %"), N_("Page Height %"), "" };
43 Length::UNIT unitFromString(string const & data)
46 while (i < num_units && data != unit_name[i])
48 return static_cast<Length::UNIT>(i);