mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
parlist-22-a.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7055 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4882d49f88
commit
63a7d2f93c
@ -315,17 +315,4 @@ bool ParagraphList::empty() const
|
||||
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
|
||||
|
@ -99,8 +99,6 @@ public:
|
||||
int size() const;
|
||||
///
|
||||
bool empty() const;
|
||||
///
|
||||
iterator find(Paragraph const &);
|
||||
private:
|
||||
///
|
||||
Paragraph * parlist;
|
||||
|
@ -1396,3 +1396,10 @@ bool Paragraph::isFreeSpacing() const
|
||||
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;
|
||||
}
|
||||
|
@ -337,4 +337,6 @@ inline bool isDeletedText(Paragraph const & par, lyx::pos_type pos)
|
||||
return par.lookupChange(pos) == Change::DELETED;
|
||||
}
|
||||
|
||||
bool operator==(Paragraph const & lhs, Paragraph const & rhs);
|
||||
|
||||
#endif // PARAGRAPH_H
|
||||
|
@ -147,7 +147,9 @@ int LyXText::workWidth() const
|
||||
|
||||
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);
|
||||
|
@ -1197,7 +1197,7 @@ void LyXText::setCounter(Buffer const * buf, ParagraphList::iterator pit)
|
||||
isOK = true;
|
||||
break;
|
||||
} else {
|
||||
tmppit = ownerParagraphs().find(*in->parOwner());
|
||||
tmppit = std::find(ownerParagraphs().begin(), ownerParagraphs().end(), *in->parOwner());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user