]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Typos.
[lyx.git] / src / Buffer.cpp
index 1a769cf0baf9369cdfc04eca2c72967e0fe225fc..f46f7b0029b45ac33d6c10efe0f5371bcd5a0f3f 100644 (file)
@@ -115,7 +115,7 @@ namespace os = support::os;
 
 namespace {
 
-int const LYX_FORMAT = 340; //jamatos: add plain layout
+int const LYX_FORMAT = 342; //uwestoehr: support for Mongolian
 
 typedef map<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
@@ -619,11 +619,8 @@ void Buffer::insertStringAsLines(ParagraphList & pars,
                                ++pos;
                                space_inserted = true;
                        } else {
-                               const pos_type n = 8 - pos % 8;
-                               for (pos_type i = 0; i < n; ++i) {
-                                       par.insertChar(pos, ' ', font, params().trackChanges);
-                                       ++pos;
-                               }
+                               par.insertChar(pos, *cit, font, params().trackChanges);
+                               ++pos;
                                space_inserted = true;
                        }
                } else if (!isPrintable(*cit)) {
@@ -1022,6 +1019,9 @@ void Buffer::writeLaTeXSource(odocstream & os,
 
        OutputParams runparams = runparams_in;
 
+       // Classify the unicode characters appearing in math insets
+       Encodings::initUnicodeMath(*this);
+
        // validate the buffer.
        LYXERR(Debug::LATEX, "  Validating buffer...");
        LaTeXFeatures features(*this, params(), runparams);
@@ -1232,7 +1232,7 @@ void Buffer::writeDocBookSource(odocstream & os, string const & fname,
        if (runparams.flavor == OutputParams::XML)
                top += params().language->code();
        else
-               top += params().language->code().substr(0,2);
+               top += params().language->code().substr(0, 2);
        top += '"';
 
        if (!params().options.empty()) {
@@ -2100,7 +2100,7 @@ void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
 
 
 void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
-       pit_type par_end, bool full_source)
+       pit_type par_end, bool full_source) const
 {
        OutputParams runparams(&params().encoding());
        runparams.nice = true;
@@ -2155,6 +2155,14 @@ ErrorList & Buffer::errorList(string const & type) const
 }
 
 
+void Buffer::updateTocItem(std::string const & type,
+       DocIterator const & dit) const
+{
+       if (gui_)
+               gui_->updateTocItem(type, dit);
+}
+
+
 void Buffer::structureChanged() const
 {
        if (gui_)