Impl::BufferPositionMap::iterator end = d->children_positions.end();
for (; it != end; ++it) {
Buffer * child = const_cast<Buffer *>(it->first);
- if (d->cloned_buffer_)
+ if (isClone())
delete child;
// The child buffer might have been closed already.
else if (theBufferList().isLoaded(child))
docstring const & doctitle = features.htmlTitle();
os << "<title>"
- << (doctitle.empty() ? from_ascii("LyX Document") : doctitle)
+ << (doctitle.empty() ?
+ from_ascii("LyX Document") :
+ html::htmlize(doctitle, XHTMLStream::ESCAPE_ALL))
<< "</title>\n";
os << "\n<!-- Text Class Preamble -->\n"
}
-namespace {
- // helper class, to guarantee this gets reset properly
- class MarkAsExporting {
- public:
- MarkAsExporting(Buffer const * buf) : buf_(buf)
- {
- LASSERT(buf_, /* */);
- buf_->setExportStatus(true);
- }
- ~MarkAsExporting()
- {
- buf_->setExportStatus(false);
- }
- private:
- Buffer const * const buf_;
- };
-}
+// helper class, to guarantee this gets reset properly
+class Buffer::MarkAsExporting {
+public:
+ MarkAsExporting(Buffer const * buf) : buf_(buf)
+ {
+ LASSERT(buf_, /* */);
+ buf_->setExportStatus(true);
+ }
+ ~MarkAsExporting()
+ {
+ buf_->setExportStatus(false);
+ }
+private:
+ Buffer const * const buf_;
+};
+
void Buffer::setExportStatus(bool e) const
if (status == CANCEL) {
message(_("Document export cancelled."));
- } else if (tmp_result_file.exists()) {
+ return ExportCancel;
+ }
+
+ if (tmp_result_file.exists()) {
// Finally copy the main file
use_force = use_gui ? lyxrc.export_overwrite != NO_FILES
: force_overwrite != NO_FILES;
status = copyFile(format, tmp_result_file,
FileName(result_file), result_file,
status == FORCE);
- message(bformat(_("Document exported as %1$s "
- "to file `%2$s'"),
- formats.prettyName(format),
- makeDisplayPath(result_file)));
+ if (status == CANCEL) {
+ message(_("Document export cancelled."));
+ return ExportCancel;
+ } else {
+ message(bformat(_("Document exported as %1$s "
+ "to file `%2$s'"),
+ formats.prettyName(format),
+ makeDisplayPath(result_file)));
+ }
} else {
// This must be a dummy converter like fax (bug 1888)
message(bformat(_("Document exported as %1$s"),