buffer_clone->setChild(dit, child_clone);
}
buffer_clone->d->macro_lock = false;
- return;
}
// time stamp is invalidated by copying/moving
saveCheckSum();
markClean();
- if (d->file_format != LYX_FORMAT)
- // the file associated with this buffer is now in the current format
- d->file_format = LYX_FORMAT;
+ // the file associated with this buffer is now in the current format
+ d->file_format = LYX_FORMAT;
return true;
}
// else we saved the file, but failed to move it to the right location.
docstring uncodable_glyphs;
Encoding const * const enc = runparams.encoding;
if (enc) {
- for (size_t n = 0; n < inputpath.size(); ++n) {
- if (!enc->encodable(inputpath[n])) {
- docstring const glyph(1, inputpath[n]);
+ for (char_type n : inputpath) {
+ if (!enc->encodable(n)) {
+ docstring const glyph(1, n);
LYXERR0("Uncodable character '"
<< glyph
<< "' in input path!");
bool const output_body =
output == FullSource || output == OnlyBody;
- XMLStream xs(os);
-
if (output_preamble) {
// XML preamble, no doctype needed.
// Not using XMLStream for this, as the root tag would be in the tag stack and make troubles with the error
}
if (output_body) {
- params().documentClass().counters().reset();
-
// Start to output the document.
+ XMLStream xs(os);
docbookParagraphs(text(), *this, xs, runparams);
}
if (output_preamble) {
- // Close the root element.
- os << "\n</" << from_ascii(tclass.docbookroot()) << ">";
+ // Close the root element. No need for a line break, as free text is never allowed
+ // in a root element, it must always be wrapped in some container.
+ os << "</" << from_ascii(tclass.docbookroot()) << ">";
}
+
return ExportSuccess;
}
bool Buffer::activeLabel(docstring const & label) const
{
- if (!insetLabel(label, true))
- return false;
-
- return true;
+ return insetLabel(label, true) != nullptr;
}
// DocBook backend
else if (backend_format == "docbook5") {
runparams.flavor = OutputParams::DOCBOOK5;
- runparams.nice = !put_in_tempdir;
+ runparams.nice = false;
if (makeDocBookFile(FileName(filename), runparams) == ExportKilled)
return ExportKilled;
}