]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetEnvironment.cpp
Use home made code for the bool facet.
[lyx.git] / src / insets / InsetEnvironment.cpp
index 318c8992c2db21d9cb66ea48e3e5270a8fe771d0..f665e86b342a2676c35a3713724c000ddf60b1d3 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"
@@ -28,8 +27,8 @@ using std::ostream;
 
 
 InsetEnvironment::InsetEnvironment
-               (BufferParams const & bp, string const & name)
-       : InsetText(bp), layout_(bp.getLyXTextClass()[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 +40,15 @@ InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
 {}
 
 
-auto_ptr<InsetBase> InsetEnvironment::doClone() const
+auto_ptr<Inset> InsetEnvironment::doClone() const
 {
-       return auto_ptr<InsetBase>(new InsetEnvironment(*this));
+       return auto_ptr<Inset>(new InsetEnvironment(*this));
 }
 
 
 void InsetEnvironment::write(Buffer const & buf, ostream & os) const
 {
-       os << "Environment " << to_utf8(getInsetName()) << "\n";
+       os << "Environment " << to_utf8(name()) << "\n";
        InsetText::write(buf, os);
 }
 
@@ -62,12 +61,12 @@ void InsetEnvironment::read(Buffer const & buf, Lexer & lex)
 
 docstring const InsetEnvironment::editMessage() const
 {
-       return _("Opened Environment Inset: ") + getInsetName();
+       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 +80,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(getInsetName()) << ":\n";
+       os << '[' << to_utf8(name()) << ":\n";
        InsetText::plaintext(buf, os, runparams);
        os << "\n]";
 
@@ -91,7 +90,7 @@ int InsetEnvironment::plaintext(Buffer const & buf, odocstream & os,
 }
 
 
-LyXLayout_ptr const & InsetEnvironment::layout() const
+Layout_ptr const & InsetEnvironment::layout() const
 {
        return layout_;
 }