mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
implement getLabelList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1897 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bcd1410de1
commit
9f7498dbdf
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -178,6 +178,8 @@ public:
|
||||
///
|
||||
bool ShowInsetDialog(BufferView *) const;
|
||||
///
|
||||
vector<string> const getLabelList() const;
|
||||
///
|
||||
LyXParagraph * par;
|
||||
///
|
||||
mutable int need_update;
|
||||
|
Loading…
x
Reference in New Issue
Block a user