]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormMinipage.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormMinipage.C
index 5ca5c4a34793513207d3d809b4a9099da6efb41e..4e9ec3a12645f46e548a2f353cbde73db341ceef 100644 (file)
@@ -24,6 +24,7 @@
 #include "support/lstrings.h"
 #include "helper_funcs.h"
 #include "debug.h"
+#include "xforms_helpers.h"
 
 typedef FormCB<ControlMinipage, FormDB<FD_form_minipage> > base_class;
 
@@ -58,11 +59,9 @@ void FormMinipage::build()
 
 void FormMinipage::apply()
 {
-       string const units = fl_get_choice_text(dialog_->choice_width_units);
-       double const val = strToDbl(fl_get_input(dialog_->input_width));
-
        controller().params().pageWidth =
-               tostr(val) + frontStrip(strip(subst(units,"%%","%")));
+               LyXLength(getLengthFromWidgets(dialog_->input_width,
+                       dialog_->choice_width_units));
 
        if (fl_get_button(dialog_->radio_top))
                controller().params().pos = InsetMinipage::top;