#include "insettoc.h"
+#include "buffer.h"
#include "dispatchresult.h"
#include "funcrequest.h"
#include "gettext.h"
#include "metricsinfo.h"
-#include "toc.h"
+#include "TocBackend.h"
#include "support/std_ostream.h"
-using lyx::docstring;
-using lyx::odocstream;
+
+namespace lyx {
using std::string;
using std::ostream;
-
InsetTOC::InsetTOC(InsetCommandParams const & p)
: InsetCommand(p, "toc")
{}
{
os << getScreenLabel(buffer) << "\n\n";
- lyx::toc::asciiTocList(lyx::toc::getType(getCmdName()), buffer, os);
+ buffer.tocBackend().asciiTocList(getCmdName(), os);
os << "\n";
return 0;
}
-int InsetTOC::docbook(Buffer const &, ostream & os,
+int InsetTOC::docbook(Buffer const &, odocstream & os,
OutputParams const &) const
{
if (getCmdName() == "tableofcontents")
os << "<toc></toc>";
return 0;
}
+
+
+} // namespace lyx