]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNote.cpp
pimpl not needed here
[lyx.git] / src / insets / InsetNote.cpp
index 99cf71a4918649f5161e1193400973426068b4e5..f6e278347478a97814007c5cff07394871cc5a6e 100644 (file)
@@ -31,6 +31,7 @@
 #include "MetricsInfo.h"
 #include "OutputParams.h"
 
+#include "support/docstream.h"
 #include "support/Translator.h"
 
 #include <algorithm>
@@ -40,7 +41,6 @@
 namespace lyx {
 
 using std::string;
-using std::auto_ptr;
 using std::istringstream;
 using std::ostream;
 using std::ostringstream;
@@ -116,7 +116,6 @@ InsetNote::InsetNote(BufferParams const & bp, string const & label)
        : InsetCollapsable(bp)
 {
        params_.type = notetranslator().find(label);
-       setLayout(bp);
        setButtonLabel();
 }
 
@@ -134,9 +133,9 @@ InsetNote::~InsetNote()
 }
 
 
-auto_ptr<Inset> InsetNote::doClone() const
+Inset * InsetNote::clone() const
 {
-       return auto_ptr<Inset>(new InsetNote(*this));
+       return new InsetNote(*this);
 }
 
 
@@ -175,8 +174,6 @@ void InsetNote::read(Buffer const & buf, Lexer & lex)
 {
        params_.read(lex);
        InsetCollapsable::read(buf, lex);
-       setLayout(buf.params());
-       setButtonLabel();
 }
 
 
@@ -202,7 +199,6 @@ void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd)
                InsetNoteMailer::string2params(to_utf8(cmd.argument()), params_);
                // get a bp from cur:
                setLayout(cur.buffer().params());
-               setButtonLabel();
                break;
 
        case LFUN_INSET_DIALOG_UPDATE: