mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
small clenaup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8072 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6b22f0e423
commit
7803b6341b
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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!
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
///
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
///
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user