]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlayout.C
Remove the inset and view member functions from PreviewedInset.
[lyx.git] / src / lyxlayout.C
index bb43bd72f17fcf46b1be286148444277a4828f6a..168997c78d8f879534e8d0a7315527e184f466e8 100644 (file)
@@ -23,6 +23,7 @@ using lyx::support::subst;
 using lyx::support::trim;
 
 using std::endl;
+using std::string;
 
 
 //  The order of the LayoutTags enum is no more important. [asierra300396]
@@ -78,6 +79,7 @@ enum LayoutTags {
        LT_RIGHTMARGIN,
        LT_SPACING,
        LT_TOPSEP,
+       LT_TOCLEVEL,
        LT_INTITLE
 };
 
@@ -115,6 +117,7 @@ LyXLayout::LyXLayout ()
        free_spacing = false;
        pass_thru = false;
        is_environment = false;
+       toclevel = 0;
 }
 
 
@@ -167,6 +170,7 @@ bool LyXLayout::Read(LyXLex & lexrc, LyXTextClass const & tclass)
                { "rightmargin",        LT_RIGHTMARGIN },
                { "spacing",            LT_SPACING },
                { "textfont",           LT_TEXTFONT },
+               { "toclevel",            LT_TOCLEVEL },
                { "topsep",             LT_TOPSEP }
        };
 
@@ -241,9 +245,8 @@ bool LyXLayout::Read(LyXLex & lexrc, LyXTextClass const & tclass)
                        break;
 
                case LT_DEPENDSON:
-                       if (lexrc.next()) {
+                       if (lexrc.next())
                                depends_on_ = lexrc.getString();
-                       }
                        break;
 
                case LT_MARGIN:         // margin style definition.
@@ -273,10 +276,14 @@ bool LyXLayout::Read(LyXLex & lexrc, LyXTextClass const & tclass)
                        intitle = lexrc.next() && lexrc.getInteger();
                        break;
 
+               case LT_TOCLEVEL:
+                       lexrc.next();
+                       toclevel = lexrc.getInteger();
+                       break;
+
                case LT_OPTARGS:
-                       if (lexrc.next()) {
+                       if (lexrc.next())
                                optionalargs = lexrc.getInteger();
-                       }
                        break;
 
                case LT_NEED_PROTECT:
@@ -444,7 +451,7 @@ bool LyXLayout::Read(LyXLex & lexrc, LyXTextClass const & tclass)
        }
        lexrc.popTable();
 
-       if (labelstring_appendix_.empty())      
+       if (labelstring_appendix_.empty())
                labelstring_appendix_ = labelstring_;
        return error;
 }