From: Jean-Marc Lasgouttes Date: Mon, 3 Nov 2008 13:47:12 +0000 (+0000) Subject: * insets/InsetText.cpp (addToToc): X-Git-Tag: 1.6.10~2739 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=84395acfb56439ab20e5eec3cd8dd34322f61061;p=features.git * insets/InsetText.cpp (addToToc): * TocBackend.cpp (updateItem): pass option AS_STR_INSETS to asString, so that insets get a chance to be displayed in ToC. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27238 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index 8b2015fd0a..a0105a6124 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -137,7 +137,7 @@ bool TocBackend::updateItem(DocIterator const & dit) *static_cast(inset).paragraphs().begin(); if (!par.labelString().empty()) tocstring = par.labelString() + ' '; - tocstring += inset_par.asString(); + tocstring += inset_par.asString(AS_STR_INSETS); break; } } @@ -145,7 +145,7 @@ bool TocBackend::updateItem(DocIterator const & dit) int const toclevel = par.layout().toclevel; if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel && tocstring.empty()) - tocstring = par.asString(AS_STR_LABEL); + tocstring = par.asString(AS_STR_LABEL | AS_STR_INSETS); const_cast(*toc_item).str_ = tocstring; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 105553e651..79cd4e4101 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -504,7 +504,7 @@ void InsetText::addToToc(DocIterator const & cdit) *static_cast(inset).paragraphs().begin(); if (!par.labelString().empty()) tocstring = par.labelString() + ' '; - tocstring += insetpar.asString(); + tocstring += insetpar.asString(AS_STR_INSETS); break; } default: @@ -517,7 +517,7 @@ void InsetText::addToToc(DocIterator const & cdit) dit.pos() = 0; // insert this into the table of contents if (tocstring.empty()) - tocstring = par.asString(AS_STR_LABEL); + tocstring = par.asString(AS_STR_LABEL | AS_STR_INSETS); toc.push_back(TocItem(dit, toclevel - min_toclevel, tocstring)); }