The branch, 2.0.x, has been updated. - Log -----------------------------------------------------------------
commit 3a53a52b1cf9233d1da01cfdd7c31fd77966bef8 Author: Vincent van Ravesteijn <[email protected]> Date: Wed May 2 15:34:56 2012 +0200 Fix bug #7914: Freeze on docbook export of lists and bibliography The LATEX_LIST_ENVIRONMENT and LATEX_BIB_ENVIRONMENT type paragraphs are not yet implemented in DocBook export. However, we need to actively skip these paragraphs in order not to end up in an endless loop. (cherry picked from commit fa9bd04ea48bc7a3101bedcf8bab9b5e00d009bc) diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp index 2547fb6..6a162d1 100644 --- a/src/output_docbook.cpp +++ b/src/output_docbook.cpp @@ -295,7 +295,11 @@ ParagraphList::const_iterator makeCommand(Buffer const & buf, send = searchParagraph(par, pend); par = makeParagraph(buf, os, runparams, text, par,send); break; - default: + case LATEX_BIB_ENVIRONMENT: + case LATEX_LIST_ENVIRONMENT: + // FIXME This means that we are just skipping any paragraph that + // isn't implemented above. + ++par; break; } } @@ -349,7 +353,11 @@ void docbookParagraphs(Text const & text, send = searchParagraph(par, pend); par = makeParagraph(buf, os, runparams, text, par,send); break; - default: + case LATEX_BIB_ENVIRONMENT: + case LATEX_LIST_ENVIRONMENT: + // FIXME This means that we are just skipping any paragraph that + // isn't implemented above. + ++par; break; } // makeEnvironment may process more than one paragraphs and bypass pend diff --git a/status.20x b/status.20x index 7aa77c9..a09ba9e 100644 --- a/status.20x +++ b/status.20x @@ -75,6 +75,9 @@ What's new * DOCUMENT INPUT/OUTPUT +- Fixed an infinite loop when exporting a file with list + or bibliography environments to DocBook (bug 7914). + - Fixed reading the bounding box from EPS figures with negative values (bug 8114). commit 2e771bf78d982b33a8789183a03319a932b569eb Author: Vincent van Ravesteijn <[email protected]> Date: Wed May 2 13:37:32 2012 +0200 Fix bug #8089: Handle spaces at the end of the stream If the stream is good (i.e. there are still tokens) and we expect an argument, we call getArg(). However, if there are only spaces, the stream suddenly isn't good anymore after 'skipSpaces' and we would get an error when calling 'getChar'. Therefore we have to check whether the stream is still good. MathParser: Do not rewind the stream if we can't read from it If the stream is not good, we don't need to 'putback', because we didn't read anything yet. If we now do rewind the stream, we are asking for problems as in bug #8089. This was introduced in [3cafb856\lyxgit] to fix bug #4318. (cherry picked from commit 26dcfcd34374f86562af56dfe5f858d10ea587db) (cherry picked from commit 1ef930c05826340d7497d6994338f6d63772de5f) diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index 0b5da98..713e555 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -535,7 +535,6 @@ char_type Parser::getChar() { if (!good()) { error("The input stream is not well..."); - putback(); return 0; } return tokens_[pos_++].character(); @@ -544,9 +543,12 @@ char_type Parser::getChar() docstring Parser::getArg(char_type left, char_type right) { + docstring result; skipSpaces(); - docstring result; + if (!good()) + return result; + char_type c = getChar(); if (c != left) diff --git a/status.20x b/status.20x index 20faef7..7aa77c9 100644 --- a/status.20x +++ b/status.20x @@ -103,6 +103,8 @@ What's new - Fixed assertion on selection of insets in RTL text (bug 7518). +- Fixed an infinite loop when pasting '\\ ' into math (bug 8089). + - Don't reset the selected format each time we click into a new paragraph in View->Source (bug 7997). ----------------------------------------------------------------------- Summary of changes: src/mathed/MathParser.cpp | 6 ++++-- src/output_docbook.cpp | 12 ++++++++++-- status.20x | 5 +++++ 3 files changed, 19 insertions(+), 4 deletions(-) hooks/post-receive -- The LyX Source Repository
