small clenaup

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8072 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-11-10 18:13:00 +00:00
parent 6b22f0e423
commit 7803b6341b
9 changed files with 24 additions and 24 deletions

View File

@ -182,10 +182,8 @@ void InsetList::deleteInsetsLyXText(BufferView * bv)
List::iterator it = list.begin();
List::iterator end = list.end();
for (; it != end; ++it) {
if (it->inset && it->inset->isTextInset()) {
static_cast<UpdatableInset*>
(it->inset)->deleteLyXText(bv, true);
}
if (it->inset)
it->inset->deleteLyXText(bv);
}
}

View File

@ -141,6 +141,13 @@ bool InsetOld::checkInsertChar(LyXFont &)
}
int InsetOld::scroll(bool recursive) const
{
if (!recursive || !owner_)
return scx;
return 0;
}
bool isEditableInset(InsetOld const * i)
{
return i && i->editable();

View File

@ -217,13 +217,9 @@ public:
///
int y() const { return yo_; }
///
virtual void deleteLyXText(BufferView *, bool = true) const {}
/// returns the actuall scroll-value
virtual int scroll(bool recursive=true) const {
if (!recursive || !owner_)
return scx;
return 0;
}
virtual void deleteLyXText(BufferView *) const {}
/// returns the actual scroll-value
virtual int scroll(bool recursive = true) const;
/// if this insets owns paragraphs (f.ex. InsetText) then it
/// should return it's very first one!

View File

@ -351,9 +351,9 @@ void InsetCollapsable::setFont(BufferView * bv, LyXFont const & font,
}
void InsetCollapsable::deleteLyXText(BufferView * bv, bool recursive) const
void InsetCollapsable::deleteLyXText(BufferView * bv) const
{
inset.deleteLyXText(bv, recursive);
inset.deleteLyXText(bv);
}

View File

@ -92,7 +92,7 @@ public:
void setAutoCollapse(bool f);
#endif
///
void deleteLyXText(BufferView *, bool recursive=true) const;
void deleteLyXText(BufferView *) const;
/// Appends \c list with all labels found within this inset.
void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///

View File

@ -1650,8 +1650,9 @@ bool InsetTabular::activateCellInset(BufferView * bv, int x, int y, bool behind)
}
void InsetTabular::deleteLyXText(BufferView * /*bv*/, bool /*recursive*/) const
void InsetTabular::deleteLyXText(BufferView * /*bv*/) const
{
#warning this is strange, isnt it? But this is 1.3.x code...
//resizeLyXText(bv, recursive);
}

View File

@ -122,7 +122,7 @@ public:
void setFont(BufferView *, LyXFont const &, bool toggleall = false,
bool selectall = false);
///
void deleteLyXText(BufferView *, bool recursive = true) const;
void deleteLyXText(BufferView *) const;
///
void openLayoutDialog(BufferView *) const;
///

View File

@ -959,14 +959,12 @@ void InsetText::setViewCache(BufferView const * bv) const
}
void InsetText::deleteLyXText(BufferView * bv, bool recursive) const
void InsetText::deleteLyXText(BufferView * bv) const
{
if (recursive) {
/// then remove all LyXText in text-insets
for_each(const_cast<ParagraphList&>(paragraphs).begin(),
const_cast<ParagraphList&>(paragraphs).end(),
boost::bind(&Paragraph::deleteInsetsLyXText, _1, bv));
}
/// then remove all LyXText in text-insets
for_each(const_cast<ParagraphList&>(paragraphs).begin(),
const_cast<ParagraphList&>(paragraphs).end(),
boost::bind(&Paragraph::deleteInsetsLyXText, _1, bv));
}

View File

@ -119,7 +119,7 @@ public:
///
void setViewCache(BufferView const * bv) const;
///
void deleteLyXText(BufferView *, bool recursive = true) const;
void deleteLyXText(BufferView *) const;
///
bool showInsetDialog(BufferView *) const;
/// Appends \c list with all labels found within this inset.