]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetLayout.cpp
Enhance LyX by fixing bug 5587. We add a new ContentAsLabel tag to
[features.git] / src / insets / InsetLayout.cpp
index f2b701dfb8057f81bb21b03d0242a519b9cc0ec4..0b9963a0ee479ca9cfa26ac18c0f25af682c58ec 100644 (file)
@@ -31,8 +31,8 @@ namespace lyx {
 
 InsetLayout::InsetLayout() :
        name_(from_ascii("undefined")), lyxtype_(STANDARD),
-       labelstring_(from_ascii("UNDEFINED")), decoration_(DEFAULT),
-       latextype_(NOLATEXTYPE), font_(sane_font), 
+       labelstring_(from_ascii("UNDEFINED")), contentaslabel_(false),
+       decoration_(DEFAULT), latextype_(NOLATEXTYPE), font_(sane_font), 
        labelfont_(sane_font), bgcolor_(Color_error), 
        htmlforcecss_ (false), htmlisblock_(true),
        multipar_(true), custompars_(true), forceplain_(false), 
@@ -74,6 +74,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
 {
        enum {
                IL_BGCOLOR,
+               IL_CONTENTASLABEL,
                IL_COPYSTYLE,
                IL_COUNTER,
                IL_CUSTOMPARS,
@@ -110,6 +111,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
 
        LexerKeyword elementTags[] = {
                { "bgcolor", IL_BGCOLOR },
+               { "contentaslabel", IL_CONTENTASLABEL },
                { "copystyle", IL_COPYSTYLE }, 
                { "counter", IL_COUNTER},
                { "custompars", IL_CUSTOMPARS },
@@ -240,6 +242,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                case IL_NEEDPROTECT:
                        lex >> needprotect_;
                        break;
+               case IL_CONTENTASLABEL:
+                       lex >> contentaslabel_;
+                       break;
                case IL_COPYSTYLE: {     // initialize with a known style
                        docstring style;
                        lex >> style;