]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibitem.cpp
Fix text frame drawing.
[lyx.git] / src / insets / InsetBibitem.cpp
index a9d5dee14e7dc26af66231f3235ce13b9ddcbbdb..924b931d82825a9794cf2cc9d0a7cf591fc5fb8f 100644 (file)
 
 namespace lyx {
 
-using support::prefixIs;
-
-using std::max;
-using std::string;
-using std::auto_ptr;
-using std::ostream;
 
 int InsetBibitem::key_counter = 0;
+
+
 docstring const key_prefix = from_ascii("key-");
 
+
 InsetBibitem::InsetBibitem(InsetCommandParams const & p)
        : InsetCommand(p, "bibitem")
 {
@@ -49,11 +46,11 @@ InsetBibitem::InsetBibitem(InsetCommandParams const & p)
 }
 
 
-auto_ptr<Inset> InsetBibitem::doClone() const
+Inset * InsetBibitem::clone() const
 {
-       auto_ptr<InsetBibitem> b(new InsetBibitem(params()));
+       InsetBibitem * b = new InsetBibitem(params());
        b->autolabel_ = autolabel_;
-       return auto_ptr<Inset>(b);
+       return b;
 }
 
 
@@ -69,7 +66,7 @@ void InsetBibitem::doDispatch(Cursor & cur, FuncRequest & cmd)
                        break;
                }
                if (p["key"] != params()["key"])
-                       cur.bv().buffer()->changeRefsIfUnique(params()["key"],
+                       cur.bv().buffer().changeRefsIfUnique(params()["key"],
                                                       p["key"], Inset::CITE_CODE);
                setParams(p);
        }
@@ -85,9 +82,9 @@ void InsetBibitem::read(Buffer const & buf, Lexer & lex)
 {
        InsetCommand::read(buf, lex);
 
-       if (prefixIs(getParam("key"), key_prefix)) {
+       if (support::prefixIs(getParam("key"), key_prefix)) {
                int const key = convert<int>(getParam("key").substr(key_prefix.length()));
-               key_counter = max(key_counter, key);
+               key_counter = std::max(key_counter, key);
        }
 }