- TocList::const_iterator cit = tocs_.find(type);
- if (cit != tocs_.end()) {
- TocIterator ccit = cit->second.begin();
- TocIterator end = cit->second.end();
- for (; ccit != end; ++ccit)
- os << ccit->asString() << '\n';
- }
+ outliner_names_.clear();
+ // names from this document class
+ for (auto const & name
+ : buffer_->params().documentClass().outlinerNames())
+ addName(name.first, translateIfPossible(name.second));
+ // Hardcoded types
+ addName("tableofcontents", _("Table of Contents"));
+ addName("change", _("Changes"));
+ addName("senseless", _("Senseless"));
+ addName("citation", _("Citations"));
+ addName("label", _("Labels and References"));
+ addName("brokenrefs", _("Broken References and Citations"));
+ // Customizable, but the corresponding insets have no layout definition
+ addName("child", _("Child Documents"));
+ addName("graphics", _("Graphics[[listof]]"));
+ addName("equation", _("Equations"));
+ addName("external", _("External Material"));
+ addName("math-macro", _("Math Macros"));
+ addName("nomencl", _("Nomenclature Entries"));
+}
+
+
+void TocBackend::addName(string const & type, docstring const & name)
+{
+ if (name.empty())
+ return;
+ // only inserts if the key does not exist
+ outliner_names_.insert({type, name});
+}
+
+
+bool TocBackend::isOther(std::string const & type)
+{
+ return type == "graphics"
+ || type == "note"
+ || type == "branch"
+ || type == "change"
+ || type == "label"
+ || type == "citation"
+ || type == "equation"
+ || type == "footnote"
+ || type == "marginalnote"
+ || type == "nomencl"
+ || type == "listings"
+ || type == "math-macro"
+ || type == "external"
+ || type == "senseless"
+ || type == "index"
+ || type.substr(0,6) == "index:";