]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
fix #4758
[lyx.git] / src / Font.cpp
index 2b39813c518a1d6f8531b42df50f8cc961ffa183..0a0408ea5abc64d312d0449b5cddc11fab9f3877 100644 (file)
 #include "output_latex.h"
 #include "OutputParams.h"
 
+#include "support/assert.h"
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
 
+#include <cstring>
+
 using namespace std;
 using namespace lyx::support;
 
@@ -335,14 +338,14 @@ FontInfo lyxRead(Lexer & lex, FontInfo const & fi)
                        } else if (ttok == "noun") {
                                f.setNoun(FONT_ON);
                        } else {
-                               lex.printError("Illegal misc type `$$Token'");
+                               lex.printError("Illegal misc type");
                        }
                } else if (tok == "color") {
                        lex.next();
                        string const ttok = lex.getString();
                        setLyXColor(ttok, f);
                } else {
-                       lex.printError("Unknown tag `$$Token'");
+                       lex.printError("Unknown tag");
                        error = true;
                }
        }
@@ -618,10 +621,10 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
        if (open_encoding_) {
                // We need to close the encoding even if it does not change
                // to do correct environment nesting
-               Encoding const * const ascii = encodings.getFromLyXName("ascii");
+               Encoding const * const ascii = encodings.fromLyXName("ascii");
                pair<bool, int> const c = switchEncoding(os, bparams,
                                runparams, *ascii);
-               BOOST_ASSERT(c.first);
+               LASSERT(c.first, /**/);
                count += c.second;
                runparams.encoding = ascii;
                open_encoding_ = false;
@@ -662,7 +665,7 @@ string Font::toString(bool const toggle) const
 bool Font::fromString(string const & data, bool & toggle)
 {
        istringstream is(data);
-       Lexer lex(0,0);
+       Lexer lex;
        lex.setStream(is);
 
        int nset = 0;
@@ -753,7 +756,7 @@ void Font::validate(LaTeXFeatures & features) const
                        // probably we should put here all interface colors used for
                        // font displaying! For now I just add this ones I know of (Jug)
                case Color_latex:
-               case Color_note:
+               case Color_notelabel:
                        break;
                default:
                        features.require("color");