X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayout.cpp;h=bb312877667c50908779db6ebdca0d727aafd446;hb=d1858b89d0828c3fe8f4e898f609aaed93333d33;hp=b7b7d1db8236bab800b734eca351295314b99beb;hpb=fdbe775b9f5468e8f53dc83a66583f412b5970fb;p=lyx.git diff --git a/src/Layout.cpp b/src/Layout.cpp index b7b7d1db82..bb31287766 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -105,6 +105,7 @@ enum LayoutTags { LT_RESETARGS, LT_RIGHTDELIM, LT_FORCELOCAL, + LT_TOGGLE_INDENT, LT_INTITLE // keep this last! }; @@ -148,6 +149,7 @@ Layout::Layout() spellcheck = true; forcelocal = 0; itemcommand_ = "item"; + toggle_indent = ITOGGLE_DOCUMENT_DEFAULT; } @@ -243,6 +245,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass) { "spellcheck", LT_SPELLCHECK }, { "textfont", LT_TEXTFONT }, { "toclevel", LT_TOCLEVEL }, + { "toggleindent", LT_TOGGLE_INDENT }, { "topsep", LT_TOPSEP } }; @@ -383,6 +386,19 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass) lex >> nextnoindent; break; + case LT_TOGGLE_INDENT: { + string tog; + lex >> tog; + tog = support::ascii_lowercase(tog); + if (tog == "always") + toggle_indent = ITOGGLE_ALWAYS; + else if (tog == "never") + toggle_indent = ITOGGLE_NEVER; + else + toggle_indent = ITOGGLE_DOCUMENT_DEFAULT; + break; + } + case LT_COMMANDDEPTH: lex >> commanddepth; break;