]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommandParams.cpp
BUG 3598: display framed and shaded notes in a separate paragraph, require package...
[lyx.git] / src / insets / InsetCommandParams.cpp
index d246d62bcab1f33f185e548da68281b558c6b757..8b6b82741286862e791a1349b9b954717727d598 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "debug.h"
 #include "gettext.h"
-#include "lyxlex.h"
+#include "Lexer.h"
 
 #include "support/ExceptionMessage.h"
 #include "support/lstrings.h"
@@ -68,7 +68,7 @@ InsetCommandParams::findInfo(std::string const & name)
 
        // InsetCitation
        // FIXME: Use is_possible_cite_command() in
-       // src/frontends/controllers/frontend_helpers.cpp, see comment in src/factory.C.
+       // src/frontends/controllers/frontend_helpers.cpp, see comment in src/factory.cpp.
        if (name == "cite" || name == "citet" || name == "citep" || name == "citealt" ||
            name == "citealp" || name == "citeauthor" || name == "citeyear" ||
            name == "citeyearpar" || name == "citet*" || name == "citep*" ||
@@ -113,6 +113,13 @@ InsetCommandParams::findInfo(std::string const & name)
                return &info;
        }
 
+       if (name == "lstinputlisting") {
+               static const char * const paramnames[] = {"filename", "lstparams", ""};
+               static const bool isoptional[] = {false, true};
+               static const CommandInfo info = {2, paramnames, isoptional};
+               return &info;
+       }
+
        // InsetIndex, InsetPrintIndex, InsetLabel
        if (name == "index" || name == "printindex" || name == "label") {
                static const char * const paramnames[] = {"name", ""};
@@ -256,7 +263,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
 }
 
 
-void InsetCommandParams::read(LyXLex & lex)
+void InsetCommandParams::read(Lexer & lex)
 {
        if (lex.isOK()) {
                lex.next();
@@ -310,7 +317,7 @@ void InsetCommandParams::write(ostream & os) const
                if (!params_[i].empty())
                        // FIXME UNICODE
                        os << info_->paramnames[i] << ' '
-                          << LyXLex::quoteString(to_utf8(params_[i]))
+                          << Lexer::quoteString(to_utf8(params_[i]))
                           << '\n';
 }