]> git.lyx.org Git - lyx.git/blobdiff - src/output_plaintext.cpp
* gcc does not like missing characters in keywords
[lyx.git] / src / output_plaintext.cpp
index 39c5f1a13403a7522241eb311048c2bfaf104c5a..7f37f8d70c0deea41a000780cb231ff0e4733f19 100644 (file)
@@ -192,7 +192,7 @@ void writePlaintextParagraph(Buffer const & buf,
 
                char_type c = par.getUChar(buf.params(), i);
 
-               if (c == Paragraph::META_INSET || c == ' ') {
+               if (par.isInset(i) || c == ' ') {
                        if (runparams.linelen > 0 &&
                            currlinelen + word.length() > runparams.linelen) {
                                os << '\n';
@@ -205,8 +205,7 @@ void writePlaintextParagraph(Buffer const & buf,
                        word.erase();
                }
 
-               switch (c) {
-               case Paragraph::META_INSET: {
+               if (par.isInset(i)) {
                        OutputParams rp = runparams;
                        rp.depth = par.params().depth();
                        int len = par.getInset(i)->plaintext(buf, os, rp);
@@ -214,9 +213,10 @@ void writePlaintextParagraph(Buffer const & buf,
                                currlinelen = len - Inset::PLAINTEXT_NEWLINE;
                        else
                                currlinelen += len;
-                       break;
+                       continue;
                }
 
+               switch (c) {
                case ' ':
                        os << ' ';
                        currlinelen++;