#include "Buffer.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
-#include "gettext.h"
+#include "support/gettext.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
#include "TocBackend.h"
-#include "support/std_ostream.h"
+#include <ostream>
+using namespace std;
namespace lyx {
-using std::string;
-using std::ostream;
-
InsetTOC::InsetTOC(InsetCommandParams const & p)
: InsetCommand(p, "toc")
{}
+CommandInfo const * InsetTOC::findInfo(string const & /* cmdName */)
+{
+ static const char * const paramnames[] = {"type", ""};
+ static const bool isoptional[] = {false};
+ static const CommandInfo info = {1, paramnames, isoptional};
+ return &info;
+}
+
+
Inset * InsetTOC::clone() const
{
return new InsetTOC(*this);
}
-Inset::Code InsetTOC::lyxCode() const
-{
- if (getCmdName() == "tableofcontents")
- return Inset::TOC_CODE;
- return Inset::NO_CODE;
-}
-
-
int InsetTOC::plaintext(Buffer const & buffer, odocstream & os,
OutputParams const &) const
{