]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Amend 207eaeee9071cb
[lyx.git] / src / Layout.cpp
index 50a4d05ac6b72b259071f82edc6c99f5edcd032a..e531fab362f193e31bcf2a638be34f2c0600f7ab 100644 (file)
@@ -52,6 +52,7 @@ enum LayoutTags {
        LT_FREE_SPACING,
        LT_PASS_THRU,
        LT_PASS_THRU_CHARS,
+       LT_NO_PASS_THRU_CHARS,
        LT_PARBREAK_IS_NEWLINE,
        LT_ITEMCOMMAND,
        LT_ITEMSEP,
@@ -162,6 +163,7 @@ Layout::Layout()
        inpreamble = false;
        needprotect = false;
        needcprotect = false;
+       nocprotect = false;
        needmboxprotect = false;
        keepempty = false;
        font = inherit_font;
@@ -316,6 +318,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                { "needprotect",    LT_NEED_PROTECT },
                { "newline",        LT_NEWLINE },
                { "nextnoindent",   LT_NEXTNOINDENT },
+               { "nopassthruchars", LT_NO_PASS_THRU_CHARS },
                { "obsoletedby",    LT_OBSOLETEDBY },
                { "paragraphgroup", LT_PAR_GROUP },
                { "parbreakisnewline", LT_PARBREAK_IS_NEWLINE },
@@ -465,9 +468,17 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                        lex >> needprotect;
                        break;
 
-               case LT_NEED_CPROTECT:
-                       lex >> needcprotect;
+               case LT_NEED_CPROTECT: {
+                       int i;
+                       lex >> i;
+                       nocprotect = false;
+                       needcprotect = false;
+                       if (i == -1)
+                               nocprotect = true;
+                       else if (i == 1)
+                               needcprotect = true;
                        break;
+               }
 
                case LT_NEED_MBOXPROTECT:
                        lex >> needmboxprotect;
@@ -660,6 +671,10 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                        lex >> pass_thru_chars;
                        break;
 
+               case LT_NO_PASS_THRU_CHARS:
+                       lex >> no_pass_thru_chars;
+                       break;
+
                case LT_PARBREAK_IS_NEWLINE:
                        lex >> parbreak_is_newline;
                        break;
@@ -870,13 +885,13 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                        lex >> docbookiteminnertagtype_;
                        break;
 
-        case LT_DOCBOOKNOFONTINSIDE:
-            lex >> docbooknofontinside_;
-            break;
+               case LT_DOCBOOKNOFONTINSIDE:
+                       lex >> docbooknofontinside_;
+                       break;
 
-        case LT_DOCBOOKGENERATETITLE:
-            lex >> docbookgeneratetitle_;
-            break;
+               case LT_DOCBOOKGENERATETITLE:
+                       lex >> docbookgeneratetitle_;
+                       break;
 
                case LT_SPELLCHECK:
                        lex >> spellcheck;