From 68fe13dfa1ed24891d930b0d9b8b79e217c7f1e4 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 6 Jan 2011 01:12:38 +0000 Subject: [PATCH] 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 --- src/Paragraph.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 7928917ba6..67965ef4c5 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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; -- 2.39.2