]> git.lyx.org Git - features.git/commitdiff
Fix bug #7914: Freeze on docbook export of lists and bibliography
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 2 May 2012 13:34:56 +0000 (15:34 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 2 May 2012 16:27:13 +0000 (18:27 +0200)
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)

src/output_docbook.cpp
status.20x

index 2547fb65b4a71f6b4486b7d3b9f65bd42d2ba563..6a162d1c04ac19c77afb2250fe5d5bb46024ea46 100644 (file)
@@ -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
index 7aa77c9478c198062b852a747568d61586d1bebb..a09ba9e533c83c6f3ed66bfeddbc151b8024326c 100644 (file)
@@ -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).