From fb6802901040d2bf49e7c48d77c65d1e46f1b8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Thu, 15 Aug 2002 07:53:46 +0000 Subject: [PATCH] add some NO_NEXT ifdefs git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4985 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/paragraph.C | 16 ++++++++++++++-- src/paragraph.h | 8 ++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 487d479e36..3803a3d198 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-08-15 Lars Gullik Bjønnes + + * paragraph.[Ch]: add some NO_NEXT ifdefs. + 2002-08-15 Lars Gullik Bjønnes * paragraph.C (Paragraph): reformat a bit diff --git a/src/paragraph.C b/src/paragraph.C index 14e8880ef9..8b4a2e1ed7 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -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 diff --git a/src/paragraph.h b/src/paragraph.h index 10023bf801..7aa11cbc09 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -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;