]> 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 eb797063aefa5603d033f7925ef28a1c0863b0cc..5b5e07a2aa7be20d350acb0b18c4ac9b7a019eac 100644 (file)
@@ -28,6 +28,7 @@
 
 
 using std::ostream;
+using std::auto_ptr;
 
 
 InsetFoot::InsetFoot(BufferParams const & bp)
@@ -38,17 +39,17 @@ InsetFoot::InsetFoot(BufferParams const & bp)
 }
 
 
-InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
-       : InsetFootlike(in, same_id)
+InsetFoot::InsetFoot(InsetFoot const & in)
+       : InsetFootlike(in)
 {
        setLabel(_("foot"));
        setInsetName("Foot");
 }
 
 
-Inset * InsetFoot::clone(Buffer const &, bool same_id) const
+auto_ptr<InsetBase> InsetFoot::clone() const
 {
-       return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
+       return auto_ptr<InsetBase>(new InsetFoot(*this));
 }
 
 
@@ -59,18 +60,17 @@ string const InsetFoot::editMessage() const
 
 
 int InsetFoot::latex(Buffer const * buf, ostream & os,
-                    LatexRunParams const & runparams_in,
-                    bool fp) const
+                    LatexRunParams const & runparams_in) const
 {
        LatexRunParams runparams = runparams_in;
        if (buf && parOwner()) {
                LyXLayout_ptr const & layout = parOwner()->layout();
-               runparams.fragile |= layout->intitle;
+               runparams.moving_arg |= layout->intitle;
        }
 
        os << "%\n\\footnote{";
 
-       int const i = inset.latex(buf, os, runparams, fp);
+       int const i = inset.latex(buf, os, runparams);
        os << "%\n}";
 
        return i + 2;