X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_plaintext.cpp;h=d58c44a7964f42fdc5e75e5cb75451c1e0aa609c;hb=1cdd5fcb6f76ef8066707c521eef0c01cead00dd;hp=4ee3390b3acef4f80deb5cbcd104358e2de6fa20;hpb=aac50f83e5fff71e74d58e1d4a35098cde2335ee;p=lyx.git diff --git a/src/output_plaintext.cpp b/src/output_plaintext.cpp index 4ee3390b3a..d58c44a796 100644 --- a/src/output_plaintext.cpp +++ b/src/output_plaintext.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * * Full author contact details are available in file CREDITS. */ @@ -34,9 +34,14 @@ namespace lyx { void writePlaintextFile(Buffer const & buf, FileName const & fname, OutputParams const & runparams) { - odocfstream ofs; + ofdocstream ofs; if (!openFileWrite(ofs, fname)) return; + + // make sure we are ready to export + buf.updateBuffer(); + buf.updateMacroInstances(OutputUpdate); + writePlaintextFile(buf, ofs, runparams); } @@ -45,7 +50,7 @@ void writePlaintextFile(Buffer const & buf, odocstream & os, OutputParams const & runparams) { bool ref_printed = false; - ParagraphList const par = buf.paragraphs(); + ParagraphList const & par = buf.paragraphs(); ParagraphList::const_iterator beg = par.begin(); ParagraphList::const_iterator end = par.end(); ParagraphList::const_iterator it = beg;