]> git.lyx.org Git - features.git/commitdiff
more stuff from Lars' diff-6 (write one par at a time)
authorAndré Pönitz <poenitz@gmx.net>
Tue, 20 Aug 2002 17:29:37 +0000 (17:29 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 20 Aug 2002 17:29:37 +0000 (17:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5039 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/buffer.C
src/insets/insettext.C
src/paragraph.C
src/paragraph.h

index 9c1501d2325185d070d0a093d5eb4e733067369a..1fd8ac785ae8690bef6df801e2657c1dfe867383 100644 (file)
@@ -8,6 +8,9 @@
        * text.C:
        * buffer.[Ch]: use improved inset_iterator
 
+       * buffer.C:
+       * paragraph.[Ch]: write one paragraph at a time
+
 2002-08-20  Dekel Tsur  <dekelts@tau.ac.il>
 
        * BufferView_pimpl.C (dispatch): Insert insetbibtex with "plain"
index 498d21937de11143632f4f17ffafac57a5e8bf03..e5d89733e96c1d1dc60715bdb624a570be8594f6 100644 (file)
@@ -1843,7 +1843,10 @@ bool Buffer::writeFile(string const & fname) const
 
        // this will write out all the paragraphs
        // using recursive descent.
-       paragraphs.begin()->writeFile(this, ofs, params, depth);
+       ParagraphList::iterator pit = paragraphs.begin();
+       ParagraphList::iterator pend = paragraphs.end();
+       for (; pit != pend; ++pit)
+               pit->write(this, ofs, params, depth);
 
        // Write marker that shows file is complete
        ofs << "\n\\the_end" << endl;
index 23b23b16250e189894e4a58edc2c77943c75a110..cf2774093a1532731ae2597e64148e7ff390fd55 100644 (file)
@@ -236,7 +236,11 @@ void InsetText::write(Buffer const * buf, ostream & os) const
 
 void InsetText::writeParagraphData(Buffer const * buf, ostream & os) const
 {
-       paragraphs.begin()->writeFile(buf, os, buf->params, 0);
+       ParagraphList::iterator it = paragraphs.begin();
+       ParagraphList::iterator end = paragraphs.end();
+       for (; it != end; ++it) {
+               it->write(buf, os, buf->params, 0);
+       }
 }
 
 
index 8b4a2e1ed7318eb3d8f53cc12a48ad04344ee07f..f63f2c1be024e7df9853b0162c4b26980e907c36 100644 (file)
@@ -163,7 +163,7 @@ Paragraph::~Paragraph()
 }
 
 
-void Paragraph::writeFile(Buffer const * buf, ostream & os,
+void Paragraph::write(Buffer const * buf, ostream & os,
                          BufferParams const & bparams,
                          depth_type dth) const
 {
@@ -317,10 +317,6 @@ void Paragraph::writeFile(Buffer const * buf, ostream & os,
                        break;
                }
        }
-
-       // now write the next paragraph
-       if (next_)
-               next_->writeFile(buf, os, bparams, dth);
 }
 
 
index 7aa11cbc098c03486ef44f96d9f5148e4cd4bc67..d17bcdd0eafa62b6c4efdd852a1d2724a9ca299a 100644 (file)
@@ -110,7 +110,7 @@ public:
                              bool label);
 
        ///
-       void writeFile(Buffer const *, std::ostream &, BufferParams const &,
+       void write(Buffer const *, std::ostream &, BufferParams const &,
                       depth_type) const;
        ///
        void validate(LaTeXFeatures &) const;