]> git.lyx.org Git - features.git/commitdiff
fix TOC when no section headings are defined in the layout
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 25 Oct 2005 13:43:50 +0000 (13:43 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 25 Oct 2005 13:43:50 +0000 (13:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10575 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/toc.C

index 872cf0db6f2459c2f7f485fb203ac2220b83dc2e..48abca0b572a52ea2e2a7783bf60ece75faaaf3c 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-25  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * toc.C (getTocList): skip paragraphs which toclevel is NOT_IN_TOC.
+
 2005-10-25  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * text.C (insertChar): do not reset boundary (bug 2061)
index 0a17d5a2c175585dc6818505331066651e1812bb..d90cab6e37812c83ce88fc07193b6ce72ecda316 100644 (file)
--- a/src/toc.C
+++ b/src/toc.C
@@ -122,7 +122,8 @@ TocList const getTocList(Buffer const & buf)
 
                /// now the toc entry for the paragraph
                int const toclevel = pit->layout()->toclevel;
-               if (toclevel >= min_toclevel
+               if (toclevel != LyXLayout::NOT_IN_TOC
+                   && toclevel >= min_toclevel
                    && toclevel <= bufparams.tocdepth) {
                        // insert this into the table of contents
                        if (tocstring.empty())