X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFont.cpp;h=26218eeeac280dde50a82bba5400b1f2f8cfd30e;hb=dd1a85a2baf0aeb867a634ade47275b952d38354;hp=fda0854fe1f9819dabbf90564dc127f7fa88b8bb;hpb=fe85162a29893e98bd3426d15c9a9eb62aa90f6b;p=lyx.git diff --git a/src/Font.cpp b/src/Font.cpp index fda0854fe1..26218eeeac 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -114,18 +114,18 @@ void Font::setLanguage(Language const * l) /// Updates font settings according to request void Font::update(Font const & newfont, - Language const * document_language, + Language const * default_lang, bool toggleall) { bits_.update(newfont.fontInfo(), toggleall); if (newfont.language() == language() && toggleall) - if (language() == document_language) + if (language() == default_lang) setLanguage(default_language); else - setLanguage(document_language); + setLanguage(default_lang); else if (newfont.language() == reset_language) - setLanguage(document_language); + setLanguage(default_lang); else if (newfont.language() != ignore_language) setLanguage(newfont.language()); } @@ -228,8 +228,8 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams, OutputParams const & runparams, Font const & base, Font const & prev, - bool const & non_inherit_inset, - bool const & needs_cprotection) const + bool non_inherit_inset, + bool needs_cprotection) const { int count = 0; @@ -399,10 +399,6 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams, os << '}'; ++count; } else if (f.color() != Color_none) { - if (needs_cprotection) { - os << "\\cprotect"; - count += 9; - } os << "\\textcolor{" << from_ascii(lcolor.getLaTeXName(f.color())) << "}{"; @@ -522,7 +518,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams, Font const & base, Font const & next, bool & needPar, - bool const & closeLanguage) const + bool closeLanguage) const { int count = 0;