]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetText.cpp
Add Nomenclature to the TOC.
[lyx.git] / src / insets / InsetText.cpp
index df957660f2c611c3d02d2b57f7862bb9df9e03db..8c9d3df314c60aef7c046b0ced9fff0ec17bb4ac 100644 (file)
@@ -847,16 +847,17 @@ void InsetText::addToToc(DocIterator const & cdit, bool output_active) const
                if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel) {
                        // insert this into the table of contents
                        docstring tocstring;
+                       int const length = doing_output ? INT_MAX : TOC_ENTRY_LENGTH;
                        if (arginset) {
                                tocstring = par.labelString();
                                if (!tocstring.empty())
                                        tocstring += ' ';
-                               arginset->text().forToc(tocstring, TOC_ENTRY_LENGTH);
+                               arginset->text().forToc(tocstring, length);
                        } else
-                               par.forToc(tocstring, TOC_ENTRY_LENGTH);
+                               par.forToc(tocstring, length);
                        dit.pos() = 0;
                        toc.push_back(TocItem(dit, toclevel - min_toclevel,
-                               tocstring, output_active, tocstring));
+                               tocstring, doing_output, tocstring));
                }
                
                // And now the list of changes.