]> 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 e3b4caa7fbf89e5703ba13c3b1b468513ab3585f..8c695731feb120a689cb5e879d90591be923daa3 100644 (file)
@@ -26,8 +26,8 @@ public:
        ///
        ~InsetIndex();
        ///
-       virtual Inset * clone() 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() 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;
        ///