]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.cpp
Extend the notermination flag to math as well.
[lyx.git] / src / insets / InsetIndex.cpp
index bec5a90e097d7ac298753d86afa0e13728f943f4..02a370696174c5805793f45b27a7f9241d96440a 100644 (file)
@@ -137,7 +137,7 @@ void InsetIndex::latex(otexstream & os, OutputParams const & runparams_in) const
                        docstring spart2;
                        for (size_t n = 0; n < spart.size(); ++n) {
                                try {
-                                       spart2 += runparams.encoding->latexChar(spart[n]);
+                                       spart2 += runparams.encoding->latexChar(spart[n]).first;
                                } catch (EncodingException & /* e */) {
                                        LYXERR0("Uncodable character in index entry. Sorting might be wrong!");
                                }
@@ -356,7 +356,7 @@ void InsetIndex::addToToc(DocIterator const & cpit) const
        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);
@@ -373,9 +373,9 @@ void InsetIndex::validate(LaTeXFeatures & features) const
 }
 
 
-docstring InsetIndex::contextMenuName() const
+string InsetIndex::contextMenuName() const
 {
-       return from_ascii("context-index");
+       return "context-index";
 }
 
 
@@ -572,10 +572,10 @@ void InsetPrintIndex::validate(LaTeXFeatures & features) const
 }
 
 
-docstring InsetPrintIndex::contextMenuName() const
+string InsetPrintIndex::contextMenuName() const
 {
        return buffer().masterBuffer()->params().use_indices ?
-               from_ascii("context-indexprint") : docstring();
+               "context-indexprint" : string();
 }