-void FormParagraph::apply()
-{
- if (!form()) return;
-
- /* spacing */
- // If a vspace kind is "Length" but there's no text in
- // the input field, reset the kind to "None".
- validateVSpaceWidgets(dialog_->choice_space_above,
- dialog_->input_space_above);
-
- VSpace const space_top =
- setVSpaceFromWidgets(dialog_->choice_space_above,
- dialog_->input_space_above,
- dialog_->choice_value_space_above,
- dialog_->check_space_above);
-
- controller().params().spaceTop(space_top);
-
- validateVSpaceWidgets(dialog_->choice_space_below,
- dialog_->input_space_below);
-
- VSpace const space_bottom =
- setVSpaceFromWidgets(dialog_->choice_space_below,
- dialog_->input_space_below,
- dialog_->choice_value_space_below,
- dialog_->check_space_below);
-
- controller().params().spaceBottom(space_bottom);
-
- /* lines and pagebreaks */
- bool const line_top = fl_get_button(dialog_->check_lines_top);
- controller().params().lineTop(line_top);
-
- bool const line_bottom = fl_get_button(dialog_->check_lines_bottom);
- controller().params().lineBottom(line_bottom);
-
- bool const pagebreak_top = fl_get_button(dialog_->check_pagebreaks_top);
- controller().params().pagebreakTop(pagebreak_top);
-
- bool const pagebreak_bottom = fl_get_button(dialog_->check_pagebreaks_bottom);
- controller().params().pagebreakBottom(pagebreak_bottom);
-
-
- /* alignment */
- LyXAlignment align;
- if (fl_get_button(dialog_->radio_align_left))
- align = LYX_ALIGN_LEFT;
- else if (fl_get_button(dialog_->radio_align_right))
- align = LYX_ALIGN_RIGHT;
- else if (fl_get_button(dialog_->radio_align_center))
- align = LYX_ALIGN_CENTER;
- else
- align = LYX_ALIGN_BLOCK;
- controller().params().align(align);
-
- /* label width */