return parlist == 0;
}
-
-ParagraphList::iterator ParagraphList::find(Paragraph const & p)
-{
- iterator it = begin();
- iterator last = end();
- for (;it != last; ++it) {
- if (&*it == &p)
- break;
- }
- return it;
-}
-
-
#endif
int size() const;
///
bool empty() const;
- ///
- iterator find(Paragraph const &);
private:
///
Paragraph * parlist;
return (pimpl_->inset_owner->owner()->lyxCode() == Inset::ERT_CODE);
return false;
}
+
+
+bool operator==(Paragraph const & lhs, Paragraph const & rhs)
+{
+#warning FIXME this implementatoin must be completely wrong...
+ return &lhs == &rhs;
+}
return par.lookupChange(pos) == Change::DELETED;
}
+bool operator==(Paragraph const & lhs, Paragraph const & rhs);
+
#endif // PARAGRAPH_H
int LyXText::workWidth(Inset const * inset) const
{
- ParagraphList::iterator par = ownerParagraphs().find(*inset->parOwner());
+ ParagraphList::iterator par = std::find(ownerParagraphs().begin(),
+ ownerParagraphs().end(),
+ *inset->parOwner());
//lyx::Assert(par);
pos_type pos = par->getPositionOfInset(inset);
isOK = true;
break;
} else {
- tmppit = ownerParagraphs().find(*in->parOwner());
+ tmppit = std::find(ownerParagraphs().begin(), ownerParagraphs().end(), *in->parOwner());
}
}