]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetindex.h
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetindex.h
index 0eac55b403353ba9a5c7aebaf68b04ea7bd53ac5..8c695731feb120a689cb5e879d90591be923daa3 100644 (file)
@@ -26,8 +26,8 @@ public:
        ///
        ~InsetIndex();
        ///
-       virtual Inset * clone(Buffer const &) const {
-               return new InsetIndex(params());
+       virtual std::auto_ptr<InsetBase> clone() const {
+               return std::auto_ptr<InsetBase>(new InsetIndex(params()));
        }
        ///
        dispatch_result localDispatch(FuncRequest const & cmd);
@@ -36,7 +36,7 @@ public:
        ///
        EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       Inset::Code lyxCode() const;
+       InsetOld::Code lyxCode() const;
        ///
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
 };
@@ -49,8 +49,8 @@ public:
        ///
        ~InsetPrintIndex();
        ///
-       Inset * clone(Buffer const &) const {
-               return new InsetPrintIndex(params());
+       virtual std::auto_ptr<InsetBase> clone() const {
+               return std::auto_ptr<InsetBase>(new InsetPrintIndex(params()));
        }
        ///
        //dispatch_result localDispatch(FuncRequest const & cmd);
@@ -61,7 +61,7 @@ public:
        ///
        bool display() const { return true; }
        ///
-       Inset::Code lyxCode() const;
+       InsetOld::Code lyxCode() const;
        ///
        string const getScreenLabel(Buffer const *) const;
        ///