]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfont.C
remove some very old dead code
[lyx.git] / src / lyxfont.C
index 7a04c7177e54783cf96254fbec3d987a10963fc9..22594630d3f3b1bac6c4b568ead5e4be5b6b4bd8 100644 (file)
 #include <clocale>
 #include <cctype>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-
 #include "gettext.h"
 #include "lyxfont.h"
 #include "debug.h"
@@ -26,6 +21,8 @@
 #include "support/lstrings.h"
 #include "bufferparams.h" // stateText
 
+#include "BoostFormat.h"
+
 using std::ostream;
 using std::endl;
 
@@ -40,7 +37,7 @@ using std::strlen;
 namespace {
 
 char const * GUIFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
-{ N_("Roman"), N_("Sans serif"), N_("Typewriter"), N_("Symbol"),
+{ N_("Roman"), N_("Sans Serif"), N_("Typewriter"), N_("Symbol"),
   "cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy",
   N_("Inherit"), N_("Ignore") };
 
@@ -524,23 +521,50 @@ string const LyXFont::stateText(BufferParams * params) const
                ost << _(GUISizeNames[size()]) << ", ";
        if (color() != LColor::inherit)
                ost << lcolor.getGUIName(color()) << ", ";
-       if (emph() != INHERIT)
-               ost << _("Emphasis ")
-                   << _(GUIMiscNames[emph()]) << ", ";
-       if (underbar() != INHERIT)
-               ost << _("Underline ")
-                   << _(GUIMiscNames[underbar()]) << ", ";
-       if (noun() != INHERIT)
+       if (emph() != INHERIT) {
+#if USE_BOOST_FORMAT
+               ost << boost::format(_("Emphasis %1$s, "))
+                       % _(GUIMiscNames[emph()]);
+#else
+               ost << _("Emphasis ") << _(GUIMiscNames[emph()]) << ", ";
+#endif
+       }
+       if (underbar() != INHERIT) {
+#if USE_BOOST_FORMAT
+               ost << boost::format(_("Underline %1$s, "))
+                       % _(GUIMiscNames[underbar()]);
+#else
+               ost << _("Underline ") << _(GUIMiscNames[underbar()]) << ", ";
+#endif
+       }
+       if (noun() != INHERIT) {
+#if USE_BOOST_FORMAT
+               ost << boost::format(_("Noun %1$s, "))
+                       % _(GUIMiscNames[noun()]);
+#else
                ost << _("Noun ") << _(GUIMiscNames[noun()]) << ", ";
+#endif
+       }
        if (bits == inherit)
                ost << _("Default") << ", ";
-       if (!params || (language() != params->language))
+       if (!params || (language() != params->language)) {
+#if USE_BOOST_FORMAT
+               ost << boost::format(_("Language: %1$s, "))
+                       % _(language()->display());
+#else
                ost << _("Language: ") << _(language()->display()) << ", ";
-       if (number() != OFF)
+#endif
+       }
+       if (number() != OFF) {
+#if USE_BOOST_FORMAT
+               ost << boost::format(_("  Number %1$s"))
+                       % _(GUIMiscNames[number()]);
+#else
                ost << _("  Number ") << _(GUIMiscNames[number()]);
+#endif
+       }
 
-       string buf(ost.str().c_str());
-       buf = rtrim(buf, ", ");
+       string const buf = rtrim(STRCONV(ost.str()), ", ");
        return buf;
 }
 
@@ -918,7 +942,7 @@ int LyXFont::latexWriteEndChanges(ostream & os, LyXFont const & base,
        }
 
        if (language() != base.language() && language() != next.language()) {
-               os << "}";
+               os << '}';
                ++count;
        }