InsetInclude::InsetInclude(Buffer * buf, InsetCommandParams const & p)
: InsetCommand(buf, p), include_label(uniqueID()),
- preview_(new RenderMonitoredPreview(this)), failedtoload_(false),
+ preview_(make_unique<RenderMonitoredPreview>(this)), failedtoload_(false),
set_label_(false), label_(0), child_buffer_(0)
{
- preview_->fileChanged(bind(&InsetInclude::fileChanged, this));
+ preview_->connect([=](){ fileChanged(); });
if (isListings(params())) {
InsetListingsParams listing_params(to_utf8(p["lstparams"]));
InsetInclude::InsetInclude(InsetInclude const & other)
: InsetCommand(other), include_label(other.include_label),
- preview_(new RenderMonitoredPreview(this)), failedtoload_(false),
+ preview_(make_unique<RenderMonitoredPreview>(this)), failedtoload_(false),
set_label_(false), label_(0), child_buffer_(0)
{
- preview_->fileChanged(bind(&InsetInclude::fileChanged, this));
+ preview_->connect([=](){ fileChanged(); });
if (other.label_)
label_ = new InsetLabel(*other.label_);
lyx::dispatch(fr);
} else
// tex file or other text file in verbatim mode
- formats.edit(buffer(),
+ theFormats().edit(buffer(),
support::makeAbsPath(file, support::onlyPath(buffer().absFileName())),
"text");
}
"file\n`%1$s'\n"
"Please, check whether it actually exists."),
included_file.displayName());
- Alert::warning(_("Missing included file"), text);
+ throw ExceptionMessage(ErrorException, _("Error: "),
+ text);
}
return;
}
// Don't assume the child's format is latex
string const inc_format = tmp->params().bufferFormat();
FileName const tmpwritefile(changeExtension(writefile.absFileName(),
- formats.extension(inc_format)));
+ theFormats().extension(inc_format)));
// FIXME: handle non existing files
// The included file might be written in a different encoding
return;
// Include Tocs from children
- childbuffer->inset().addToToc(cpit, output_active, utype, backend);
+ childbuffer->inset().addToToc(DocIterator(), output_active, utype,
+ backend);
//Copy missing outliner names (though the user has been warned against
//having different document class and module selection between master
//and child).