mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
more ParagraphList::iterator usage
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6340 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3910647ab4
commit
70687ca7fc
@ -1,3 +1,12 @@
|
||||
2003-03-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* paragraph_funcs.C (mergeParagraph): make it take a
|
||||
ParagraphList::iterator instead of a Paragraph *, adjust
|
||||
accordingly.
|
||||
|
||||
* paragraph.h: move an #endif so that the change tracking stuff
|
||||
also works in the NO_NEXT case.
|
||||
|
||||
2003-03-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* commandtags.h:
|
||||
|
@ -154,6 +154,14 @@ public:
|
||||
///
|
||||
Paragraph const * next() const;
|
||||
|
||||
///
|
||||
void previous(Paragraph *);
|
||||
///
|
||||
Paragraph * previous();
|
||||
///
|
||||
Paragraph const * previous() const;
|
||||
#endif
|
||||
|
||||
/// initialise tracking for this par
|
||||
void trackChanges(Change::Type = Change::UNCHANGED);
|
||||
|
||||
@ -184,13 +192,6 @@ public:
|
||||
/// mark whole par as erased
|
||||
void markErased();
|
||||
|
||||
///
|
||||
void previous(Paragraph *);
|
||||
///
|
||||
Paragraph * previous();
|
||||
///
|
||||
Paragraph const * previous() const;
|
||||
#endif
|
||||
/// for the environments
|
||||
Paragraph * depthHook(depth_type depth);
|
||||
/// for the environments
|
||||
|
@ -154,9 +154,9 @@ void breakParagraphConservative(BufferParams const & bparams,
|
||||
}
|
||||
|
||||
|
||||
void mergeParagraph(BufferParams const & bparams, Paragraph * par)
|
||||
void mergeParagraph(BufferParams const & bparams, ParagraphList::iterator par)
|
||||
{
|
||||
Paragraph * the_next = par->next();
|
||||
ParagraphList::iterator the_next = boost::next(par);
|
||||
|
||||
// first the DTP-stuff
|
||||
par->params().lineBottom(the_next->params().lineBottom());
|
||||
@ -174,10 +174,12 @@ void mergeParagraph(BufferParams const & bparams, Paragraph * par)
|
||||
}
|
||||
|
||||
// delete the next paragraph
|
||||
Paragraph * ppar = the_next->previous();
|
||||
Paragraph * npar = the_next->next();
|
||||
delete the_next;
|
||||
ppar->next(npar);
|
||||
#warning a ParagraphList::erase is needed. (Lgb)
|
||||
// Isn't this really just par?
|
||||
ParagraphList::iterator ppar = boost::prior(the_next);
|
||||
ParagraphList::iterator npar = boost::next(the_next);
|
||||
delete &*the_next;
|
||||
ppar->next(&*npar);
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ void breakParagraphConservative(BufferParams const & bparams,
|
||||
* Append the next paragraph onto the tail of this one.
|
||||
* Be careful, this doesent make any check at all.
|
||||
*/
|
||||
void mergeParagraph(BufferParams const & bparams, Paragraph *);
|
||||
void mergeParagraph(BufferParams const & bparams, ParagraphList::iterator);
|
||||
|
||||
|
||||
#if 0
|
||||
|
Loading…
Reference in New Issue
Block a user