]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetenv.C
Enable convertDefault.sh to run even if its executable bit is not set.
[lyx.git] / src / insets / insetenv.C
index 1fc442dbe952c81807e732c6f011848d99d9ba32..86bfc50a773cb35d73e83199c4992a0ec7d61615 100644 (file)
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /**
  * \file insetenv.C
  * This file is part of LyX, the document processor.
@@ -6,7 +5,7 @@
  *
  * \author André Pönitz
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
@@ -23,6 +22,7 @@
 
 using std::ostream;
 using std::endl;
+using std::auto_ptr;
 
 
 InsetEnvironment::InsetEnvironment
@@ -35,25 +35,25 @@ 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));
 }
 
 
-void InsetEnvironment::write(Buffer const * buf, ostream & os) const
+void InsetEnvironment::write(Buffer const & buf, ostream & os) const
 {
        os << "Environment " << getInsetName() << "\n";
        InsetText::write(buf, os);
 }
 
 
-void InsetEnvironment::read(Buffer const * buf, LyXLex & lex)
+void InsetEnvironment::read(Buffer const & buf, LyXLex & lex)
 {
        InsetText::read(buf, lex);
 }
@@ -65,9 +65,8 @@ string const InsetEnvironment::editMessage() const
 }
 
 
-int InsetEnvironment::latex(Buffer const * buf, ostream & os,
-                           LatexRunParams const & runparams,
-                           bool) const
+int InsetEnvironment::latex(Buffer const & buf, ostream & os,
+                           LatexRunParams const & runparams) const
 {
        os << layout_->latexheader;
        TexRow texrow;