+bool TextClass::readOutlinerName(Lexer & lexrc)
+{
+ std::string type;
+ docstring name;
+ if (lexrc.next())
+ type = lexrc.getString();
+ else {
+ lexrc.printError("No type given for OutlinerName: `$$Token'.");
+ return false;
+ }
+ if (lexrc.next())
+ name = lexrc.getDocString();
+ else {
+ lexrc.printError("No name given for OutlinerName: `$$Token'.");
+ return false;
+ }
+ outliner_names_[type] = name;
+ return true;
+}
+
+
+docstring TextClass::outlinerName(std::string const & type) const
+{
+ std::map<std::string,docstring>::const_iterator const it
+ = outliner_names_.find(type);
+ if (it == outliner_names_.end()) {
+ LYXERR0("Missing OutlinerName for " << type << "!");
+ return from_utf8(type);
+ } else
+ return it->second;
+}
+
+