#include <config.h>
#include "insetnote.h"
-#include "insettext.h"
-#include "buffer.h"
#include "BufferView.h"
-#include "debug.h"
#include "funcrequest.h"
#include "gettext.h"
-#include "language.h"
-#include "lyxfont.h"
+#include "LaTeXFeatures.h"
+#include "LColor.h"
#include "lyxlex.h"
-#include "lyxtext.h"
#include "metricsinfo.h"
-#include "support/LOstream.h"
-#include "support/lstrings.h"
+#include "paragraph.h"
-#include "Lsstream.h"
+#include "support/std_sstream.h"
-using std::ostream;
+
+using std::string;
using std::auto_ptr;
+using std::istringstream;
+using std::ostream;
+using std::ostringstream;
void InsetNote::init()
{
params_.type = label;
init();
- setButtonLabel();
}
}
-InsetNote::~InsetNote() // MV
+InsetNote::~InsetNote()
{
InsetNoteMailer mailer("note", *this);
mailer.hideDialog();
// Contrary to Greyedout, these cannot be construed as part of the
// running text: make them stand on their own
if (params_.type == "Note" || params_.type == "Comment")
- if (!collapsed_)
+ if (isOpen())
dim.wid = mi.base.textwidth;
dim_ = dim;
}
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
- InsetNoteParams params;
- InsetNoteMailer::string2params(cmd.argument, params);
- params_.type = params.type;
+ InsetNoteMailer::string2params(cmd.argument, params_);
setButtonLabel();
bv->updateInset(this);
return DISPATCHED;
} else if (pt == "Greyedout") {
os << "%\n\\end{lyxgreyedout}\n";
i += 4;
- }
+ }
return i;
}
ostringstream data;
data << name << ' ';
params.write(data);
- return STRCONV(data.str());
+ return data.str();
}
if (in.empty())
return;
- istringstream data(STRCONV(in));
+ istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
params.read(lex);