from_utf8(cmd.getArg(1)) == params_.index);
return true;
}
- flag.setEnabled(true);
- return true;
+ return InsetCollapsable::getStatus(cur, cmd, flag);
case LFUN_INSET_DIALOG_UPDATE: {
Buffer const & realbuffer = *buffer().masterBuffer();
DocIterator pit = cpit;
pit.push_back(CursorSlice(const_cast<InsetIndex &>(*this)));
docstring str;
- text().forToc(str, TOC_ENTRY_LENGTH);
+ text().forToc(str, 0);
buffer().tocBackend().toc("index").push_back(TocItem(pit, 0, str));
// Proceed with the rest of the inset.
InsetCollapsable::addToToc(cpit);
}
-docstring InsetIndex::contextMenuName() const
+string InsetIndex::contextMenuName() const
{
- return from_ascii("context-index");
+ return "context-index";
}
}
-docstring InsetPrintIndex::contextMenuName() const
+string InsetPrintIndex::contextMenuName() const
{
return buffer().masterBuffer()->params().use_indices ?
- from_ascii("context-indexprint") : docstring();
+ "context-indexprint" : string();
}
// close last entry or entries, depending.
if (level == 3) {
// close this sub-sub-entry
- xs << html::EndTag("li");
- xs.cr();
+ xs << html::EndTag("li") << html::CR();
// is this another sub-sub-entry within the same sub-entry?
if (!eit->same_sub(last)) {
// close this level
- xs << html::EndTag("ul");
- xs.cr();
+ xs << html::EndTag("ul") << html::CR();
level = 2;
}
}
// sub-entry. In that case, we do not want to close anything.
if (level == 2 && !eit->same_sub(last)) {
// close sub-entry
- xs << html::EndTag("li");
- xs.cr();
+ xs << html::EndTag("li") << html::CR();
// is this another sub-entry with the same main entry?
if (!eit->same_main(last)) {
// close this level
- xs << html::EndTag("ul");
- xs.cr();
+ xs << html::EndTag("ul") << html::CR();
level = 1;
}
}
// close the entry.
if (level == 1 && !eit->same_main(last)) {
// close entry
- xs << html::EndTag("li");
- xs.cr();
+ xs << html::EndTag("li") << html::CR();
}
}
<< XHTMLStream::ESCAPE_NONE << sub;
if (!subsub.empty()) {
// it's actually a subsubentry, so we need to start that list
- xs.cr();
- xs << html::StartTag("ul", "class='subsubentry'")
+ xs << html::CR()
+ << html::StartTag("ul", "class='subsubentry'")
<< html::StartTag("li", "class='subsubentry'")
<< XHTMLStream::ESCAPE_NONE << subsub;
level = 3;
xs << html::StartTag("li", "class='main'") << main;
if (!sub.empty()) {
// there's a sub-entry, too
- xs.cr();
- xs << html::StartTag("ul", "class='subentry'")
+ xs << html::CR()
+ << html::StartTag("ul", "class='subentry'")
<< html::StartTag("li", "class='subentry'")
<< XHTMLStream::ESCAPE_NONE << sub;
level = 2;
if (!subsub.empty()) {
// and a sub-sub-entry
- xs.cr();
- xs << html::StartTag("ul", "class='subsubentry'")
+ xs << html::CR()
+ << html::StartTag("ul", "class='subsubentry'")
<< html::StartTag("li", "class='subsubentry'")
<< XHTMLStream::ESCAPE_NONE << subsub;
level = 3;
}
// now we have to close all the open levels
while (level > 0) {
- xs << html::EndTag("li") << html::EndTag("ul");
- xs.cr();
+ xs << html::EndTag("li") << html::EndTag("ul") << html::CR();
--level;
}
- xs << html::EndTag("div");
- xs.cr();
+ xs << html::EndTag("div") << html::CR();
return ods.str();
}