]> git.lyx.org Git - lyx.git/blobdiff - src/factory.cpp
rev 19644: I forgot this.
[lyx.git] / src / factory.cpp
index 60eb245847ca91b1aef6b28f0c6415e3c82b780a..fc6468056b086badb5887e428681ba8ae699e7c7 100644 (file)
 
 #include <sstream>
 
+using std::auto_ptr;
+using std::endl;
+using std::string;
+
 
 namespace lyx {
 
@@ -75,10 +79,6 @@ namespace Alert = frontend::Alert;
 
 using support::compare_ascii_no_case;
 
-using std::auto_ptr;
-using std::endl;
-using std::string;
-
 
 Inset * createInset(BufferView * bv, FuncRequest const & cmd)
 {
@@ -228,7 +228,7 @@ Inset * createInset(BufferView * bv, FuncRequest const & cmd)
                        return new InsetTOC(InsetCommandParams("tableofcontents"));
 
                case LFUN_ENVIRONMENT_INSERT:
-                       return new InsetEnvironment(params, to_utf8(cmd.argument()));
+                       return new InsetEnvironment(params, cmd.argument());
 
 #if 0
                case LFUN_LIST_INSERT:
@@ -491,7 +491,7 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
                        inset.reset(new InsetInclude(p));
                } else if (tmptok == "Environment") {
                        lex.next();
-                       inset.reset(new InsetEnvironment(buf.params(), lex.getString()));
+                       inset.reset(new InsetEnvironment(buf.params(), lex.getDocString()));
                } else if (tmptok == "ERT") {
                        inset.reset(new InsetERT(buf.params()));
                } else if (tmptok == "listings") {
@@ -538,9 +538,7 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
 
                inset->read(buf, lex);
 
-#ifdef WITH_WARNINGS
-#warning hack..
-#endif
+// FIXME: hack..
                if (inset->lyxCode() == Inset::MATHMACRO_CODE) {
                        MathMacroTemplate const * tmpl =
                                static_cast<MathMacroTemplate*>(inset.get());