]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetLayout.cpp
Add NewlineCmd InsetLayout and Argument option
[features.git] / src / insets / InsetLayout.cpp
index 6094135024ca011cd46045c0b1e168bad810482e..4d6a5edfbd984362c2b75fe83d2efa370266039c 100644 (file)
@@ -125,6 +125,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                IL_NEEDCPROTECT,
                IL_NEEDMBOXPROTECT,
                IL_NEEDPROTECT,
+               IL_NEWLINE_CMD,
                IL_PASSTHRU,
                IL_PASSTHRU_CHARS,
                IL_PARBREAKISNEWLINE,
@@ -184,6 +185,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                { "needcprotect", IL_NEEDCPROTECT },
                { "needmboxprotect", IL_NEEDMBOXPROTECT },
                { "needprotect", IL_NEEDPROTECT },
+               { "newlinecmd", IL_NEWLINE_CMD },
                { "obsoletedby", IL_OBSOLETEDBY },
                { "parbreakisnewline", IL_PARBREAKISNEWLINE },
                { "passthru", IL_PASSTHRU },
@@ -322,6 +324,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                case IL_PASSTHRU_CHARS:
                        lex >> passthru_chars_;
                        break;
+               case IL_NEWLINE_CMD:
+                       lex >> newline_cmd_;
+                       break;
                case IL_PARBREAKISNEWLINE:
                        lex >> parbreakisnewline_;
                        break;
@@ -658,6 +663,9 @@ void InsetLayout::readArgument(Lexer & lex)
                } else if (tok == "decoration") {
                        lex.next();
                        arg.decoration = lex.getString();
+               } else if (tok == "newlinecmd") {
+                       lex.next();
+                       arg.newlinecmd = lex.getString();
                } else if (tok == "font") {
                        arg.font = lyxRead(lex, arg.font);
                } else if (tok == "labelfont") {