]> git.lyx.org Git - lyx.git/blobdiff - src/factory.cpp
BufferParams.h: add comment
[lyx.git] / src / factory.cpp
index 1343dfb50b1c30b99bea461c565def874c476d1d..54ae0c8965711bc76302e3719eafdf7805df648d 100644 (file)
@@ -80,7 +80,7 @@ using std::endl;
 using std::string;
 
 
-InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
+Inset * createInset(BufferView * bv, FuncRequest const & cmd)
 {
        BufferParams const & params = bv->buffer()->params();
 
@@ -104,7 +104,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
 
                case LFUN_CHARSTYLE_INSERT: {
                        string s = cmd.getArg(0);
-                       LyXTextClass tclass = params.getLyXTextClass();
+                       TextClass tclass = params.getTextClass();
                        CharStyles::iterator found_cs = tclass.charstyle(s);
                        if (found_cs != tclass.charstyles().end())
                                return new InsetCharStyle(params, found_cs);
@@ -151,7 +151,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
                case LFUN_FLOAT_INSERT: {
                        // check if the float type exists
                        string const argument = to_utf8(cmd.argument());
-                       if (params.getLyXTextClass().floats().typeExist(argument))
+                       if (params.getTextClass().floats().typeExist(argument))
                                return new InsetFloat(params, argument);
                        lyxerr << "Non-existent float type: " << argument << endl;
                        return 0;
@@ -160,7 +160,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
                case LFUN_FLOAT_WIDE_INSERT: {
                        // check if the float type exists
                        string const argument = to_utf8(cmd.argument());
-                       if (params.getLyXTextClass().floats().typeExist(argument)) {
+                       if (params.getTextClass().floats().typeExist(argument)) {
                                auto_ptr<InsetFloat> p(new InsetFloat(params, argument));
                                p->wide(true, params);
                                return p.release();
@@ -372,7 +372,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
 }
 
 
-InsetBase * readInset(Lexer & lex, Buffer const & buf)
+Inset * readInset(Lexer & lex, Buffer const & buf)
 {
        // consistency check
        if (lex.getString() != "\\begin_inset") {
@@ -380,9 +380,9 @@ InsetBase * readInset(Lexer & lex, Buffer const & buf)
                       << endl;
        }
 
-       auto_ptr<InsetBase> inset;
+       auto_ptr<Inset> inset;
 
-       LyXTextClass tclass = buf.params().getLyXTextClass();
+       TextClass tclass = buf.params().getTextClass();
 
        lex.next();
        string tmptok = lex.getString();
@@ -531,7 +531,7 @@ InsetBase * readInset(Lexer & lex, Buffer const & buf)
 #ifdef WITH_WARNINGS
 #warning hack..
 #endif
-               if (inset->lyxCode() == InsetBase::MATHMACRO_CODE) {
+               if (inset->lyxCode() == Inset::MATHMACRO_CODE) {
                        MathMacroTemplate const * tmpl =
                                static_cast<MathMacroTemplate*>(inset.get());
                        MacroTable::globalMacros().insert