implement getLabelList

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1897 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-04-04 23:00:42 +00:00
parent bcd1410de1
commit 9f7498dbdf
6 changed files with 33 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2001-04-05 Lars Gullik Bjønnes <larsbj@birdstep.com>
* insetcollapsable.[Ch] (getLabelList): implement
* insettext.[Ch] (getLabelList): implement
* insettext.h: reindent
* insettabular.h: make tabular a scoped_ptr

View File

@ -466,3 +466,9 @@ void InsetCollapsable::resizeLyXText(BufferView * bv) const
LyXFont font(LyXFont::ALL_SANE);
oldWidth = width(bv, font);
}
vector<string> const InsetCollapsable::getLabelList() const
{
return inset.getLabelList();
}

View File

@ -129,7 +129,8 @@ public:
void deleteLyXText(BufferView *, bool recursive=true) const;
///
void resizeLyXText(BufferView *) const;
///
vector<string> const getLabelList() const;
protected:
///
int ascent_collapsed(Painter &, LyXFont const &) const;

View File

@ -35,7 +35,7 @@ InsetLabel::InsetLabel(InsetCommandParams const & p)
vector<string> const InsetLabel::getLabelList() const
{
return vector<string>(1,getContents());
return vector<string>(1, getContents());
}

View File

@ -1447,6 +1447,24 @@ bool InsetText::ShowInsetDialog(BufferView * bv) const
}
vector<string> const InsetText::getLabelList() const
{
vector<string> label_list;
LyXParagraph * tpar = par;
while (tpar) {
LyXParagraph::inset_iterator beg = tpar->inset_iterator_begin();
LyXParagraph::inset_iterator end = tpar->inset_iterator_end();
for (; beg != end; ++beg) {
vector<string> const l = (*beg)->getLabelList();
label_list.insert(label_list.end(), l.begin(), l.end());
}
tpar = tpar->next();
}
return label_list;
}
void InsetText::SetFont(BufferView * bv, LyXFont const & font, bool toggleall)
{
if (TEXT(bv)->selection) {

View File

@ -178,6 +178,8 @@ public:
///
bool ShowInsetDialog(BufferView *) const;
///
vector<string> const getLabelList() const;
///
LyXParagraph * par;
///
mutable int need_update;