#include "InsetTOC.h"
-#include "buffer.h"
-#include "dispatchresult.h"
-#include "funcrequest.h"
+#include "Buffer.h"
+#include "DispatchResult.h"
+#include "FuncRequest.h"
#include "gettext.h"
-#include "metricsinfo.h"
-#include "outputparams.h"
+#include "MetricsInfo.h"
+#include "OutputParams.h"
#include "TocBackend.h"
#include "support/std_ostream.h"
{}
-std::auto_ptr<InsetBase> InsetTOC::doClone() const
+Inset * InsetTOC::clone() const
{
- return std::auto_ptr<InsetBase>(new InsetTOC(*this));
+ return new InsetTOC(*this);
}
-docstring const InsetTOC::getScreenLabel(Buffer const &) const
+docstring const InsetTOC::getScreenLabel(Buffer const & buf) const
{
if (getCmdName() == "tableofcontents")
- return _("Table of Contents");
- return _("Unknown toc list");
+ return buf.B_("Table of Contents");
+ return _("Unknown TOC type");
}
-InsetBase::Code InsetTOC::lyxCode() const
+Inset::Code InsetTOC::lyxCode() const
{
if (getCmdName() == "tableofcontents")
- return InsetBase::TOC_CODE;
- return InsetBase::NO_CODE;
+ return Inset::TOC_CODE;
+ return Inset::NO_CODE;
}
int InsetTOC::plaintext(Buffer const & buffer, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
os << getScreenLabel(buffer) << "\n\n";
int InsetTOC::docbook(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
if (getCmdName() == "tableofcontents")
os << "<toc></toc>";