- string const cmdname(getCmdName());
- if (cmdname == "tableofcontents")
- return InsetOld::TOC_CODE;
- return InsetOld::NO_CODE;
-}
-
-
-dispatch_result InsetTOC::localDispatch(FuncRequest const & cmd)
-{
- switch (cmd.action) {
- case LFUN_INSET_EDIT:
- InsetCommandMailer("toc", *this).showDialog(cmd.view());
- return DISPATCHED;
- default:
- return InsetCommand::localDispatch(cmd);
- }
+ if (getCmdName() == "tableofcontents")
+ return InsetBase::TOC_CODE;
+ return InsetBase::NO_CODE;