]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetLabel.cpp
index 3122e9594771e11c6eb33348ffbaaa41b80e1c0a..b0cf6dfcf55e00d05c2c85f55666c8d897b606f5 100644 (file)
@@ -22,6 +22,8 @@
 #include "support/lstrings.h"
 #include "support/lyxalgo.h"
 
+using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 
@@ -31,13 +33,22 @@ InsetLabel::InsetLabel(InsetCommandParams const & p)
 {}
 
 
+CommandInfo const * InsetLabel::findInfo(string const & /* cmdName */)
+{
+       static const char * const paramnames[] = {"name", ""};
+       static const bool isoptional[] = {false};
+       static const CommandInfo info = {1, paramnames, isoptional};
+       return &info;
+}
+
+
 Inset * InsetLabel::clone() const
 {
        return new InsetLabel(params());
 }
 
 
-void InsetLabel::getLabelList(Buffer const &, std::vector<docstring> & list) const
+void InsetLabel::getLabelList(Buffer const &, vector<docstring> & list) const
 {
        list.push_back(getParam("name"));
 }
@@ -78,7 +89,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
 int InsetLabel::latex(Buffer const &, odocstream & os,
                      OutputParams const &) const
 {
-       os << support::escape(getCommand());
+       os << escape(getCommand());
        return 0;
 }