]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Introduce NeedCProtect -1 layout option
[lyx.git] / src / Layout.cpp
index 50a4d05ac6b72b259071f82edc6c99f5edcd032a..16d530361d046efd7b2230a6ccfd2d0940f69e3b 100644 (file)
@@ -162,6 +162,7 @@ Layout::Layout()
        inpreamble = false;
        needprotect = false;
        needcprotect = false;
+       nocprotect = false;
        needmboxprotect = false;
        keepempty = false;
        font = inherit_font;
@@ -465,9 +466,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;