]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettoc.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insettoc.C
index ae53a76ee9cea0c303ff4164c029cbe686399a3c..876c9b0e75a41397c942c1c95fb4fdd5358ca041 100644 (file)
@@ -28,11 +28,6 @@ InsetTOC::InsetTOC(InsetCommandParams const & p)
 {}
 
 
-// InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
-//     : InsetCommand(p, same_id)
-// {}
-
-
 InsetTOC::~InsetTOC()
 {
        InsetCommandMailer mailer("toc", *this);
@@ -50,12 +45,12 @@ string const InsetTOC::getScreenLabel(Buffer const *) const
 }
 
 
-Inset::Code InsetTOC::lyxCode() const
+InsetOld::Code InsetTOC::lyxCode() const
 {
        string const cmdname(getCmdName());
        if (cmdname == "tableofcontents")
-               return Inset::TOC_CODE;
-       return Inset::NO_CODE;
+               return InsetOld::TOC_CODE;
+       return InsetOld::NO_CODE;
 }
 
 
@@ -66,7 +61,7 @@ dispatch_result InsetTOC::localDispatch(FuncRequest const & cmd)
                InsetCommandMailer("toc", *this).showDialog(cmd.view());
                return DISPATCHED;
        default:
-               return UNDISPATCHED;
+               return InsetCommand::localDispatch(cmd);
        }
 }
 
@@ -75,7 +70,7 @@ int InsetTOC::ascii(Buffer const * buffer, ostream & os, int) const
 {
        os << getScreenLabel(buffer) << "\n\n";
 
-       toc::asciiTocList(toc::getType(getCmdName()), buffer, os);
+       lyx::toc::asciiTocList(lyx::toc::getType(getCmdName()), buffer, os);
 
        os << "\n";
        return 0;