X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormVSpace.C;h=0df4171318a063df41e775ab37d651e06c756cde;hb=37e82a546392d43f787826b85481a11f2a27af15;hp=20413130e683a6105cc65a100dc8826fc217b1bc;hpb=00812b180b254fb8fcb78a77bca048c00126c25d;p=lyx.git diff --git a/src/frontends/xforms/FormVSpace.C b/src/frontends/xforms/FormVSpace.C index 20413130e6..0df4171318 100644 --- a/src/frontends/xforms/FormVSpace.C +++ b/src/frontends/xforms/FormVSpace.C @@ -33,16 +33,22 @@ #include "lyx_forms.h" -using lyx::support::contains_functor; -using lyx::support::getStringFromVector; -using lyx::support::rtrim; +#include + +using boost::bind; -using std::bind2nd; using std::remove_if; using std::vector; using std::string; +namespace lyx { + +using support::contains; +using support::getStringFromVector; +using support::rtrim; + +namespace frontend { namespace { @@ -196,7 +202,7 @@ void FormVSpace::build() vector units_vec = getLatexUnits(); vector::iterator del = remove_if(units_vec.begin(), units_vec.end(), - bind2nd(contains_functor(), "%")); + bind(contains, _1, '%')); units_vec.erase(del, units_vec.end()); string const units = getStringFromVector(units_vec, "|"); @@ -226,10 +232,6 @@ void FormVSpace::build() void FormVSpace::apply() { - if (!form()) - return; - - // spacing // If a vspace choice is "Length" but there's no text in // the input field, insert nothing. validateVSpaceWidgets(dialog_->choice_space, dialog_->input_space); @@ -261,8 +263,8 @@ void FormVSpace::update() ButtonPolicy::SMInput FormVSpace::input(FL_OBJECT * ob, long) { - // Enable input when custum length is choosen, - // disable 'keep' when no space is choosen + // Enable input when custom length is chosen, + // disable 'keep' when no space is chosen if (ob == dialog_->choice_space) { bool const custom_length = fl_get_choice(dialog_->choice_space) == 6; @@ -271,3 +273,6 @@ ButtonPolicy::SMInput FormVSpace::input(FL_OBJECT * ob, long) } return ButtonPolicy::SMI_VALID; } + +} // namespace frontend +} // namespace lyx