Fix bug #6510: URL in the footnote will cause the `CJK' environment to terminate

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33397 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-02-09 18:04:24 +00:00
parent 625e24128e
commit fd43c35d30
2 changed files with 12 additions and 9 deletions

View File

@ -323,6 +323,15 @@ TeXOnePar(Buffer const & buf,
OutputParams runparams = runparams_in;
runparams.isLastPar = nextpit == paragraphs.end();
bool const maintext = text.isMainText(buf);
// we are at the beginning of an inset and CJK is already open;
// we count inheritation levels to get the inset nesting right.
if (pit == paragraphs.begin() && !maintext
&& (cjk_inherited_ > 0 || open_encoding_ == CJK)) {
cjk_inherited_ += 1;
open_encoding_ = none;
}
if (runparams.verbatim) {
int const dist = distance(paragraphs.begin(), pit);
Font const outerfont = outerFont(dist, paragraphs);
@ -345,15 +354,6 @@ TeXOnePar(Buffer const & buf,
runparams.moving_arg |= style.needprotect;
bool const maintext = text.isMainText(buf);
// we are at the beginning of an inset and CJK is already open;
// we count inheritation levels to get the inset nesting right.
if (pit == paragraphs.begin() && !maintext
&& (cjk_inherited_ > 0 || open_encoding_ == CJK)) {
cjk_inherited_ += 1;
open_encoding_ = none;
}
// This paragraph's language
Language const * const par_language = pit->getParLanguage(bparams);
// The document's language

View File

@ -108,6 +108,9 @@ What's new
- Allow using greek symbols also when the package grtimes is installed but
actual fonts are not and "Times Roman" glyphs are requested (bug 6469).
- Fix premature closing of the CJK environment after ERT or URL insets
nested in other insets (bug 6510).
- Reset the language at the end of the document to the correct
language (bug 6387).