]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCharacter.C
fix crash with "save as"
[lyx.git] / src / frontends / xforms / FormCharacter.C
index 41f16413467059ef4669da0bbfe4c7d111e0fde2..4e5ae3a9d39066ee05eee511e77935b0582897e5 100644 (file)
@@ -1,10 +1,12 @@
 /**
  * \file FormCharacter.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Edwin Leuven,  leuven@fee.uva.nl
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Edwin Leuven
+ * \author Angus Leeming 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <vector>
@@ -36,8 +38,8 @@ using namespace frnt;
 
 typedef FormCB<ControlCharacter, FormDB<FD_character> > base_class;
 
-FormCharacter::FormCharacter(ControlCharacter & c, Dialogs & d)
-       : base_class(c, d, _("Character Layout"), false)
+FormCharacter::FormCharacter()
+       : base_class(_("Character Layout"), false)
 {}
 
 
@@ -124,25 +126,25 @@ void FormCharacter::apply()
        if (!form()) return;
 
        int pos = fl_get_choice(dialog_->choice_family);
-       controller().setFamily(family_[pos-1]);
+       controller().setFamily(family_[pos - 1]);
 
        pos = fl_get_choice(dialog_->choice_series);
-       controller().setSeries(series_[pos-1]);
+       controller().setSeries(series_[pos - 1]);
 
        pos = fl_get_choice(dialog_->choice_shape);
-       controller().setShape(shape_[pos-1]);
+       controller().setShape(shape_[pos - 1]);
 
        pos = fl_get_choice(dialog_->choice_size);
-       controller().setSize(size_[pos-1]);
+       controller().setSize(size_[pos - 1]);
 
        pos = fl_get_choice(dialog_->choice_bar);
-       controller().setBar(bar_[pos-1]);
+       controller().setBar(bar_[pos - 1]);
 
        pos = fl_get_choice(dialog_->choice_color);
-       controller().setColor(color_[pos-1]);
+       controller().setColor(color_[pos - 1]);
 
        pos = combo_language2_->get();
-       controller().setLanguage(lang_[pos-1]);
+       controller().setLanguage(lang_[pos - 1]);
 
        bool const toggleall = fl_get_button(dialog_->check_toggle_all);
        controller().setToggleAll(toggleall);
@@ -181,31 +183,31 @@ ButtonPolicy::SMInput FormCharacter::input(FL_OBJECT *, long)
        ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP;
 
        int pos = fl_get_choice(dialog_->choice_family);
-       if (family_[pos-1] != LyXFont::IGNORE_FAMILY)
+       if (family_[pos - 1] != LyXFont::IGNORE_FAMILY)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = fl_get_choice(dialog_->choice_series);
-       if (series_[pos-1] != LyXFont::IGNORE_SERIES)
+       if (series_[pos - 1] != LyXFont::IGNORE_SERIES)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = fl_get_choice(dialog_->choice_shape);
-       if (shape_[pos-1] != LyXFont::IGNORE_SHAPE)
+       if (shape_[pos - 1] != LyXFont::IGNORE_SHAPE)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = fl_get_choice(dialog_->choice_size);
-       if (size_[pos-1] != LyXFont::IGNORE_SIZE)
+       if (size_[pos - 1] != LyXFont::IGNORE_SIZE)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = fl_get_choice(dialog_->choice_bar);
-       if (bar_[pos-1] != frnt::IGNORE)
+       if (bar_[pos - 1] != frnt::IGNORE)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = fl_get_choice(dialog_->choice_color);
-       if (color_[pos-1] != LColor::ignore)
+       if (color_[pos - 1] != LColor::ignore)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = combo_language2_->get();
-       if (lang_[pos-1] != "No change")
+       if (lang_[pos - 1] != "No change")
                activate = ButtonPolicy::SMI_VALID;
 
        return activate;