]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormVSpace.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormVSpace.C
index 143ada2f31257666d6ea0150a69bde8f01ca4f98..a94686ceecc506fa2f92ef7938930263f55c2b28 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::contains_functor;
+#include <boost/bind.hpp>
+
+using lyx::support::contains;
 using lyx::support::getStringFromVector;
 using lyx::support::rtrim;
 
-using std::bind2nd;
+using boost::bind;
+
 using std::remove_if;
 
 using std::vector;
@@ -75,7 +78,7 @@ VSpace const setVSpaceFromWidgets(FL_OBJECT * choice_type,
                     input_length  && input_length->objclass  == FL_INPUT &&
                     choice_length && choice_length->objclass == FL_CHOICE);
 
-       VSpace space = VSpace(VSpace::DEFSKIP);
+       VSpace space;
 
        switch (fl_get_choice(choice_type)) {
        case 1:
@@ -196,7 +199,7 @@ void FormVSpace::build()
        vector<string> units_vec = getLatexUnits();
        vector<string>::iterator del =
                remove_if(units_vec.begin(), units_vec.end(),
-                         bind2nd(contains_functor(), "%"));
+                         bind(contains<char>, _1, '%'));
        units_vec.erase(del, units_vec.end());
 
        string const units = getStringFromVector(units_vec, "|");
@@ -226,10 +229,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 +260,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;