]> git.lyx.org Git - lyx.git/blobdiff - src/factory.cpp
InsetTabular.cpp: fix #6585 also for wrapped floats - thanks Vincent
[lyx.git] / src / factory.cpp
index 9f39a2d2291a1920814132ac252c96cce457f3ad..63224671faafe0748650c59a0c8a87e3ddec4430 100644 (file)
@@ -82,9 +82,6 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
 
                switch (cmd.action()) {
 
-               case LFUN_LINE_INSERT:
-                       return new InsetLine;
-
                case LFUN_NEWPAGE_INSERT: {
                        string const name = cmd.getArg(0);
                        InsetNewpageParams inp;
@@ -203,9 +200,6 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
                        return new InsetPrintNomencl(buf, icp);
                }
 
-               case LFUN_TOC_INSERT:
-                       return new InsetTOC(buf, InsetCommandParams(TOC_CODE));
-
                case LFUN_INFO_INSERT: {
                        InsetInfo * inset = new InsetInfo(buf, to_utf8(cmd.argument()));
                        inset->updateInfo();
@@ -225,19 +219,19 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
                        
                        case BIBITEM_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetBibitem(buf, icp);
                        }
                        
                        case BIBTEX_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetBibtex(buf, icp);
                        }
                        
                        case CITE_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetCitation(buf, icp);
                        }
                        
@@ -245,12 +239,6 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
                                return new InsetERT(buf,
                                        InsetERT::string2params(to_utf8(cmd.argument())));
                        }
-                               
-                       case LISTINGS_CODE: {
-                               InsetListingsParams par;
-                               InsetListings::string2params(to_utf8(cmd.argument()), par);
-                               return new InsetListings(buf, par);
-                       }
                        
                        case EXTERNAL_CODE: {
                                InsetExternalParams iep;
@@ -271,13 +259,13 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
                        
                        case HYPERLINK_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetHyperlink(buf, icp);
                        }
                        
                        case INCLUDE_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetInclude(buf, icp);
                        }
                        
@@ -288,25 +276,37 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
                        
                        case INDEX_PRINT_CODE:  {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetPrintIndex(buf, icp);
                        }
                        
-                       case NOMENCL_CODE: {
+                       case LABEL_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
-                               return new InsetNomencl(buf, icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+                               return new InsetLabel(buf, icp);
                        }
                        
-                       case LABEL_CODE: {
+                       case LINE_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
-                               return new InsetLabel(buf, icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+                               return new InsetLine(buf, icp);
+                       }
+                               
+                       case LISTINGS_CODE: {
+                               InsetListingsParams par;
+                               InsetListings::string2params(to_utf8(cmd.argument()), par);
+                               return new InsetListings(buf, par);
+                       }
+                       
+                       case NOMENCL_CODE: {
+                               InsetCommandParams icp(code);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+                               return new InsetNomencl(buf, icp);
                        }
                        
                        case REF_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetRef(buf, icp);
                        }
 
@@ -318,7 +318,7 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
                        
                        case TOC_CODE: {
                                InsetCommandParams icp(code);
-                               InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
+                               InsetCommand::string2params(to_utf8(cmd.argument()), icp);
                                return new InsetTOC(buf, icp);
                        }
                        
@@ -490,6 +490,9 @@ Inset * readInset(Lexer & lex, Buffer * buf)
                        case LABEL_CODE:
                                inset.reset(new InsetLabel(buf, inscmd));
                                break;
+                       case LINE_CODE:
+                               inset.reset(new InsetLine(buf, inscmd));
+                               break;
                        case NOMENCL_CODE:
                                inset.reset(new InsetNomencl(buf, inscmd));
                                break;