]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Kornel's gcc compile fix.
[lyx.git] / src / Paragraph.cpp
index a6041d06c7b5d3e32defe8037b25a86b77c2adef..6ad82dce590f2d5c1dfb654a121debdb2c24c3f6 100644 (file)
@@ -36,7 +36,6 @@
 #include "OutputParams.h"
 #include "output_latex.h"
 #include "output_xhtml.h"
-#include "paragraph_funcs.h"
 #include "ParagraphParameters.h"
 #include "SpellChecker.h"
 #include "sgml.h"
@@ -594,8 +593,8 @@ bool Paragraph::Private::simpleTeXBlanks(OutputParams const & runparams,
                }
        }
 
-       if (lyxrc.plaintext_linelen > 0
-           && column > lyxrc.plaintext_linelen
+       if (runparams.linelen > 0
+           && column > runparams.linelen
            && i
            && text_[i - 1] != ' '
            && (i + 1 < int(text_.size()))
@@ -2188,8 +2187,12 @@ bool Paragraph::latex(BufferParams const & bparams,
                return_value = false;
        }
 
-       if (allowcust && d->endTeXParParams(bparams, os, texrow, runparams))
+       if (allowcust && d->endTeXParParams(bparams, os, texrow, runparams)
+           && runparams.encoding != prev_encoding) {
                runparams.encoding = prev_encoding;
+               if (!bparams.useXetex)
+                       os << setEncoding(prev_encoding->iconvName());
+       }
 
        LYXERR(Debug::LATEX, "Paragraph::latex... done " << this);
        return return_value;
@@ -3016,8 +3019,6 @@ void Paragraph::locateWord(pos_type & from, pos_type & to,
 void Paragraph::collectWords()
 {
        pos_type n = size();
-       WordLangTuple wl;
-       docstring_list suggestions;
        for (pos_type pos = 0; pos < n; ++pos) {
                if (isWordSeparator(pos))
                        continue;
@@ -3027,11 +3028,6 @@ void Paragraph::collectWords()
                        docstring word = asString(from, pos, AS_STR_NONE);
                        d->words_.insert(word);
                }
-               if (lyxrc.spellcheck_continuously
-                   && spellCheck(from, pos, wl, suggestions)) {
-                       for (size_t i = 0; i != suggestions.size(); ++i)
-                               d->words_.insert(suggestions[i]);
-               }
        }
 }