ParPosition::ParPosition(ParagraphList::iterator p, ParagraphList const & pl)
: pit(p), plist(&pl)
{
- if (p != pl.end()) {
+ if (p != const_cast<ParagraphList&>(pl).end()) {
it.reset(p->insetlist.begin());
}
}
// Does the current inset contain more "cells" ?
if (p.index) {
++(*p.index);
- ParagraphList * plist = p.it->getInset()->getParagraphs(*p.index);
+ ParagraphList * plist = (*p.it)->inset->getParagraphs(*p.index);
if (plist && !plist->empty()) {
pimpl_->positions.push(ParPosition(plist->begin(), *plist));
return *this;
// Try to find the next inset that contains paragraphs
InsetList::iterator end = p.pit->insetlist.end();
for (; *p.it != end; ++(*p.it)) {
- ParagraphList * plist = p.it->getInset()->getParagraphs(0);
+ ParagraphList * plist = (*p.it)->inset->getParagraphs(0);
if (plist && !plist->empty()) {
p.index.reset(0);
pimpl_->positions.push(ParPosition(plist->begin(), *plist));
}
// Try to go to the next paragarph
- if (next(p.pit) != p.plist->end()
+ if (next(p.pit) != const_cast<ParagraphList*>(p.plist)->end()
|| pimpl_->positions.size() == 1) {
++p.pit;
p.index.reset();
// Does the current inset contain more "cells" ?
if (p.index) {
++(*p.index);
- ParagraphList * plist = p.it->getInset()->getParagraphs(*p.index);
+ ParagraphList * plist = (*p.it)->inset->getParagraphs(*p.index);
if (plist && !plist->empty()) {
pimpl_->positions.push(ParPosition(plist->begin(), *plist));
return *this;
// Try to find the next inset that contains paragraphs
InsetList::iterator end = p.pit->insetlist.end();
for (; *p.it != end; ++(*p.it)) {
- ParagraphList * plist = p.it->getInset()->getParagraphs(0);
+ ParagraphList * plist = (*p.it)->inset->getParagraphs(0);
if (plist && !plist->empty()) {
p.index.reset(0);
pimpl_->positions.push(ParPosition(plist->begin(), *plist));
}
// Try to go to the next paragarph
- if (next(p.pit) != p.plist->end()
+ if (next(p.pit) != const_cast<ParagraphList*>(p.plist)->end()
|| pimpl_->positions.size() == 1) {
++p.pit;
p.index.reset();