Fix bug #7212: Paragraph::forToc has to include the labelString.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37123 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2011-01-06 01:12:38 +00:00
parent 7c2d216836
commit 68fe13dfa1

View File

@ -2961,6 +2961,8 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options) const
void Paragraph::forToc(docstring & os, size_t maxlen) const
{
if (!d->params_.labelString().empty())
os += d->params_.labelString() + ' ';
for (pos_type i = 0; i < size() && os.length() < maxlen; ++i) {
if (isDeleted(i))
continue;