X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Foutput_plaintext.cpp;h=f0a383df4c02591c6afb0851f0cfc8873d1021ff;hb=427fa812e9774ddf82a6f3c92071c61b0bc61540;hp=0619b0668c86d8fd7d92fc4df5f234add8192f93;hpb=2bd480132abff22d9e2a749423750c0b2c00cdd0;p=lyx.git diff --git a/src/output_plaintext.cpp b/src/output_plaintext.cpp index 0619b0668c..f0a383df4c 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); } @@ -66,6 +71,7 @@ static pair addDepth(int depth, int ldepth) return make_pair(d, docstring(d, ' ')); } + void writePlaintextParagraph(Buffer const & buf, Paragraph const & par, odocstream & os,