From 58978d7bb50361c27fad343796ff4941f8b0d92c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 26 Nov 2010 18:20:48 +0000 Subject: [PATCH] Begin renaming some BufferParams to conform to our usual style. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36523 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferParams.cpp | 8 ++++---- src/BufferParams.h | 2 +- src/LaTeXFeatures.cpp | 2 +- src/frontends/qt4/GuiDocument.cpp | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index f1e655a138..314c0054aa 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -375,7 +375,7 @@ BufferParams::BufferParams() tocdepth = 3; language = default_language; fontenc = "global"; - fontsRoman = "default"; + fonts_roman = "default"; fontsSans = "default"; fontsTypewriter = "default"; fontsDefaultFamily = "default"; @@ -618,7 +618,7 @@ string BufferParams::readToken(Lexer & lex, string const & token, fontenc = lex.getString(); } else if (token == "\\font_roman") { lex.eatLine(); - fontsRoman = lex.getString(); + fonts_roman = lex.getString(); } else if (token == "\\font_sans") { lex.eatLine(); fontsSans = lex.getString(); @@ -947,7 +947,7 @@ void BufferParams::writeFile(ostream & os) const os << "\\language " << language->lang() << '\n'; os << "\\inputencoding " << inputenc << "\n\\fontencoding " << fontenc - << "\n\\font_roman " << fontsRoman + << "\n\\font_roman " << fonts_roman << "\n\\font_sans " << fontsSans << "\n\\font_typewriter " << fontsTypewriter << "\n\\font_default_family " << fontsDefaultFamily @@ -1346,7 +1346,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features, // font selection must be done before loading fontenc.sty string const fonts = - loadFonts(fontsRoman, fontsSans, + loadFonts(fonts_roman, fontsSans, fontsTypewriter, fontsSC, fontsOSF, fontsSansScale, fontsTypewriterScale, useNonTeXFonts); if (!fonts.empty()) { diff --git a/src/BufferParams.h b/src/BufferParams.h index 93fbe68d05..5e873b0ac4 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -208,7 +208,7 @@ public: /// font encoding std::string fontenc; /// the rm font - std::string fontsRoman; + std::string fonts_roman; /// the sf font std::string fontsSans; /// the tt font diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 52a69bdc78..6e5b412109 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -866,7 +866,7 @@ docstring const LaTeXFeatures::getMacros() const if (!usePolyglossia() && mustProvide("textgreek")) { // Avoid a LaTeX error if times fonts are used and the grtimes // package is installed but actual fonts are not (bug 6469). - if (params_.fontsRoman == "times") + if (params_.fonts_roman == "times") macros << subst(textgreek_def, from_ascii("\\greektext #1"), from_ascii("%\n \\IfFileExists" diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index db27f00f2b..17581f86d5 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -2409,9 +2409,9 @@ void GuiDocument::applyView() // fonts if (nontexfonts) { if (fontModule->fontsRomanCO->currentIndex() == 0) - bp_.fontsRoman = "default"; + bp_.fonts_roman = "default"; else - bp_.fontsRoman = + bp_.fonts_roman = fromqstr(fontModule->fontsRomanCO->currentText()); if (fontModule->fontsSansCO->currentIndex() == 0) @@ -2426,7 +2426,7 @@ void GuiDocument::applyView() bp_.fontsTypewriter = fromqstr(fontModule->fontsTypewriterCO->currentText()); } else { - bp_.fontsRoman = + bp_.fonts_roman = tex_fonts_roman[fontModule->fontsRomanCO->currentIndex()]; bp_.fontsSans = @@ -2847,7 +2847,7 @@ void GuiDocument::paramsToDialog() fontModule->fontencCO->setEnabled(false); fontModule->fontencLE->setEnabled(false); for (int i = 0; i < fontModule->fontsRomanCO->count(); ++i) { - if (fontModule->fontsRomanCO->itemText(i) == toqstr(bp_.fontsRoman)) { + if (fontModule->fontsRomanCO->itemText(i) == toqstr(bp_.fonts_roman)) { fontModule->fontsRomanCO->setCurrentIndex(i); return; } @@ -2870,7 +2870,7 @@ void GuiDocument::paramsToDialog() fontModule->fontencLA->setEnabled(true); fontModule->fontencCO->setEnabled(true); fontModule->fontencLE->setEnabled(true); - int n = findToken(tex_fonts_roman, bp_.fontsRoman); + int n = findToken(tex_fonts_roman, bp_.fonts_roman); if (n >= 0) { fontModule->fontsRomanCO->setCurrentIndex(n); romanChanged(n);