]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Use explicit macro to declare that we want to use C++11
[lyx.git] / src / Layout.cpp
index cb1f69bf8d65c616eeb0354b566bde6e7fdcb768..748d867a36a8824cfd5b3a89ab9ffa91e2e592b9 100644 (file)
@@ -564,8 +564,8 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
 
                case LT_REQUIRES: {
                        lex.eatLine();
-                       vector<string> const req = 
-                               getVectorFromString(lex.getString());
+                       vector<string> const req =
+                               getVectorFromString(lex.getString(true));
                        requires_.insert(req.begin(), req.end());
                        break;
                }
@@ -936,6 +936,7 @@ void Layout::readArgument(Lexer & lex)
        // writeArgument() makes use of these default values
        arg.mandatory = false;
        arg.autoinsert = false;
+       arg.insertcotext = false;
        bool error = false;
        bool finished = false;
        arg.font = inherit_font;
@@ -965,6 +966,9 @@ void Layout::readArgument(Lexer & lex)
                } else if (tok == "autoinsert") {
                        lex.next();
                        arg.autoinsert = lex.getBool();
+               } else if (tok == "insertcotext") {
+                       lex.next();
+                       arg.insertcotext = lex.getBool();
                } else if (tok == "leftdelim") {
                        lex.next();
                        arg.ldelim = lex.getDocString();
@@ -1024,6 +1028,8 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg
                os << "\t\tMandatory " << arg.mandatory << '\n';
        if (arg.autoinsert)
                os << "\t\tAutoinsert " << arg.autoinsert << '\n';
+       if (arg.insertcotext)
+               os << "\t\tInsertCotext " << arg.insertcotext << '\n';
        if (!arg.ldelim.empty())
                os << "\t\tLeftDelim \""
                   << to_utf8(subst(arg.ldelim, from_ascii("\n"), from_ascii("<br/>")))