#include "lyxfunc.h"
#include "support/lstrings.h" // tostr
#include "gettext.h"
+#include "BufferView.h"
using std::vector;
using SigC::slot;
void ControlToc::Goto(int const & id) const
{
string const tmp = tostr(id);
- lv_.getLyXFunc()->Dispatch(LFUN_GOTO_PARAGRAPH, tmp);
+ lv_.getLyXFunc()->dispatch(LFUN_GOTO_PARAGRAPH, tmp);
}
Buffer::SingleList const ControlToc::getContents(string const & type) const
{
- Buffer::SingleList contents;
-
- Buffer::TocItem noContent(0, 0, string());
+ Buffer::SingleList empty_list;
// This shouldn't be possible...
if (!lv_.view()->available()) {
- noContent.str = _("*** No Document ***");
- contents.push_back(noContent);
- return contents;
+ return empty_list;
}
Buffer::Lists tmp = lv_.view()->buffer()->getLists();
Buffer::Lists::iterator it = tmp.find(type);
if (it == tmp.end()) {
- noContent.str = _("*** No Lists ***");
- contents.push_back(noContent);
- return contents;
+ return empty_list;
}
return it->second;