]> git.lyx.org Git - lyx.git/blobdiff - src/toc.C
GTK graphics dialog: Default to scaling 100% when no scaling or size is given
[lyx.git] / src / toc.C
index 55616f21388988eb9ce97d0910930b5e2d48b525..d90cab6e37812c83ce88fc07193b6ce72ecda316 100644 (file)
--- a/src/toc.C
+++ b/src/toc.C
@@ -15,6 +15,7 @@
 
 #include "buffer.h"
 #include "bufferparams.h"
+#include "FloatList.h"
 #include "funcrequest.h"
 #include "LyXAction.h"
 #include "paragraph.h"
@@ -65,6 +66,17 @@ string const getType(string const & cmdName)
 }
 
 
+string const getGuiName(string const & type, Buffer const & buffer)
+{
+       FloatList const & floats =
+               buffer.params().getLyXTextClass().floats();
+       if (floats.typeExist(type))
+               return floats.getType(type).name();
+       else
+               return type;
+}
+
+
 TocList const getTocList(Buffer const & buf)
 {
        TocList toclist;
@@ -110,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())