]> git.lyx.org Git - lyx.git/blobdiff - src/factory.cpp
* Doxy.
[lyx.git] / src / factory.cpp
index 97d95e883184c84b2864a4aba4a601151b79d83e..5f9b3d0d2311062e3d35584e344f5c9a0adccee5 100644 (file)
@@ -64,7 +64,7 @@
 #include "support/lstrings.h"
 #include "support/ExceptionMessage.h"
 
-#include <boost/assert.hpp>
+#include "support/lassert.h"
 
 #include <sstream>
 
@@ -143,7 +143,7 @@ Inset * createInsetHelper(Buffer & buf, FuncRequest const & cmd)
                        return new InsetOptArg(buf);
 
                case LFUN_BIBITEM_INSERT:
-                       return new InsetBibitem(InsetCommandParams(BIBITEM_CODE));
+                       return new InsetBibitem(buf, InsetCommandParams(BIBITEM_CODE));
 
                case LFUN_FLOAT_INSERT: {
                        // check if the float type exists
@@ -210,8 +210,11 @@ Inset * createInsetHelper(Buffer & buf, FuncRequest const & cmd)
                case LFUN_ENVIRONMENT_INSERT:
                        return new InsetEnvironment(buf, cmd.argument());
 
-               case LFUN_INFO_INSERT:
-                       return new InsetInfo(buf, to_utf8(cmd.argument()));
+               case LFUN_INFO_INSERT: {
+                       InsetInfo * inset = new InsetInfo(buf, to_utf8(cmd.argument()));
+                       inset->updateInfo();
+                       return inset;
+               }
 
                case LFUN_INSET_INSERT: {
                        string const name = cmd.getArg(0);
@@ -224,13 +227,13 @@ Inset * createInsetHelper(Buffer & buf, FuncRequest const & cmd)
                        case BIBITEM_CODE: {
                                InsetCommandParams icp(code);
                                InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
-                               return new InsetBibitem(icp);
+                               return new InsetBibitem(buf, icp);
                        }
                        
                        case BIBTEX_CODE: {
                                InsetCommandParams icp(code);
                                InsetCommand::string2params(name, to_utf8(cmd.argument()), icp);
-                               return new InsetBibtex(icp);
+                               return new InsetBibtex(buf, icp);
                        }
                        
                        case CITE_CODE: {
@@ -448,10 +451,10 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
 
                switch (code) {
                        case BIBITEM_CODE:
-                               inset.reset(new InsetBibitem(inscmd));
+                               inset.reset(new InsetBibitem(buf, inscmd));
                                break;
                        case BIBTEX_CODE:
-                               inset.reset(new InsetBibtex(inscmd));
+                               inset.reset(new InsetBibtex(buf, inscmd));
                                break;
                        case CITE_CODE: 
                                inset.reset(new InsetCitation(inscmd));
@@ -525,7 +528,7 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
                        inset.reset(new InsetERT(buf));
                } else if (tmptok == "listings") {
                        inset.reset(new InsetListings(buf));
-               } else if (tmptok == "Space") {
+               } else if (tmptok == "space") {
                        inset.reset(new InsetSpace);
                } else if (tmptok == "Tabular") {
                        inset.reset(new InsetTabular(buf));