From 8470e31355a692c8133165cb2e0f2d8af9233b25 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 29 Jun 2012 18:37:50 +0200 Subject: [PATCH] fix bug #8209: polyglossia commands ignored partial source preview --- src/Buffer.cpp | 8 +++++++- status.20x | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 2ed74091c7..1840c391cc 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1432,6 +1432,7 @@ void Buffer::writeLaTeXSource(otexstream & os, LYXERR(Debug::LATEX, " Validating buffer..."); LaTeXFeatures features(*this, params(), runparams); validate(features); + runparams.use_polyglossia = features.usePolyglossia(); LYXERR(Debug::LATEX, " Buffer validation done."); bool const output_preamble = @@ -1539,7 +1540,6 @@ void Buffer::writeLaTeXSource(otexstream & os, MacroSet parentMacros; listParentMacros(parentMacros, features); - runparams.use_polyglossia = features.usePolyglossia(); // Write the preamble runparams.use_babel = params().writeLaTeX(os, features, d->filename.onlyPath()); @@ -3232,6 +3232,12 @@ void Buffer::getSourceCode(odocstream & os, string const format, writePlaintextParagraph(*this, text().paragraphs()[par_begin], os, runparams, dummy); } else { + // We need to validate the Buffer params' features here + // in order to know if we should output polyglossia + // macros (instead of babel macros) + LaTeXFeatures features(*this, params(), runparams); + params().validate(features); + runparams.use_polyglossia = features.usePolyglossia(); // latex or literate otexstream ots(os, texrow); latexParagraphs(*this, text(), ots, runparams); diff --git a/status.20x b/status.20x index 3de50eb3af..90be837ec7 100644 --- a/status.20x +++ b/status.20x @@ -58,6 +58,8 @@ What's new - When using Turkish language, use the xkeyval package to avoid incompatibilities (bug 2005). +- Do not ignore polyglossia commands in partial source preview (bug 8209). + * USER INTERFACE -- 2.39.5