-TocItem::TocItem(ParConstIterator const & par_it, int d,
- docstring const & s)
- : par_it_(par_it), depth_(d), str_(s)
+TocItem::TocItem(ParConstIterator const & par_it, int d, docstring const & s)
+ : par_it_(par_it), depth_(d), str_(s)
void TocBackend::updateItem(ParConstIterator const & par_it)
{
if (toc("tableofcontents").empty()) {
// FIXME: should not happen,
// a call to TocBackend::update() is missing somewhere
void TocBackend::updateItem(ParConstIterator const & par_it)
{
if (toc("tableofcontents").empty()) {
// FIXME: should not happen,
// a call to TocBackend::update() is missing somewhere
- if (!toc_item->par_it_->getLabelstring().empty())
- tocstring = toc_item->par_it_->getLabelstring() + ' ';
- tocstring += par.asString(*buffer_, false);
+ if (!toc_item->par_it_->labelString().empty())
+ tocstring = toc_item->par_it_->labelString() + ' ';
+ tocstring += par.asString(false);
- int const toclevel = toc_item->par_it_->layout()->toclevel;
- if (toclevel != Layout::NOT_IN_TOC
- && toclevel >= min_toclevel
+ int const toclevel = toc_item->par_it_->layout().toclevel;
+ if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel
InsetList::const_iterator end = pit->insetList().end();
for (; it != end; ++it) {
Inset & inset = *it->inset;
InsetList::const_iterator end = pit->insetList().end();
for (; it != end; ++it) {
Inset & inset = *it->inset;
- if (!pit->getLabelstring().empty())
- tocstring = pit->getLabelstring() + ' ';
- tocstring += par.asString(*buffer_, false);
+ if (!pit->labelString().empty())
+ tocstring = pit->labelString() + ' ';
+ tocstring += par.asString(false);
if (toclevel != Layout::NOT_IN_TOC
&& toclevel >= min_toclevel) {
// insert this into the table of contents
if (tocstring.empty())
if (toclevel != Layout::NOT_IN_TOC
&& toclevel >= min_toclevel) {
// insert this into the table of contents
if (tocstring.empty())
- if (par_it_text.inMathed())
- // It would be better to do
- // par_it_text.backwardInset();
- // but this method does not exist.
+ if (par_it_text.inMathed()) {
+ // We are only interested in text so remove the math CursorSlice.
TocIterator ccit = cit->second.begin();
TocIterator end = cit->second.end();
for (; ccit != end; ++ccit)
TocIterator ccit = cit->second.begin();
TocIterator end = cit->second.end();
for (; ccit != end; ++ccit)