prepare for global iterator's operator--

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8009 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Alfredo Braunstein 2003-11-01 09:56:18 +00:00
parent 15c913fe5a
commit d51f1114b1
7 changed files with 25 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2003-11-01 Alfredo Braunstein <abraunst@libero.it>
* inset.[Ch]:
* insettext.[Ch]:
* insettabular.[Ch]:
* insetcollapsable.[Ch]: bool haveParagraphs() -> int numParagraphs()
2003-10-31 José Matos <jamatos@lyx.org>
* inset.h (ascii, linuxdoc, docbook):

View File

@ -239,9 +239,7 @@ public:
///
virtual LyXText * getText(int /*num*/) const { return 0; }
///
virtual bool haveParagraphs() const {
return false;
}
virtual int numParagraphs() const { return 0; }
/// return the cursor if we own one otherwise giv'em just the
/// BufferView cursor to work with.

View File

@ -472,6 +472,12 @@ ParagraphList * InsetCollapsable::getParagraphs(int i) const
}
int InsetCollapsable::numParagraphs() const
{
return inset.numParagraphs();
}
LyXText * InsetCollapsable::getText(int i) const
{
return inset.getText(i);

View File

@ -119,6 +119,8 @@ public:
///
ParagraphList * getParagraphs(int) const;
///
int numParagraphs() const;
///
LyXText * getText(int) const;
///
LyXCursor const & cursor(BufferView *) const;

View File

@ -2391,6 +2391,12 @@ ParagraphList * InsetTabular::getParagraphs(int i) const
}
int InsetTabular::numParagraphs() const
{
return tabular.getNumberOfCells();
}
LyXText * InsetTabular::getText(int i) const
{
return i < tabular.getNumberOfCells()

View File

@ -162,6 +162,8 @@ public:
///
ParagraphList * getParagraphs(int) const;
///
int numParagraphs() const;
///
LyXText * getText(int) const;
///
LyXCursor const & cursor(BufferView *) const;

View File

@ -197,9 +197,7 @@ public:
void addPreview(lyx::graphics::PreviewLoader &) const;
///
bool haveParagraphs() const {
return true;
}
int numParagraphs() const { return 1; }
///
mutable ParagraphList paragraphs;
protected: