#include "ParagraphParameters.h"
#include "ParIterator.h"
#include "PDFOptions.h"
+#include "Session.h"
#include "SpellChecker.h"
#include "sgml.h"
#include "texstream.h"
for (; it != end; ++it) {
Buffer * child = const_cast<Buffer *>(it->first);
if (theBufferList().isLoaded(child)) {
- if (theBufferList().isOthersChild(this, child))
- child->setParent(0);
- else
- theBufferList().release(child);
+ if (theBufferList().isOthersChild(this, child))
+ child->setParent(0);
+ else
+ theBufferList().release(child);
}
}
errorList.push_back(ErrorItem(_("Document header error"), s));
}
+ params().shell_escape = theSession().shellescapeFiles().find(absFileName());
+
params().makeDocumentClass();
return unknown_tokens;
os << from_ascii(tclass.class_header());
else if (runparams.flavor == OutputParams::XML)
os << "PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" "
- << "\"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\"";
+ << "\"https://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\"";
else
os << " PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\"";
return;
d->bibinfo_.clear();
- collectBibKeys();
+ FileNameList checkedFiles;
+ collectBibKeys(checkedFiles);
d->bibinfo_cache_valid_ = true;
}
-void Buffer::collectBibKeys() const
+void Buffer::collectBibKeys(FileNameList & checkedFiles) const
{
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it)
- it->collectBibKeys(it);
+ it->collectBibKeys(it, checkedFiles);
}
// loop over children
Impl::BufferPositionMap::iterator it = d->children_positions.begin();
Impl::BufferPositionMap::iterator end = d->children_positions.end();
- for (; it != end; ++it)
- it->first->listMacroNames(macros);
+ for (; it != end; ++it) {
+ Buffer * child = const_cast<Buffer *>(it->first);
+ // The buffer might have been closed (see #10766).
+ if (theBufferList().isLoaded(child))
+ child->listMacroNames(macros);
+ }
// call parent
Buffer const * const pbuf = d->parent();
// not updated during the updateBuffer call and TocModel::toc_ is invalid
// (bug 5699). The same happens if the master buffer is open in a different
// window. This test catches both possibilities.
- // See: http://marc.info/?l=lyx-devel&m=138590578911716&w=2
+ // See: https://marc.info/?l=lyx-devel&m=138590578911716&w=2
// There remains a problem here: If there is another child open in yet a third
// window, that TOC is not updated. So some more general solution is needed at
// some point.
switch (par.itemdepth) {
case 2:
enumcounter += 'i';
+ // fall through
case 1:
enumcounter += 'i';
+ // fall through
case 0:
enumcounter += 'i';
break;
Buffer::ReadStatus Buffer::reload()
{
setBusy(true);
- // c.f. bug http://www.lyx.org/trac/ticket/6587
+ // c.f. bug https://www.lyx.org/trac/ticket/6587
removeAutosaveFile();
// e.g., read-only status could have changed due to version control
d->filename.refresh();