Rename, for a little clarity.

This commit is contained in:
Richard Heck 2016-07-31 03:03:26 -04:00
parent 07dcb1c525
commit 9e5a42edbf

View File

@ -2409,18 +2409,18 @@ void Paragraph::latex(BufferParams const & bparams,
++column; ++column;
// Fully instantiated font // Fully instantiated font
Font const font = getFont(bparams, i, outerfont); Font const current_font = getFont(bparams, i, outerfont);
Font const last_font = running_font; Font const last_font = running_font;
// Do we need to close the previous font? // Do we need to close the previous font?
if (open_font && if (open_font &&
(font != running_font || (current_font != running_font ||
font.language() != running_font.language())) current_font.language() != running_font.language()))
{ {
column += running_font.latexWriteEndChanges( column += running_font.latexWriteEndChanges(
os, bparams, runparams, basefont, os, bparams, runparams, basefont,
(i == body_pos-1) ? basefont : font); (i == body_pos-1) ? basefont : current_font);
running_font = basefont; running_font = basefont;
open_font = false; open_font = false;
} }
@ -2431,7 +2431,7 @@ void Paragraph::latex(BufferParams const & bparams,
string const lang_end_command = runparams.use_polyglossia ? string const lang_end_command = runparams.use_polyglossia ?
"\\end{$$lang}" : lyxrc.language_command_end; "\\end{$$lang}" : lyxrc.language_command_end;
if (!running_lang.empty() && if (!running_lang.empty() &&
font.language()->encoding()->package() == Encoding::CJK) { current_font.language()->encoding()->package() == Encoding::CJK) {
string end_tag = subst(lang_end_command, string end_tag = subst(lang_end_command,
"$$lang", "$$lang",
running_lang); running_lang);
@ -2442,28 +2442,28 @@ void Paragraph::latex(BufferParams const & bparams,
// Switch file encoding if necessary (and allowed) // Switch file encoding if necessary (and allowed)
if (!runparams.pass_thru && !style.pass_thru && if (!runparams.pass_thru && !style.pass_thru &&
runparams.encoding->package() != Encoding::none && runparams.encoding->package() != Encoding::none &&
font.language()->encoding()->package() != Encoding::none) { current_font.language()->encoding()->package() != Encoding::none) {
pair<bool, int> const enc_switch = pair<bool, int> const enc_switch =
switchEncoding(os.os(), bparams, runparams, switchEncoding(os.os(), bparams, runparams,
*(font.language()->encoding())); *(current_font.language()->encoding()));
if (enc_switch.first) { if (enc_switch.first) {
column += enc_switch.second; column += enc_switch.second;
runparams.encoding = font.language()->encoding(); runparams.encoding = current_font.language()->encoding();
} }
} }
char_type const c = d->text_[i]; char_type const c = d->text_[i];
// Do we need to change font? // Do we need to change font?
if ((font != running_font || if ((current_font != running_font ||
font.language() != running_font.language()) && current_font.language() != running_font.language()) &&
i != body_pos - 1) i != body_pos - 1)
{ {
odocstringstream ods; odocstringstream ods;
column += font.latexWriteStartChanges(ods, bparams, column += current_font.latexWriteStartChanges(ods, bparams,
runparams, basefont, runparams, basefont,
last_font); last_font);
running_font = font; running_font = current_font;
open_font = true; open_font = true;
docstring fontchange = ods.str(); docstring fontchange = ods.str();
// check whether the fontchange ends with a \\textcolor // check whether the fontchange ends with a \\textcolor
@ -2489,7 +2489,7 @@ void Paragraph::latex(BufferParams const & bparams,
// style.pass_thru is false. // style.pass_thru is false.
if (i != body_pos - 1) { if (i != body_pos - 1) {
if (d->simpleTeXBlanks(runparams, os, if (d->simpleTeXBlanks(runparams, os,
i, column, font, style)) { i, column, current_font, style)) {
// A surrogate pair was output. We // A surrogate pair was output. We
// must not call latexSpecialChar // must not call latexSpecialChar
// in this iteration, since it would output // in this iteration, since it would output
@ -2502,7 +2502,7 @@ void Paragraph::latex(BufferParams const & bparams,
OutputParams rp = runparams; OutputParams rp = runparams;
rp.free_spacing = style.free_spacing; rp.free_spacing = style.free_spacing;
rp.local_font = &font; rp.local_font = &current_font;
rp.intitle = style.intitle; rp.intitle = style.intitle;
// Two major modes: LaTeX or plain // Two major modes: LaTeX or plain