FloatList const & floats = buffer().params().documentClass().floats();
FloatList::const_iterator cit = floats[to_ascii(getParam("type"))];
FloatList const & floats = buffer().params().documentClass().floats();
FloatList::const_iterator cit = floats[to_ascii(getParam("type"))];
// Other builtin floats should be handled here. But I'm not sure if that is
// even possible yet, since I'm not sure if we have a TOC for such things.
// If so, then they should define ListName, as non-builtin floats do, and
// Other builtin floats should be handled here. But I'm not sure if that is
// even possible yet, since I'm not sure if we have a TOC for such things.
// If so, then they should define ListName, as non-builtin floats do, and
// Really, all floats should define that.
if (cit->second.isPredefined()) {
// Only two different types allowed here:
// Really, all floats should define that.
if (cit->second.isPredefined()) {
// Only two different types allowed here:
// we want to look like a chapter, section, or whatever.
// so we're going to look for the layout with the minimum toclevel
// we want to look like a chapter, section, or whatever.
// so we're going to look for the layout with the minimum toclevel
// we'll take the first one, just because.
// FIXME This could be specified in the layout file.
DocumentClass const & dc = buffer().params().documentClass();
TextClass::LayoutList::const_iterator lit = dc.begin();
TextClass::LayoutList::const_iterator len = dc.end();
int minlevel = 1000;
// we'll take the first one, just because.
// FIXME This could be specified in the layout file.
DocumentClass const & dc = buffer().params().documentClass();
TextClass::LayoutList::const_iterator lit = dc.begin();
TextClass::LayoutList::const_iterator len = dc.end();
int minlevel = 1000;
for (; lit != len; ++lit) {
int const level = lit->toclevel;
if (level > 0 && (level == Layout::NOT_IN_TOC || level >= minlevel))
for (; lit != len; ++lit) {
int const level = lit->toclevel;
if (level > 0 && (level == Layout::NOT_IN_TOC || level >= minlevel))
string const tocclass = lay ? " " + lay->defaultCSSClass(): "";
string const tocattr = "class='tochead toc-" + toctype + tocclass + "'";
string const tocclass = lay ? " " + lay->defaultCSSClass(): "";
string const tocattr = "class='tochead toc-" + toctype + tocclass + "'";
// we'll use our own stream, because we are going to defer everything.
// that's how we deal with the fact that we're probably inside a standard
// paragraph, and we don't want to be.
odocstringstream ods;
// we'll use our own stream, because we are going to defer everything.
// that's how we deal with the fact that we're probably inside a standard
// paragraph, and we don't want to be.
odocstringstream ods;
- xs << html::StartTag("div", "class='toc toc-floats'");
- xs << html::StartTag(tag, tocattr)
- << toclabel
- << html::EndTag(tag);
-
+ xs << xml::StartTag("div", "class='toc toc-floats'");
+ xs << xml::StartTag(tag, tocattr)
+ << toclabel
+ << xml::EndTag(tag);
+
continue;
Paragraph const & par = it->dit().innerParagraph();
string const attr = "class='lyxtoc-floats lyxtoc-" + toctype + "'";
continue;
Paragraph const & par = it->dit().innerParagraph();
string const attr = "class='lyxtoc-floats lyxtoc-" + toctype + "'";