]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetEnvironment.cpp
Fix text frame drawing.
[lyx.git] / src / insets / InsetEnvironment.cpp
index b97eaacfdd8b69c5c2f86acd33277492ea57580c..f7e380d4d5c60c86a9afde496a211038834b90a5 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "BufferParams.h"
 #include "gettext.h"
-#include "Paragraph.h"
 #include "OutputParams.h"
 #include "output_latex.h"
 #include "TexRow.h"
 
 namespace lyx {
 
-using std::string;
-using std::auto_ptr;
-using std::ostream;
-
 
 InsetEnvironment::InsetEnvironment
-               (BufferParams const & bp, string const & name)
-       : InsetText(bp), layout_(bp.getTextClass()[name]), name_(from_utf8(name))
+               (BufferParams const & bp, docstring const & name)
+       : InsetText(bp), layout_(bp.getTextClass()[name]), name_(name)
 {
        setAutoBreakRows(true);
        setDrawFrame(true);
@@ -41,15 +36,15 @@ InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
 {}
 
 
-auto_ptr<Inset> InsetEnvironment::doClone() const
+Inset * InsetEnvironment::clone() const
 {
-       return auto_ptr<Inset>(new InsetEnvironment(*this));
+       return new InsetEnvironment(*this);
 }
 
 
-void InsetEnvironment::write(Buffer const & buf, ostream & os) const
+void InsetEnvironment::write(Buffer const & buf, std::ostream & os) const
 {
-       os << "Environment " << to_utf8(insetName()) << "\n";
+       os << "Environment " << to_utf8(name()) << "\n";
        InsetText::write(buf, os);
 }
 
@@ -62,12 +57,12 @@ void InsetEnvironment::read(Buffer const & buf, Lexer & lex)
 
 docstring const InsetEnvironment::editMessage() const
 {
-       return _("Opened Environment Inset: ") + insetName();
+       return _("Opened Environment Inset: ") + name();
 }
 
 
 int InsetEnvironment::latex(Buffer const & buf, odocstream & os,
-                            OutputParams const & runparams) const
+                           OutputParams const & runparams) const
 {
        // FIXME UNICODE
        os << from_utf8(layout_->latexheader);
@@ -81,9 +76,9 @@ int InsetEnvironment::latex(Buffer const & buf, odocstream & os,
 
 
 int InsetEnvironment::plaintext(Buffer const & buf, odocstream & os,
-                                OutputParams const & runparams) const
+                               OutputParams const & runparams) const
 {
-       os << '[' << to_utf8(insetName()) << ":\n";
+       os << '[' << to_utf8(name()) << ":\n";
        InsetText::plaintext(buf, os, runparams);
        os << "\n]";
 
@@ -91,7 +86,7 @@ int InsetEnvironment::plaintext(Buffer const & buf, odocstream & os,
 }
 
 
-Layout_ptr const & InsetEnvironment::layout() const
+LayoutPtr const & InsetEnvironment::layout() const
 {
        return layout_;
 }