InsetInclude::InsetInclude(InsetCommandParams const & p, Buffer const & b)
+ : include_label(unique_id())
{
params_.cparams = p;
params_.masterFilename_ = b.fileName();
- include_label = unique_id();
}
lyxerr << "WARNING: Included file `"
<< MakeDisplayPath(getFileName())
<< "' has textclass `"
- << textclasslist.NameOfClass(tmp->params.textclass)
+ << textclasslist[tmp->params.textclass].name()
<< "' while parent file has textclass `"
- << textclasslist.NameOfClass(buffer->params.textclass)
+ << textclasslist[buffer->params.textclass].name()
<< "'." << endl;
//return 0;
}
}
-int InsetInclude::ascii(Buffer const *, std::ostream & os, int) const
+int InsetInclude::ascii(Buffer const *, ostream & os, int) const
{
if (isVerbatim())
os << GetFileContents(getFileName());
// write it to a file (so far the complete file)
string writefile = ChangeExtension(getFileName(), ".sgml");
- if (!buffer->tmppath.empty() && !buffer->niceFile) {
+ if (!buffer->tmppath.empty() && buffer->niceFile) {
incfile = subst(incfile, '/','@');
writefile = AddName(buffer->tmppath, incfile);
} else
// write it to a file (so far the complete file)
string writefile = ChangeExtension(getFileName(), ".sgml");
- if (!buffer->tmppath.empty() && !buffer->niceFile) {
+ if (!buffer->tmppath.empty() && buffer->niceFile) {
incfile = subst(incfile, '/','@');
writefile = AddName(buffer->tmppath, incfile);
} else
if (isVerbatim()) {
os << "<inlinegraphic fileref=\""
<< '&' << include_label << ';'
- << "\" format=\"linespecific\">"
+ << "\" format=\"linespecific\">";
} else
os << '&' << include_label << ';';
Buffer const * const b = bufferlist.getBuffer(getMasterFilename());
- if (b && !b->tmppath.empty() && b->niceFile) {
+ if (b && !b->tmppath.empty() && b->niceFile && !isVerbatim()) {
incfile = subst(incfile, '/','@');
writefile = AddName(b->tmppath, incfile);
} else