No need to clutter runparams...

This commit is contained in:
Enrico Forestieri 2016-09-25 08:56:12 +02:00
parent 8c14d9e041
commit 4508a7f855
5 changed files with 4 additions and 18 deletions

View File

@ -287,7 +287,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
tmp += "{";
os << from_ascii(tmp);
count += tmp.length();
runparams.pushPolyglossiaLang(language()->polyglossia());
pushPolyglossiaLang(language()->polyglossia());
} else if (language()->encoding()->package() != Encoding::CJK) {
os << '{';
count += 1;
@ -547,7 +547,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
os << '}';
++count;
if (runparams.use_polyglossia)
runparams.popPolyglossiaLang();
popPolyglossiaLang();
}
return count;

View File

@ -21,8 +21,7 @@ namespace lyx {
OutputParams::OutputParams(Encoding const * enc)
: flavor(LATEX), math_flavor(NotApplicable), nice(false), is_child(false),
moving_arg(false), intitle(false), inulemcmd(0), local_font(0), master_language(0),
encoding(enc), pushPolyglossiaLang(0), popPolyglossiaLang(0),
free_spacing(false), use_babel(false), use_polyglossia(false),
encoding(enc), free_spacing(false), use_babel(false), use_polyglossia(false),
use_indices(false), use_japanese(false), linelen(0), depth(0),
exportdata(new ExportData),
inComment(false), inTableCell(NO), inFloat(NONFLOAT),

View File

@ -141,16 +141,6 @@ public:
*/
mutable Encoding const * encoding;
/** Pointer to a function for registering a language switch
when using polyglossia.
*/
mutable void (* pushPolyglossiaLang)(std::string const & lang_name);
/** Pointer to a function for unregistering the last language
switch when using polyglossia.
*/
mutable void (* popPolyglossiaLang)();
/** free_spacing == true means that the inset is in a free-spacing
paragraph.
*/

View File

@ -2442,7 +2442,7 @@ void Paragraph::latex(BufferParams const & bparams,
os << from_ascii(end_tag);
column += end_tag.length();
if (runparams.use_polyglossia)
runparams.popPolyglossiaLang();
popPolyglossiaLang();
}
// Switch file encoding if necessary (and allowed)

View File

@ -1289,9 +1289,6 @@ void latexParagraphs(Buffer const & buf,
}
}
runparams.pushPolyglossiaLang = pushPolyglossiaLang;
runparams.popPolyglossiaLang = popPolyglossiaLang;
ParagraphList const & paragraphs = text.paragraphs();
if (runparams.par_begin == runparams.par_end) {