]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Amend 6c3447c8: FindAdv: sometimes a space is added on some math symbols
[lyx.git] / src / Layout.cpp
index 8e54891fb9b64d834d327d4fd92403a32b97b21f..e531fab362f193e31bcf2a638be34f2c0600f7ab 100644 (file)
 #include <config.h>
 
 #include "Layout.h"
-#include "Lexer.h"
 #include "output_xhtml.h"
 #include "TextClass.h"
 
 #include "support/debug.h"
 #include "support/docstream.h"
 #include "support/lassert.h"
+#include "support/Lexer.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
@@ -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;