]> git.lyx.org Git - features.git/blobdiff - src/insets/insetbib.C
Another clean-up patch from Angus
[features.git] / src / insets / insetbib.C
index a2647612a27ff18bc74af909162b5487fe15e5d2..1f1dcfbf9a3141a55fe0003bd7d51edb37a47557 100644 (file)
@@ -72,19 +72,10 @@ FD_bibitem_form * create_form_bibitem_form(void)
 }
 
 
-InsetBibKey::InsetBibKey(string const & key, string const & label)
-       : InsetCommand("bibitem", key, label)
+InsetBibKey::InsetBibKey(InsetCommandParams const & p)
+       : InsetCommand(p)
 {
        counter = 1;
-       if (key.empty())
-               setCmdName(" ");
-}
-
-
-InsetBibKey::InsetBibKey(InsetBibKey const * b)
-       : InsetCommand("bibitem", b->getContents(), b->getOptions())
-{
-       counter = b->counter;
 }
 
 
@@ -97,6 +88,14 @@ InsetBibKey::~InsetBibKey()
 }
 
 
+Inset * InsetBibKey::Clone() const
+{
+       InsetBibKey * b = new InsetBibKey(params());
+       b->setCounter(counter);
+       return b;
+}
+
+
 void InsetBibKey::callback( FD_bibitem_form * form, long data )
 {
        switch (data) {
@@ -201,9 +200,8 @@ void InsetBibKey::Edit(BufferView * bv, int, int, unsigned int)
 }
 
 
-InsetBibtex::InsetBibtex(string const & dbase, string const & style,
-                        Buffer * o)
-       : InsetCommand("BibTeX", dbase, style), owner(o)
+InsetBibtex::InsetBibtex(InsetCommandParams const & p, Buffer * o)
+       : InsetCommand(p), owner(o)
 {}