void TocBackend::updateItem(ParConstIterator const & par_it)
{
BufferParams const & bufparams = buffer_->params();
- const int min_toclevel = bufparams.getLyXTextClass().min_toclevel();
+ const int min_toclevel = bufparams.getTextClass().min_toclevel();
TocIterator toc_item = item("tableofcontents", par_it);
InsetList::const_iterator it = toc_item->par_it_->insetlist.begin();
InsetList::const_iterator end = toc_item->par_it_->insetlist.end();
for (; it != end; ++it) {
- InsetBase & inset = *it->inset;
- if (inset.lyxCode() == InsetBase::OPTARG_CODE) {
+ Inset & inset = *it->inset;
+ if (inset.lyxCode() == Inset::OPTARG_CODE) {
if (!tocstring.empty())
break;
Paragraph const & par =
}
int const toclevel = toc_item->par_it_->layout()->toclevel;
- if (toclevel != LyXLayout::NOT_IN_TOC
+ if (toclevel != Layout::NOT_IN_TOC
&& toclevel >= min_toclevel
&& toclevel <= bufparams.tocdepth
&& tocstring.empty())
tocs_.clear();
BufferParams const & bufparams = buffer_->params();
- const int min_toclevel = bufparams.getLyXTextClass().min_toclevel();
+ const int min_toclevel = bufparams.getTextClass().min_toclevel();
Toc & toc = tocs_["tableofcontents"];
ParConstIterator pit = buffer_->par_iterator_begin();
InsetList::const_iterator it = pit->insetlist.begin();
InsetList::const_iterator end = pit->insetlist.end();
for (; it != end; ++it) {
- InsetBase & inset = *it->inset;
+ Inset & inset = *it->inset;
inset.addToToc(tocs_, *buffer_);
switch (inset.lyxCode()) {
- case InsetBase::OPTARG_CODE: {
+ case Inset::OPTARG_CODE: {
if (!tocstring.empty())
break;
Paragraph const & par =
/// now the toc entry for the paragraph
int const toclevel = pit->layout()->toclevel;
- if (toclevel != LyXLayout::NOT_IN_TOC
+ if (toclevel != Layout::NOT_IN_TOC
&& toclevel >= min_toclevel
&& toclevel <= bufparams.tocdepth) {
// insert this into the table of contents