]> git.lyx.org Git - lyx.git/blobdiff - src/output_plaintext.cpp
Update Win installer for new dictionary links. Untested.
[lyx.git] / src / output_plaintext.cpp
index 2dfc836f1aceb4906cbc596e532cb63bcbdc65dd..b0450bda9f3a731d68b19e8953f183e996cba7b7 100644 (file)
@@ -21,6 +21,8 @@
 #include "ParagraphList.h"
 #include "ParagraphParameters.h"
 
+#include "insets/Inset.h"
+
 #include "support/debug.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
@@ -56,9 +58,11 @@ void writePlaintextFile(Buffer const & buf, odocstream & os,
        ParagraphList::const_iterator end = par.end();
        ParagraphList::const_iterator it = beg;
        for (; it != end; ++it) {
+               bool const merged_par = (*it).parEndChange().deleted();
                writePlaintextParagraph(buf, *it, os, runparams, ref_printed);
-               os << "\n";
-               if (runparams.linelen > 0)
+               if (!merged_par)
+                       os << "\n";
+               if (runparams.linelen > 0 && !merged_par)
                        os << "\n";
        }
 }
@@ -188,7 +192,7 @@ void writePlaintextParagraph(Buffer const & buf,
                if (os.str().size() > max_length)
                        break;
 
-               char_type c = par.getUChar(buf.params(), i);
+               char_type c = par.getUChar(buf.params(), runparams, i);
 
                if (par.isInset(i) || c == ' ') {
                        if (runparams.linelen > 0 &&
@@ -217,7 +221,7 @@ void writePlaintextParagraph(Buffer const & buf,
                switch (c) {
                case ' ':
                        os << ' ';
-                       currlinelen++;
+                       ++currlinelen;
                        break;
 
                case '\0':