mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-19 22:40:26 +00:00
* 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
This commit is contained in:
parent
043c362dab
commit
84395acfb5
@ -137,7 +137,7 @@ bool TocBackend::updateItem(DocIterator const & dit)
|
||||
*static_cast<InsetOptArg&>(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<TocItem &>(*toc_item).str_ = tocstring;
|
||||
|
||||
|
@ -504,7 +504,7 @@ void InsetText::addToToc(DocIterator const & cdit)
|
||||
*static_cast<InsetOptArg&>(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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user