]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetenv.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetenv.C
index e8ba7fde584bc04d6e04ca5611e669a2add47b91..7e6c7ad70f05eac072ba36ee8dba313bc5b6c804 100644 (file)
@@ -23,6 +23,7 @@
 
 using std::ostream;
 using std::endl;
+using std::auto_ptr;
 
 
 InsetEnvironment::InsetEnvironment
@@ -35,14 +36,14 @@ InsetEnvironment::InsetEnvironment
 }
 
 
-InsetEnvironment::InsetEnvironment(InsetEnvironment const & in, bool same_id)
-       : InsetText(in, same_id), layout_(in.layout_)
+InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
+       : InsetText(in), layout_(in.layout_)
 {}
 
 
-Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
+auto_ptr<InsetBase> InsetEnvironment::clone() const
 {
-       return new InsetEnvironment(*this, same_id);
+       return auto_ptr<InsetBase>(new InsetEnvironment(*this));
 }
 
 
@@ -65,13 +66,13 @@ string const InsetEnvironment::editMessage() const
 }
 
 
-int InsetEnvironment::latex(Buffer const * buf,
-                        ostream & os, bool fragile, bool) const
+int InsetEnvironment::latex(Buffer const * buf, ostream & os,
+                           LatexRunParams const & runparams) const
 {
        os << layout_->latexheader;
        TexRow texrow;
-       latexParagraphs(buf, paragraphs, os, texrow, fragile,
-               layout_->latexparagraph);
+       latexParagraphs(buf, paragraphs, os, texrow, runparams,
+                       layout_->latexparagraph);
        os << layout_->latexfooter;
        return texrow.rows();
 }