- return _("Opened Flex Inset");
-}
-
-
-void InsetFlex::write(Buffer const & buf, ostream & os) const
-{
- params_.write(os);
- InsetCollapsable::write(buf, os);
-}
-
-
-void InsetFlex::read(Buffer const & buf, Lexer & lex)
-{
- params_.read(lex);
- InsetCollapsable::read(buf, lex);
-}
-
-
-int InsetFlex::plaintext(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
-{
- 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()));
+ os << "Flex ";
+ string name;
+ if (name_.empty())
+ name = "undefined";
+ else {
+ InsetLayout const & il = getLayout();
+ // use il.name(), since this resolves obsoleted InsetLayout names
+ if (il.name() == "undefined")
+ // This is the name of the plain_insetlayout_. We assume that the
+ // name resolution has failed.
+ name = name_;
+ else {
+ name = to_utf8(il.name());
+ // Remove the "Flex:" prefix, if it is present
+ if (support::prefixIs(name, "Flex:"))
+ name = support::split(name, ':');
+ }