#include "gettext.h"
#include "support/LAssert.h"
#include "lyxlength.h"
+#include "lyxgluelength.h"
using std::ofstream;
using std::pair;
}
+/// Given an fl_input, return its contents.
+string const getStringFromInput(FL_OBJECT * ob)
+{
+ if (!ob || ob->objclass != FL_INPUT)
+ return string();
+
+ char const * tmp = fl_get_input(ob);
+ return (tmp) ? tmp : string();
+}
+
+
// Given an fl_browser, return the contents of line
string const getStringFromBrowser(FL_OBJECT * ob, int line)
{
if (length.empty())
return string();
+ //don't return unit-from-choice if the input(field) contains a unit
+ if (isValidGlueLength(length))
+ return length;
+
string unit = strip(frontStrip(fl_get_choice_text(choice)));
unit = subst(unit, "%%", "%");