X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffactory.C;h=9fac9fc92585586c29fb71dea0af98587117ee49;hb=a4c9f5fdf42f07019b6893236700434463bddb06;hp=4e536e64230c60cac3b4c649ba033b6c3a3fa738;hpb=cd4d035577cd6480e6b7b3b7311c60aad8c69b91;p=lyx.git diff --git a/src/factory.C b/src/factory.C index 4e536e6423..9fac9fc925 100644 --- a/src/factory.C +++ b/src/factory.C @@ -1,3 +1,14 @@ +/** + * \file factory.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author André Pönitz + * + * Full author contact details are available in file CREDITS + */ + +#include #include "funcrequest.h" #include "bufferparams.h" @@ -22,11 +33,14 @@ #include "insets/insettabular.h" #include "insets/insettext.h" #include "insets/insettoc.h" +#include "insets/inseturl.h" +#include "insets/insetwrap.h" #include "frontends/Dialogs.h" #include "frontends/LyXView.h" #include +using std::endl; Inset * createInset(FuncRequest const & cmd) { @@ -72,6 +86,12 @@ Inset * createInset(FuncRequest const & cmd) lyxerr << "Non-existent float type: " << cmd.argument << endl; return 0; + case LFUN_INSET_WRAP: + if (cmd.argument == "figure") + return new InsetWrap(params, cmd.argument); + lyxerr << "Non-existent floatflt type: " << cmd.argument << endl; + return 0; + case LFUN_INDEX_INSERT: { string entry = cmd.argument; if (entry.empty()) @@ -105,7 +125,7 @@ Inset * createInset(FuncRequest const & cmd) } return 0; - case LFUN_INDEX_PRINT: + case LFUN_INDEX_PRINT: return new InsetPrintIndex(InsetCommandParams("printindex")); case LFUN_TOC_INSERT: @@ -115,6 +135,13 @@ Inset * createInset(FuncRequest const & cmd) return new InsetParent( InsetCommandParams("lyxparent", cmd.argument), *bv->buffer()); + case LFUN_INSERT_URL: + { + InsetCommandParams p; + p.setFromString(cmd.argument); + return new InsetUrl(p); + } + #if 0 case LFUN_INSET_LIST: return new InsetList; @@ -128,5 +155,3 @@ Inset * createInset(FuncRequest const & cmd) } return 0; } - -