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;
// GuiView already destroyed
gui_ = 0;
+ if (d->unnamed && d->filename.extension() == "internal") {
+ // No need to do additional cleanups for internal buffer.
+ delete d;
+ return;
+ }
// loop over children
Impl::BufferPositionMap::iterator it = d->children_positions.begin();
++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)) {
os << "% " << _("Preview source code") << "\n\n";
d->texrow.newline();
d->texrow.newline();
- if (isLatex())
- writeLaTeXSource(os, filePath(), runparams, true, true);
- else
+ if (isDocBook())
writeDocBookSource(os, absFileName(), runparams, false);
+ else
+ // latex or literate
+ writeLaTeXSource(os, filePath(), runparams, true, true);
} else {
runparams.par_begin = par_begin;
runparams.par_end = par_end;
d->texrow.newline();
d->texrow.newline();
// output paragraphs
- if (isLatex())
- latexParagraphs(*this, text(), os, d->texrow, runparams);
- else
- // DocBook
+ if (isDocBook())
docbookParagraphs(paragraphs(), *this, os, runparams);
+ else
+ // latex or literate
+ latexParagraphs(*this, text(), os, d->texrow, runparams);
}
}
}
+void Buffer::updateTocItem(std::string const & type,
+ DocIterator const & dit) const
+{
+ if (gui_)
+ gui_->updateTocItem(type, dit);
+}
+
+
void Buffer::structureChanged() const
{
if (gui_)