]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfoot.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetfoot.C
index c020e5484596cc2b0d3711e16c24e722424705bf..5b5e07a2aa7be20d350acb0b18c4ac9b7a019eac 100644 (file)
@@ -28,6 +28,7 @@
 
 
 using std::ostream;
+using std::auto_ptr;
 
 
 InsetFoot::InsetFoot(BufferParams const & bp)
@@ -46,26 +47,12 @@ InsetFoot::InsetFoot(InsetFoot const & in)
 }
 
 
-// InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
-//     : InsetFootlike(in, same_id)
-// {
-//     setLabel(_("foot"));
-//     setInsetName("Foot");
-// }
-
-
-Inset * InsetFoot::clone(Buffer const &) const
+auto_ptr<InsetBase> InsetFoot::clone() const
 {
-       return new InsetFoot(*const_cast<InsetFoot *>(this));
+       return auto_ptr<InsetBase>(new InsetFoot(*this));
 }
 
 
-// Inset * InsetFoot::clone(Buffer const &, bool same_id) const
-// {
-//     return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
-// }
-
-
 string const InsetFoot::editMessage() const
 {
        return _("Opened Footnote Inset");