}
-void InsetWrap::updateLabels(ParIterator const & it)
+void InsetWrap::updateBuffer(ParIterator const & it, UpdateType utype)
{
setLabel(_("wrap: ") + floatName(params_.type));
Counters & cnts =
buffer().masterBuffer()->params().documentClass().counters();
+ if (utype == OutputUpdate) {
+ // counters are local to the wrap
+ cnts.saveLastCounter();
+ }
string const saveflt = cnts.current_float();
// Tell to captions what the current float is
cnts.current_float(params().type);
- InsetCollapsable::updateLabels(it);
+ InsetCollapsable::updateBuffer(it, utype);
// reset afterwards
cnts.current_float(saveflt);
+ if (utype == OutputUpdate)
+ cnts.restoreLastCounter();
}
string const len = params_.width.asHTMLString();
string const width = len.empty() ? "50%" : len;
string const attr = "class='wrap' style='width: " + len + ";'";
- xs << StartTag("div", attr);
+ xs << html::StartTag("div", attr);
docstring const deferred =
InsetText::insetAsXHTML(xs, rp, InsetText::WriteInnerTag);
if (!len.empty())
- xs << EndTag("div");
+ xs << html::EndTag("div");
return deferred;
}