#include "buffer.h"
#include "bufferparams.h"
+#include "FloatList.h"
#include "funcrequest.h"
+#include "gettext.h"
#include "LyXAction.h"
#include "paragraph.h"
#include "pariterator.h"
{
// special case
if (cmdName == "tableofcontents")
- return "TOC";
+ return _("TOC");
else
return cmdName;
}
+string const getGuiName(string const & cmdName, Buffer const & buffer)
+{
+ FloatList const & floats =
+ buffer.params().getLyXTextClass().floats();
+ if (floats.typeExist(cmdName))
+ return _(floats.getType(cmdName).name());
+ else
+ return getType(cmdName);
+}
+
+
TocList const getTocList(Buffer const & buf)
{
TocList toclist;
break;
Paragraph const & par = *static_cast<InsetOptArg*>(it->inset)->paragraphs().begin();
if (!pit->getLabelstring().empty())
- tocstring = pit->getLabelstring()
+ tocstring = pit->getLabelstring()
+ ' ';
tocstring += par.asString(buf, false);
break;
/// now the toc entry for the paragraph
int const toclevel = pit->layout()->toclevel;
- if (toclevel >= min_toclevel
+ if (toclevel >= min_toclevel
&& toclevel <= bufparams.tocdepth) {
// insert this into the table of contents
if (tocstring.empty())
tocstring = pit->asString(buf, true);
- TocItem const item(pit->id(), toclevel - min_toclevel,
+ TocItem const item(pit->id(), toclevel - min_toclevel,
tocstring);
- toclist["TOC"].push_back(item);
+ toclist[_("TOC")].push_back(item);
}
}
return toclist;