]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
typo
[lyx.git] / src / Buffer.cpp
index 5617a690dcb098c1d6c909a0af625061394947c0..3f1843cb59ae861c7ece1f15970c606bf0f9286c 100644 (file)
@@ -115,7 +115,9 @@ namespace os = support::os;
 
 namespace {
 
-int const LYX_FORMAT = 340; //jamatos: add plain layout
+// Do not remove the comment below, so we get merge conflict in
+// independent branches. Instead add your own.
+int const LYX_FORMAT = 344;  // ps: backref
 
 typedef map<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
@@ -619,11 +621,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)) {
@@ -2103,7 +2102,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;
@@ -2158,6 +2157,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_)