]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Further to r26743, add CustomPars and ForcePlain layout tags to InsetLayout,
[lyx.git] / src / Buffer.cpp
index e653438736bf30b417d8b0ec2c1289fc04210435..9db261dec7f0c085b8c7044c07d74f951bdfc389 100644 (file)
@@ -115,7 +115,7 @@ namespace os = support::os;
 
 namespace {
 
-int const LYX_FORMAT = 340; //jamatos: add plain layout
+int const LYX_FORMAT = 341; //uwestoehr: TAB support for listings
 
 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)) {
@@ -2158,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_)