]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetoptarg.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetoptarg.C
index 03f000d92049e615c52228305e1e2ff6a714b265..3abdebc170df65901786c30145a2ece0223595fe 100644 (file)
@@ -26,6 +26,8 @@
 using std::ostream;
 using std::vector;
 using std::pair;
+using std::auto_ptr;
+
 
 InsetOptArg::InsetOptArg(BufferParams const & ins)
        : InsetCollapsable(ins, true)
@@ -47,28 +49,12 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in)
 }
 
 
-// InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
-//     : InsetCollapsable(in, same_id)
-// {
-//     LyXFont font(LyXFont::ALL_SANE);
-//     font.setColor(LColor::collapsable);
-//     setLabelFont(font);
-//     setLabel(_("opt"));
-// }
-
-
-Inset * InsetOptArg::clone(Buffer const &) const
+auto_ptr<InsetBase> InsetOptArg::clone() const
 {
-       return new InsetOptArg(*this);
+       return auto_ptr<InsetBase>(new InsetOptArg(*this));
 }
 
 
-// Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
-// {
-//     return new InsetOptArg(*this, same_id);
-// }
-
-
 string const InsetOptArg::editMessage() const
 {
        return _("Opened Optional Argument Inset");