]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
* src/LyXRC.{cpp,h}:
[lyx.git] / src / BufferParams.cpp
index 303fe2fcb229f7e7b595d00df85464dc0979cd24..b2dd1da2573c63cf39a896a7012c00c84dcbc065 100644 (file)
@@ -28,7 +28,6 @@
 #include "LaTeXFeatures.h"
 #include "Messages.h"
 #include "ModuleList.h"
-#include "Color.h"
 #include "Font.h"
 #include "Lexer.h"
 #include "LyXRC.h"
@@ -43,6 +42,7 @@
 #include "insets/InsetListingsParams.h"
 
 #include "support/convert.h"
+#include "support/docstream.h"
 #include "support/filetools.h"
 #include "support/Translator.h"
 #include "support/lstrings.h"
@@ -584,7 +584,7 @@ string const BufferParams::readToken(Lexer & lex, string const & token)
                                        branch_ptr->setColor(color);
                                // Update also the Color table:
                                if (color == "none")
-                                       color = lcolor.getX11Name(Color::background);
+                                       color = lcolor.getX11Name(Color_background);
                                // FIXME UNICODE
                                lcolor.setColor(to_utf8(branch), color);
 
@@ -903,7 +903,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
                // when Vietnamese is used, babel must directly be loaded with the
                // language options, not in the class options, see
                // http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
-               int viet = language_options.str().find("vietnam");
+               size_t viet = language_options.str().find("vietnam");
                // viet = string::npos when not found
                if (lyxrc.language_global_options && !language_options.str().empty()
                        && viet == string::npos)
@@ -1393,15 +1393,14 @@ void BufferParams::clearLayoutModules() {
 
 Font const BufferParams::getFont() const
 {
-       Font f = getTextClass().defaultfont();
-       f.setLanguage(language);
+       FontInfo f = getTextClass().defaultfont();
        if (fontsDefaultFamily == "rmdefault")
-               f.setFamily(Font::ROMAN_FAMILY);
+               f.setFamily(ROMAN_FAMILY);
        else if (fontsDefaultFamily == "sfdefault")
-               f.setFamily(Font::SANS_FAMILY);
+               f.setFamily(SANS_FAMILY);
        else if (fontsDefaultFamily == "ttdefault")
-               f.setFamily(Font::TYPEWRITER_FAMILY);
-       return f;
+               f.setFamily(TYPEWRITER_FAMILY);
+       return Font(f, language);
 }
 
 
@@ -1575,7 +1574,7 @@ string const BufferParams::babelCall(string const & lang_opts) const
        // when Vietnamese is used, babel must directly be loaded with the
        // language options, see
        // http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
-       int viet = lang_opts.find("vietnam");
+       size_t viet = lang_opts.find("vietnam");
        // viet = string::npos when not found
        if (!lyxrc.language_global_options || viet != string::npos)
                return "\\usepackage[" + lang_opts + "]{babel}";