add some NO_NEXT ifdefs

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4985 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-08-15 07:53:46 +00:00
parent 1181da4a5d
commit fb68029010
3 changed files with 24 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2002-08-15 Lars Gullik Bjønnes <larsbj@gullik.net>
* paragraph.[Ch]: add some NO_NEXT ifdefs.
2002-08-15 Lars Gullik Bjønnes <larsbj@gullik.net>
* paragraph.C (Paragraph): reformat a bit

View File

@ -76,8 +76,10 @@ extern BufferView * current_view;
Paragraph::Paragraph()
: pimpl_(new Paragraph::Pimpl(this))
{
#ifndef NO_NEXT
next_ = 0;
previous_ = 0;
#endif
enumdepth = 0;
itemdepth = 0;
bibkey = 0; // ale970302
@ -85,6 +87,7 @@ Paragraph::Paragraph()
}
#ifndef NO_NEXT
// This constructor inserts the new paragraph in a list.
Paragraph::Paragraph(Paragraph * par)
: pimpl_(new Paragraph::Pimpl(this))
@ -103,6 +106,7 @@ Paragraph::Paragraph(Paragraph * par)
bibkey = 0; // ale970302
params().clear();
}
#endif
Paragraph::Paragraph(Paragraph const & lp, bool same_ids)
@ -110,9 +114,10 @@ Paragraph::Paragraph(Paragraph const & lp, bool same_ids)
{
enumdepth = 0;
itemdepth = 0;
#ifndef NO_NEXT
next_ = 0;
previous_ = 0;
#endif
// this is because of the dummy layout of the paragraphs that
// follow footnotes
layout_ = lp.layout();
@ -141,10 +146,12 @@ Paragraph::Paragraph(Paragraph const & lp, bool same_ids)
// the destructor removes the new paragraph from the list
Paragraph::~Paragraph()
{
#ifndef NO_NEXT
if (previous_)
previous_->next_ = next_;
if (next_)
next_->previous_ = previous_;
#endif
// ale970302
delete bibkey;
@ -688,7 +695,7 @@ void Paragraph::setFont(pos_type pos, LyXFont const & font)
}
#ifndef NO_NEXT
void Paragraph::next(Paragraph * p)
{
next_ = p;
@ -726,6 +733,7 @@ Paragraph const * Paragraph::previous() const
{
return previous_;
}
#endif
void Paragraph::breakParagraph(BufferParams const & bparams,
@ -1050,6 +1058,7 @@ Paragraph const * Paragraph::depthHook(depth_type depth) const
return newpar;
}
Paragraph * Paragraph::outerHook()
{
if (!getDepth())
@ -1057,6 +1066,7 @@ Paragraph * Paragraph::outerHook()
return depthHook(depth_type(getDepth() - 1));
}
Paragraph const * Paragraph::outerHook() const
{
if (!getDepth())
@ -1303,6 +1313,7 @@ Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
return next_;
}
// This could go to ParagraphParameters if we want to
int Paragraph::startTeXParParams(BufferParams const & bparams,
ostream & os, bool moving_arg) const
@ -1363,6 +1374,7 @@ int Paragraph::startTeXParParams(BufferParams const & bparams,
return column;
}
// This could go to ParagraphParameters if we want to
int Paragraph::endTeXParParams(BufferParams const & bparams,
ostream & os, bool moving_arg) const

View File

@ -83,9 +83,11 @@ public:
///
Paragraph();
#ifndef NO_NEXT
/// this constructor inserts the new paragraph in a list
explicit
Paragraph(Paragraph * par);
#endif
///
Paragraph(Paragraph const &, bool same_ids);
/// the destructor removes the new paragraph from the list
@ -181,6 +183,7 @@ public:
///
InsetBibKey * bibkey; // ale970302
#ifndef NO_NEXT
///
void next(Paragraph *);
/** these function are able to hide closed footnotes
@ -195,7 +198,7 @@ public:
Paragraph * previous();
///
Paragraph const * previous() const;
#endif
/// for the environments
Paragraph * depthHook(depth_type depth);
/// for the environments
@ -342,11 +345,12 @@ private:
LyXLayout_ptr layout_;
/// if anything uses this we don't want it to.
Paragraph(Paragraph const &);
#ifndef NO_NEXT
///
Paragraph * next_;
///
Paragraph * previous_;
#endif
struct Pimpl;
///
friend struct Paragraph::Pimpl;