On 24/09/2008 05:43, Jack M. Lyon wrote:
It would also be nice to display each index entry in its entirety rather than just a snippet . . .
This is implemented in the attached patch. I think this is safe for rc3 Jose but this is your call.
Abdel.
Index: insets/InsetIndex.cpp =================================================================== --- insets/InsetIndex.cpp (revision 26565) +++ insets/InsetIndex.cpp (working copy) @@ -175,11 +175,7 @@ { DocIterator pit = cpit; pit.push_back(CursorSlice(*this)); - - Toc & toc = buffer().tocBackend().toc("index"); - docstring str; - str = getNewLabel(str); - toc.push_back(TocItem(pit, 0, str)); + buffer().tocBackend().toc("index").push_back(TocItem(pit, 0, plaintext())); // Proceed with the rest of the inset. InsetCollapsable::addToToc(cpit); } Index: insets/InsetText.cpp =================================================================== --- insets/InsetText.cpp (revision 26565) +++ insets/InsetText.cpp (working copy) @@ -284,6 +284,15 @@ } +docstring InsetText::plaintext() const +{ + OutputParams rp(&buffer().params().encoding()); + odocstringstream ods; + plaintext(ods, rp); + return ods.str(); +} + + int InsetText::plaintext(odocstream & os, OutputParams const & runparams) const { ParagraphList::const_iterator beg = paragraphs().begin(); Index: insets/InsetText.h =================================================================== --- insets/InsetText.h (revision 26565) +++ insets/InsetText.h (working copy) @@ -70,6 +70,8 @@ /// int latex(odocstream &, OutputParams const &) const; /// + docstring plaintext() const; + /// int plaintext(odocstream &, OutputParams const &) const; /// int docbook(odocstream &, OutputParams const &) const;