InsetInfo::InsetInfo(Buffer * buf, string const & name)
- : InsetCollapsable(buf), initialized_(false),
+ : InsetCollapsible(buf), initialized_(false),
type_(UNKNOWN_INFO), name_()
{
setInfo(name);
{
switch (cmd.action()) {
case LFUN_INSET_SETTINGS:
- return InsetCollapsable::getStatus(cur, cmd, flag);
+ return InsetCollapsible::getStatus(cur, cmd, flag);
case LFUN_INSET_DIALOG_UPDATE:
case LFUN_INSET_COPY_AS:
}
default:
- InsetCollapsable::doDispatch(cur, cmd);
+ InsetCollapsible::doDispatch(cur, cmd);
break;
}
}
Font const f(inherit_font, buffer().params().language);
//Font fu = f;
//fu.fontInfo().setUnderbar(FONT_ON);
- docstring_list::const_iterator beg = names.begin();
- docstring_list::const_iterator end = names.end();
- for (docstring_list::const_iterator it = beg ;
- it != end ; ++it) {
+ for (docstring const & name : names) {
// do not insert > for the top level menu item
- if (it != beg)
+ if (&name != &names.front())
par.insertInset(par.size(), new InsetSpecialChar(InsetSpecialChar::MENU_SEPARATOR),
f, Change(Change::UNCHANGED));
//FIXME: add proper underlines here. This
// return a vector of menus. If we do not do
// that, we might as well use below
// Paragraph::insert on each string (JMarc)
- for (size_type i = 0; i != it->length(); ++i)
- par.insertChar(par.size(), (*it)[i],
- f, Change(Change::UNCHANGED));
+ for (char_type c : name)
+ par.insertChar(par.size(), c, f, Change(Change::UNCHANGED));
}
break;
}
initialized_ = true;
break;
}
- InsetCollapsable::updateBuffer(it, utype);
+ InsetCollapsible::updateBuffer(it, utype);
}
string InsetInfo::contextMenu(BufferView const &, int, int) const
{
- //FIXME: We override the implementation of InsetCollapsable,
- //because this inset is not a collapsable inset.
+ //FIXME: We override the implementation of InsetCollapsible,
+ //because this inset is not a collapsible inset.
return contextMenuName();
}