]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfont.C
partial framebox support
[lyx.git] / src / lyxfont.C
index 362253b678e817bef473543bb955557cccea2248..54548a9104cd555bfe21925d4b0174a7487acc52 100644 (file)
@@ -571,8 +571,7 @@ string const LyXFont::stateText(BufferParams * params) const
                ost << _("  Number ") << _(GUIMiscNames[number()]);
 
        string buf(ost.str().c_str());
-       buf = strip(buf, ' ');
-       buf = strip(buf, ',');
+       buf = rtrim(buf, ", ");
        return buf;
 }
 
@@ -903,12 +902,11 @@ int LyXFont::latexWriteEndChanges(ostream & os, LyXFont const & base,
        int count = 0;
        bool env = false;
 
-       LyXFont f = *this; // why do you need this?
-       f.reduce(base); // why isn't this just "reduce(base);" (Lgb)
-       // Because this function is const. Everything breaks if this
-       // method changes the font it represents. There is no speed penalty
-       // by using the temporary. (Asger)
-
+       // reduce the current font to changes against the base
+       // font (of the layout). We use a temporary for this to
+       // avoid changing this font instance, as that would break
+       LyXFont f = *this;
+       f.reduce(base);
 
        if (f.family() != INHERIT_FAMILY) {
                os << '}';