fix bug 1149

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7082 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-06-02 14:02:58 +00:00
parent 75b82dd0d4
commit 6e88335ebd
3 changed files with 40 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2003-06-02 John Levon <levon@movementarian.org>
* buffer.h:
* buffer.C: fix inset_iterator.end(), move out of line
(bug 1149)
2003-06-01 John Levon <levon@movementarian.org> 2003-06-01 John Levon <levon@movementarian.org>
* text3.C: use a proper cut/paste when doing inset * text3.C: use a proper cut/paste when doing inset

View File

@ -2394,6 +2394,32 @@ Buffer::inset_iterator::inset_iterator(base_type p, base_type e)
} }
Buffer::inset_iterator Buffer::inset_iterator_begin()
{
return inset_iterator(paragraphs.begin(), paragraphs.end());
}
Buffer::inset_iterator Buffer::inset_iterator_end()
{
return inset_iterator(paragraphs.end(), paragraphs.end());
}
Buffer::inset_iterator Buffer::inset_const_iterator_begin() const
{
return inset_iterator(const_cast<ParagraphList&>(paragraphs).begin(),
const_cast<ParagraphList&>(paragraphs).end());
}
Buffer::inset_iterator Buffer::inset_const_iterator_end() const
{
return inset_iterator(const_cast<ParagraphList&>(paragraphs).end(),
const_cast<ParagraphList&>(paragraphs).end());
}
Buffer::inset_iterator & Buffer::inset_iterator::operator++() Buffer::inset_iterator & Buffer::inset_iterator::operator++()
{ {
if (pit != pend) { if (pit != pend) {

View File

@ -386,25 +386,17 @@ public:
InsetList::iterator it; InsetList::iterator it;
}; };
/// /// return an iterator to all *top-level* insets in the buffer
inset_iterator inset_iterator_begin() { inset_iterator inset_iterator_begin();
return inset_iterator(paragraphs.begin(), paragraphs.end());
}
/// /// return the end of all *top-level* insets in the buffer
inset_iterator inset_iterator_end() { inset_iterator inset_iterator_end();
return inset_iterator();
}
/// /// return a const iterator to all *top-level* insets in the buffer
inset_iterator inset_const_iterator_begin() const { inset_iterator inset_const_iterator_begin() const;
return inset_iterator(const_cast<ParagraphList&>(paragraphs).begin(), const_cast<ParagraphList&>(paragraphs).end());
}
/// /// return the const end of all *top-level* insets in the buffer
inset_iterator inset_const_iterator_end() const { inset_iterator inset_const_iterator_end() const;
return inset_iterator();
}
/// ///
ParIterator par_iterator_begin(); ParIterator par_iterator_begin();