]> git.lyx.org Git - lyx.git/blobdiff - src/factory.C
last Friday's text*.C -> text_func shuffle
[lyx.git] / src / factory.C
index fa05ac87da5ba16d287f6847e3401b1a093f7896..7d908149c619828a524157f478100f750d8020c7 100644 (file)
@@ -38,7 +38,6 @@
 #include "insets/insetminipage.h"
 #include "insets/insetnote.h"
 #include "insets/insetoptarg.h"
-#include "insets/insetparent.h"
 #include "insets/insetref.h"
 #include "insets/insetspace.h"
 #include "insets/insettabular.h"
@@ -55,6 +54,8 @@
 
 #include <cstdio>
 
+using namespace lyx::support;
+
 using std::endl;
 
 Inset * createInset(FuncRequest const & cmd)
@@ -158,10 +159,6 @@ Inset * createInset(FuncRequest const & cmd)
        case LFUN_TOC_INSERT:
                return new InsetTOC(InsetCommandParams("tableofcontents"));
 
-       case LFUN_PARENTINSERT:
-               return new InsetParent(
-                       InsetCommandParams("lyxparent", cmd.argument), *bv->buffer());
-
        case LFUN_ENVIRONMENT_INSERT:
                return new InsetEnvironment(params, cmd.argument);
 
@@ -204,15 +201,15 @@ Inset * createInset(FuncRequest const & cmd)
                        InsetExternal::Params iep;
                        InsetExternalMailer::string2params(cmd.argument, iep);
                        InsetExternal * inset = new InsetExternal;
-                       inset->setFromParams(iep);
+                       string const fpath = cmd.view()->buffer()->filePath();
+                       inset->setParams(iep, fpath);
                        return inset;
 
                } else if (name == "graphics") {
                        InsetGraphicsParams igp;
                        InsetGraphicsMailer::string2params(cmd.argument, igp);
                        InsetGraphics * inset = new InsetGraphics;
-                       string const fpath = cmd.view()->buffer()->filePath();
-                       inset->setParams(igp, fpath);
+                       inset->setParams(igp);
                        return inset;
 
                } else if (name == "include") {
@@ -339,8 +336,6 @@ Inset * readInset(LyXLex & lex, Buffer const & buf)
                        inset = new InsetFloatList("table");
                } else if (cmdName == "printindex") {
                        inset = new InsetPrintIndex(inscmd);
-               } else if (cmdName == "lyxparent") {
-                       inset = new InsetParent(inscmd, buf);
                }
        } else {
                if (tmptok == "Quotes") {