}
-Inset * InsetMarginal::Clone(Buffer const &) const
+Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
{
InsetMarginal * result = new InsetMarginal;
- result->inset.init(&inset);
+ result->inset.init(&inset, same_id);
result->collapsed = collapsed;
+ if (same_id)
+ result->id_ = id_;
return result;
}
-string const InsetMarginal::EditMessage() const
+string const InsetMarginal::editMessage() const
{
return _("Opened Marginal Note Inset");
}
-int InsetMarginal::Latex(Buffer const * buf,
+int InsetMarginal::latex(Buffer const * buf,
std::ostream & os, bool fragile, bool fp) const
{
- os << "\\marginpar{%\n";
+ os << "%\n\\marginpar{";
- int const i = inset.Latex(buf, os, fragile, fp);
- os << "}%\n";
+ int const i = inset.latex(buf, os, fragile, fp);
+ os << "%\n}";
return i + 2;
}
-bool InsetMarginal::InsertInsetAllowed(Inset * in) const
+bool InsetMarginal::insertInsetAllowed(Inset * in) const
{
- if ((in->LyxCode() == Inset::FOOT_CODE) ||
- (in->LyxCode() == Inset::MARGIN_CODE)) {
+ if ((in->lyxCode() == Inset::FOOT_CODE) ||
+ (in->lyxCode() == Inset::MARGIN_CODE)) {
return false;
}
return true;