From 345d7c00cd85576102a025daad82e6537fcb12d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 26 Apr 2007 08:30:11 +0000 Subject: [PATCH] remove ParagraphList_fwd.h git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18030 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.h | 4 ++-- src/CutAndPaste.cpp | 8 +++++--- src/CutAndPaste.h | 3 +-- src/ParIterator.h | 7 +------ src/ParagraphList.h | 14 +++++++++++--- src/ParagraphList_fwd.h | 26 -------------------------- src/Undo.h | 2 +- src/insets/InsetText.h | 4 +--- src/output_docbook.h | 5 +---- src/output_latex.h | 4 ++-- src/paragraph_funcs.h | 3 +-- 11 files changed, 26 insertions(+), 54 deletions(-) delete mode 100644 src/ParagraphList_fwd.h diff --git a/src/Buffer.h b/src/Buffer.h index 28cfbab9c0..b205fb5a8c 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -16,7 +16,6 @@ #include "InsetList.h" #include "DocIterator.h" -#include "ParagraphList_fwd.h" #include "support/FileName.h" #include "support/limited_stack.h" @@ -52,11 +51,12 @@ class MacroData; class OutputParams; class ParConstIterator; class ParIterator; +class ParagraphList; +class StableDocIterator; class TeXErrors; class TexRow; class TocBackend; class Undo; -class StableDocIterator; /** The buffer object. diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index d56f8882c1..6830406cba 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -357,9 +357,11 @@ void copySelectionHelper(Buffer const & buf, ParagraphList & pars, ParagraphList copy_pars(boost::next(pars.begin(), startpit), boost::next(pars.begin(), endpit + 1)); - // Remove the end of the last paragraph; afterwards, remove the beginning - // of the first paragraph. Keep this order - there may only be one paragraph! - // Do not track deletions here; this is an internal action not visible to the user + // Remove the end of the last paragraph; afterwards, remove the + // beginning of the first paragraph. Keep this order - there may only + // be one paragraph! Do not track deletions here; this is an internal + // action not visible to the user + Paragraph & back = copy_pars.back(); back.eraseChars(end, back.size(), false); Paragraph & front = copy_pars.front(); diff --git a/src/CutAndPaste.h b/src/CutAndPaste.h index 6375530580..6128972d75 100644 --- a/src/CutAndPaste.h +++ b/src/CutAndPaste.h @@ -14,8 +14,6 @@ #ifndef CUTANDPASTE_H #define CUTANDPASTE_H -#include "ParagraphList_fwd.h" - #include "support/docstring.h" #include @@ -27,6 +25,7 @@ class ErrorList; class InsetText; class LyXTextClass; class LCursor; +class ParagraphList; namespace cap { diff --git a/src/ParIterator.h b/src/ParIterator.h index bcae0b96e8..e06a3b5032 100644 --- a/src/ParIterator.h +++ b/src/ParIterator.h @@ -13,21 +13,17 @@ #define PARITERATOR_H #include "DocIterator.h" -#include "ParagraphList_fwd.h" #include "support/types.h" -#include - #include namespace lyx { - - class InsetBase; class LyXText; +class ParagraphList; class ParIterator : public std::iterator, @@ -44,7 +40,6 @@ public: /// ParIterator() : DocIterator() {} - /// ParIterator(InsetBase &, pit_type pit); /// diff --git a/src/ParagraphList.h b/src/ParagraphList.h index cc81e9df64..a57deb4eea 100644 --- a/src/ParagraphList.h +++ b/src/ParagraphList.h @@ -19,9 +19,17 @@ namespace lyx { -/// Container for all kind of Paragraphs used in Lyx. -typedef RandomAccessList ParagraphList; - +/// Container for all kind of Paragraphs used in LyX. +class ParagraphList : public RandomAccessList { +public: + /// + ParagraphList() {} + /// + template + ParagraphList(InputIterator first, InputIterator last) + : RandomAccessList(first, last) + {} +}; } // namespace lyx diff --git a/src/ParagraphList_fwd.h b/src/ParagraphList_fwd.h deleted file mode 100644 index 0c8aa6c205..0000000000 --- a/src/ParagraphList_fwd.h +++ /dev/null @@ -1,26 +0,0 @@ -// -*- C++ -*- -/** - * \file ParagraphList_fwd.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Angus Leeming - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef PARAGRAPH_LIST_FWD_H -#define PARAGRAPH_LIST_FWD_H - -namespace lyx { - -template -class RandomAccessList; - -class Paragraph; - -typedef RandomAccessList ParagraphList; - -} // namespace lyx - -#endif diff --git a/src/Undo.h b/src/Undo.h index 6569d75d66..29f25d9c6b 100644 --- a/src/Undo.h +++ b/src/Undo.h @@ -18,7 +18,6 @@ #include "DocIterator.h" #include "BufferParams.h" -#include "ParagraphList_fwd.h" #include "support/types.h" @@ -32,6 +31,7 @@ class BufferView; class DocIterator; class LCursor; class MathArray; +class ParagraphList; /** diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h index 0b9222bf3e..f3c15c4900 100644 --- a/src/insets/InsetText.h +++ b/src/insets/InsetText.h @@ -16,7 +16,6 @@ #include "RowList_fwd.h" #include "LyXFont.h" #include "LyXText.h" -#include "ParagraphList_fwd.h" #include "support/types.h" @@ -31,6 +30,7 @@ class BufferView; class CursorSlice; class Dimension; class LColor_color; +class ParagraphList; /** @@ -43,8 +43,6 @@ public: explicit InsetText(BufferParams const &); /// InsetText(); - /// - virtual ~InsetText() {} /// empty inset to empty par void clear(); diff --git a/src/output_docbook.h b/src/output_docbook.h index c3c4dc5e2d..b0f6326883 100644 --- a/src/output_docbook.h +++ b/src/output_docbook.h @@ -13,16 +13,13 @@ #ifndef OUTPUT_DOCBOOK_H #define OUTPUT_DOCBOOK_H -#include "ParagraphList_fwd.h" #include "support/docstream.h" -#include - - namespace lyx { class Buffer; class OutputParams; +class ParagraphList; /// void docbookParagraphs(ParagraphList const & subset, diff --git a/src/output_latex.h b/src/output_latex.h index ef18a081f3..70045d304f 100644 --- a/src/output_latex.h +++ b/src/output_latex.h @@ -12,8 +12,6 @@ #ifndef OUTPUT_LATEX_H #define OUTPUT_LATEX_H -#include "ParagraphList_fwd.h" - #include "support/docstream.h" @@ -22,6 +20,8 @@ namespace lyx { class Buffer; class BufferParams; class Encoding; +class Paragraph; +class ParagraphList; class OutputParams; class TexRow; diff --git a/src/paragraph_funcs.h b/src/paragraph_funcs.h index 6fab4d7a49..3593a65d24 100644 --- a/src/paragraph_funcs.h +++ b/src/paragraph_funcs.h @@ -12,8 +12,6 @@ #ifndef PARAGRAPH_FUNCS_H #define PARAGRAPH_FUNCS_H -#include "ParagraphList_fwd.h" - #include "support/types.h" @@ -24,6 +22,7 @@ class BufferParams; class InsetBase; class LyXFont; class Paragraph; +class ParagraphList; /** * This breaks a paragraph at the specified position.