commit 44a7d2bc883c81150db11750aa40d81a27366b7b
Author: Thibaut Cuvelier <[email protected]>
Date:   Sat Sep 19 23:55:07 2020 +0200

    DocBook: adapt code for older GCC.
---
 src/Paragraph.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 8da67e3..7f707bc 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -3366,10 +3366,17 @@ std::vector<docstring> 
Paragraph::simpleDocBookOnePar(Buffer const & buf,
                if (getInset(i) != nullptr && getInset(i)->lyxCode() == 
NEWLINE_CODE) {
                        if (!ignore_fonts)
                                xs->closeFontTags();
+
+                       // Output one paragraph (i.e. one string entry in 
generatedParagraphs).
                        generatedParagraphs.push_back(os.str());
-                       os = odocstringstream();
+
+                       // Create a new XMLStream for the new paragraph, 
completely independent from the previous one. This implies
+                       // that the string stream must be reset.
+                       os.str(from_ascii(""));
                        delete xs;
                        xs = new XMLStream(os);
+
+                       // Restore the fonts for the new paragraph, so that the 
right tags are opened for the new entry.
                        if (!ignore_fonts) {
                                font_old = outerfont.fontInfo();
                                fs = old_fs;
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to