]> git.lyx.org Git - lyx.git/commitdiff
requires is a keyword in C++2a
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 3 May 2020 06:18:17 +0000 (02:18 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 3 May 2020 06:18:17 +0000 (02:18 -0400)
src/Layout.cpp
src/Layout.h
src/insets/InsetLayout.cpp
src/output_latex.cpp

index 3c1a9bd955515d321e847e1a7c408a50e59de9f8..3ed2ddf6c8d8cc4a0bd354a1c8fb3389ca39e99a 100644 (file)
@@ -1074,7 +1074,7 @@ void Layout::readArgument(Lexer & lex)
                        arg.tooltip = lex.getDocString();
                } else if (tok == "requires") {
                        lex.next();
-                       arg.requires = lex.getString();
+                       arg.required = lex.getString();
                } else if (tok == "decoration") {
                        lex.next();
                        arg.decoration = lex.getString();
@@ -1150,8 +1150,8 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg
                os << "\t\tPresetArg \"" << to_utf8(arg.presetarg) << "\"\n";
        if (!arg.tooltip.empty())
                os << "\t\tToolTip \"" << to_utf8(arg.tooltip) << "\"\n";
-       if (!arg.requires.empty())
-               os << "\t\tRequires \"" << arg.requires << "\"\n";
+       if (!arg.required.empty())
+               os << "\t\tRequires \"" << arg.required << "\"\n";
        if (!arg.decoration.empty())
                os << "\t\tDecoration \"" << arg.decoration << "\"\n";
        if (!arg.newlinecmd.empty())
index c8f7c95ad08ad70dc0d64cc98747b953d4b5e9d3..edb9ba7f18b02d6bc14defb47f7d9f7d0ff3e3a9 100644 (file)
@@ -100,7 +100,7 @@ public:
                docstring defaultarg;
                docstring presetarg;
                docstring tooltip;
-               std::string requires;
+               std::string required;
                std::string decoration;
                FontInfo font;
                FontInfo labelfont;
index dbe290939d94a8d28717eb2a115e46f639adfa04..8df2ca5e8b7805a4473f7baccb283721c4aef345 100644 (file)
@@ -689,7 +689,7 @@ void InsetLayout::readArgument(Lexer & lex)
                        arg.tooltip = lex.getDocString();
                } else if (tok == "requires") {
                        lex.next();
-                       arg.requires = lex.getString();
+                       arg.required = lex.getString();
                } else if (tok == "decoration") {
                        lex.next();
                        arg.decoration = lex.getString();
index 1185e2d6e343149dbb0e7eddbb740958c9bed6ea..72a4577f4bb2477ff2a2e5dc05695b6de65a7022 100644 (file)
@@ -474,8 +474,8 @@ void getArgInsets(otexstream & os, OutputParams const & runparams, Layout::LaTeX
        // other arguments, consider this.
        for (auto const & larg : latexargs) {
                Layout::latexarg const & arg = larg.second;
-               if ((!arg.presetarg.empty() || !arg.defaultarg.empty()) && !arg.requires.empty()) {
-                               vector<string> req = getVectorFromString(arg.requires);
+               if ((!arg.presetarg.empty() || !arg.defaultarg.empty()) && !arg.required.empty()) {
+                               vector<string> req = getVectorFromString(arg.required);
                                required.insert(required.end(), req.begin(), req.end());
                        }
        }
@@ -609,7 +609,7 @@ void addArgInsets(Paragraph const & par, string const & prefix,
                        latexargs.find(arg->name());
                if (lit != latexargs.end()) {
                        Layout::latexarg const & larg = lit->second;
-                       vector<string> req = getVectorFromString(larg.requires);
+                       vector<string> req = getVectorFromString(larg.required);
                        move(req.begin(), req.end(), back_inserter(required));
                }
        }