]> git.lyx.org Git - lyx.git/blobdiff - src/factory.C
cosmetic fix
[lyx.git] / src / factory.C
index fa2fef5543685b64a81d0c9bc9ad8844c95d66d4..ad09f2151730a625adbe6de46a2a0f58fd018c0b 100644 (file)
@@ -58,7 +58,7 @@ using namespace lyx::support;
 
 using std::endl;
 
-Inset * createInset(FuncRequest const & cmd)
+InsetOld * createInset(FuncRequest const & cmd)
 {
        BufferView * bv = cmd.view();
        BufferParams const & params = bv->buffer()->params;
@@ -201,16 +201,16 @@ Inset * createInset(FuncRequest const & cmd)
                        Buffer const * buffer = cmd.view()->buffer();
                        InsetExternal::Params iep;
                        InsetExternalMailer::string2params(cmd.argument,
-                                                          buffer, iep);
+                                                          *buffer, iep);
                        InsetExternal * inset = new InsetExternal;
-                       inset->setParams(iep);
+                       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;
@@ -281,7 +281,7 @@ Inset * createInset(FuncRequest const & cmd)
 }
 
 
-Inset * readInset(LyXLex & lex, Buffer const & buf)
+InsetOld * readInset(LyXLex & lex, Buffer const & buf)
 {
        // consistency check
        if (lex.getString() != "\\begin_inset") {
@@ -289,7 +289,7 @@ Inset * readInset(LyXLex & lex, Buffer const & buf)
                       << endl;
        }
 
-       Inset * inset = 0;
+       InsetOld * inset = 0;
 
        lex.next();
        string const tmptok = lex.getString();
@@ -351,9 +351,9 @@ Inset * readInset(LyXLex & lex, Buffer const & buf)
                        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);