- return InsetText::plaintext(buf, os, runparams);
-}
-
-
-int InsetFlex::docbook(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
-{
- ParagraphList::const_iterator beg = paragraphs().begin();
- ParagraphList::const_iterator par = paragraphs().begin();
- ParagraphList::const_iterator end = paragraphs().end();
-
- if (!undefined())
- // FIXME UNICODE
- sgml::openTag(os, layout_->latexname,
- par->getID(buf, runparams) + layout_->latexparam);
-
- for (; par != end; ++par) {
- par->simpleDocBookOnePar(buf, os, runparams,
- outerFont(std::distance(beg, par),
- paragraphs()));
+ switch (cmd.action()) {
+ case LFUN_INSET_DISSOLVE:
+ if (!cmd.argument().empty()) {
+ InsetLayout const & il = getLayout();
+ InsetLayout::InsetLyXType const type =
+ translateLyXType(to_utf8(cmd.argument()));
+ if (il.lyxtype() == type) {
+ FuncRequest temp_cmd(LFUN_INSET_DISSOLVE);
+ return InsetCollapsable::getStatus(cur, temp_cmd, flag);
+ } else
+ return false;
+ }
+ // fall-through
+ default:
+ return InsetCollapsable::getStatus(cur, cmd, flag);