]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiCharacter.cpp
rename buffer parameter math_number_before to math_numbering_side
[lyx.git] / src / frontends / qt4 / GuiCharacter.cpp
index a824df7931386ccd1e3c299fdb7cf73c59f60a2b..aa9f037d5db89104fca303f6bfa26df2a9b7c47b 100644 (file)
@@ -85,7 +85,8 @@ static QList<BarPair> barData()
        bars << BarPair(qt_("Underbar"),  UNDERBAR_TOGGLE);
        bars << BarPair(qt_("Double underbar"),  UULINE_TOGGLE);
        bars << BarPair(qt_("Wavy underbar"),  UWAVE_TOGGLE);
-       bars << BarPair(qt_("Strikeout"),  STRIKEOUT_TOGGLE);
+       bars << BarPair(qt_("Strike out"),  STRIKEOUT_TOGGLE);
+       bars << BarPair(qt_("Cross out"),  XOUT_TOGGLE);
        bars << BarPair(qt_("Noun"),      NOUN_TOGGLE);
        bars << BarPair(qt_("Reset"),     INHERIT);
        return bars;
@@ -192,15 +193,6 @@ void fillComboColor(QComboBox * combo, QList<T> const & list)
        combo->addItem(qt_("Reset"), "inherit");
 }
 
-
-struct ColorSorter
-{
-       bool operator()(ColorCode lhs, ColorCode rhs) const {
-               return
-                       support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
-       }
-};
-
 } // namespace anon
 
 GuiCharacter::GuiCharacter(GuiView & lv)
@@ -230,7 +222,7 @@ GuiCharacter::GuiCharacter(GuiView & lv)
        size   = sizeData();
        bar    = barData();
        color  = colorData();
-       sort(color.begin(), color.end(), ColorSorter());
+       qSort(color.begin(), color.end(), ColorSorter);
 
        language = languageData();
        language.prepend(LanguagePair(qt_("Reset"), "reset"));
@@ -328,6 +320,9 @@ static FontState getBar(FontInfo const & fi)
        if (fi.strikeout() == FONT_TOGGLE)
                return STRIKEOUT_TOGGLE;
 
+       if (fi.xout() == FONT_TOGGLE)
+               return XOUT_TOGGLE;
+
        if (fi.uuline() == FONT_TOGGLE)
                return UULINE_TOGGLE;
 
@@ -353,6 +348,7 @@ static void setBar(FontInfo & fi, FontState val)
                fi.setEmph(FONT_IGNORE);
                fi.setUnderbar(FONT_IGNORE);
                fi.setStrikeout(FONT_IGNORE);
+               fi.setXout(FONT_IGNORE);
                fi.setUuline(FONT_IGNORE);
                fi.setUwave(FONT_IGNORE);
                fi.setNoun(FONT_IGNORE);
@@ -373,6 +369,11 @@ static void setBar(FontInfo & fi, FontState val)
                fi.setStrikeout(FONT_TOGGLE);
                break;
 
+       case XOUT_TOGGLE:
+               setBar(fi, INHERIT);
+               fi.setXout(FONT_TOGGLE);
+               break;
+
        case UULINE_TOGGLE:
                setBar(fi, INHERIT);
                fi.setUuline(FONT_TOGGLE);
@@ -392,6 +393,7 @@ static void setBar(FontInfo & fi, FontState val)
                fi.setEmph(FONT_INHERIT);
                fi.setUnderbar(FONT_INHERIT);
                fi.setStrikeout(FONT_INHERIT);
+               fi.setXout(FONT_INHERIT);
                fi.setUuline(FONT_INHERIT);
                fi.setUwave(FONT_INHERIT);
                fi.setNoun(FONT_INHERIT);