more stuff from Lars' diff-6 (write one par at a time)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5039 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-08-20 17:29:37 +00:00
parent 53cc89eed6
commit 570ac6e4f4
5 changed files with 14 additions and 8 deletions

View 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"

View 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;

View 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);
}
}

View 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);
}

View 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;