using std::endl;
-Inset * createInset(FuncRequest const & cmd)
+InsetOld * createInset(FuncRequest const & cmd)
{
BufferView * bv = cmd.view();
BufferParams const & params = bv->buffer()->params;
return inset;
} else if (name == "external") {
+ Buffer const * buffer = cmd.view()->buffer();
InsetExternal::Params iep;
- InsetExternalMailer::string2params(cmd.argument, iep);
+ InsetExternalMailer::string2params(cmd.argument,
+ *buffer, iep);
InsetExternal * inset = new InsetExternal;
- string const fpath = cmd.view()->buffer()->filePath();
- inset->setParams(iep, fpath);
+ inset->setParams(iep, buffer);
return inset;
} else if (name == "graphics") {
- string const fpath = cmd.view()->buffer()->filePath();
+ Buffer const & buffer = *cmd.view()->buffer();
InsetGraphicsParams igp;
- InsetGraphicsMailer::string2params(cmd.argument, fpath,
- igp);
+ InsetGraphicsMailer::string2params(cmd.argument,
+ buffer, igp);
InsetGraphics * inset = new InsetGraphics;
inset->setParams(igp);
return inset;
}
-Inset * readInset(LyXLex & lex, Buffer const & buf)
+InsetOld * readInset(LyXLex & lex, Buffer const & buf)
{
// consistency check
if (lex.getString() != "\\begin_inset") {
<< endl;
}
- Inset * inset = 0;
+ InsetOld * inset = 0;
lex.next();
string const tmptok = lex.getString();
inset = new InsetFormula;
} else if (tmptok == "Graphics") {
inset = new InsetGraphics;
- } else if (tmptok == "Note" || tmptok == "Comment"
+ } else if (tmptok == "Note" || tmptok == "Comment"
|| tmptok == "Greyedout") {
- inset = new InsetNote(buf.params, tmptok);
+ inset = new InsetNote(buf.params, tmptok);
} else if (tmptok == "Include") {
InsetCommandParams p("Include");
inset = new InsetInclude(p, buf);