mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
Cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1752 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f609922034
commit
6096d824aa
@ -1,3 +1,7 @@
|
|||||||
|
2001-03-13 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
|
* buffer.C (getLists): Cleanup.
|
||||||
|
|
||||||
2001-03-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2001-03-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* lyxfont.C (update): don't honor toggleall on font size.
|
* lyxfont.C (update): don't honor toggleall on font size.
|
||||||
|
23
src/buffer.C
23
src/buffer.C
@ -3636,11 +3636,9 @@ Buffer::Lists const Buffer::getLists() const
|
|||||||
}
|
}
|
||||||
if (!type.empty()) {
|
if (!type.empty()) {
|
||||||
SingleList & item = l[type];
|
SingleList & item = l[type];
|
||||||
TocItem tmp;
|
string const str =
|
||||||
tmp.par = par;
|
tostr(item.size()+1) + ". " + par->String(this, false);
|
||||||
tmp.depth = 0;
|
item.push_back(TocItem(par, 0, str));
|
||||||
tmp.str = tostr(item.size()+1) + ". " + par->String(this, false);
|
|
||||||
item.push_back(tmp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!par->IsDummy()) {
|
} else if (!par->IsDummy()) {
|
||||||
@ -3653,13 +3651,10 @@ Buffer::Lists const Buffer::getLists() const
|
|||||||
&& labeltype <= LABEL_COUNTER_CHAPTER + params.tocdepth) {
|
&& labeltype <= LABEL_COUNTER_CHAPTER + params.tocdepth) {
|
||||||
// insert this into the table of contents
|
// insert this into the table of contents
|
||||||
SingleList & item = l["TOC"];
|
SingleList & item = l["TOC"];
|
||||||
TocItem tmp;
|
int depth = max(0,
|
||||||
tmp.par = par;
|
|
||||||
tmp.depth = max(0,
|
|
||||||
labeltype -
|
labeltype -
|
||||||
textclasslist.TextClass(params.textclass).maxcounter());
|
textclasslist.TextClass(params.textclass).maxcounter());
|
||||||
tmp.str = par->String(this, true);
|
item.push_back(TocItem(par, depth, par->String(this, true)));
|
||||||
item.push_back(tmp);
|
|
||||||
}
|
}
|
||||||
#ifdef NEW_INSETS
|
#ifdef NEW_INSETS
|
||||||
// For each paragrph, traverse its insets and look for
|
// For each paragrph, traverse its insets and look for
|
||||||
@ -3685,11 +3680,9 @@ Buffer::Lists const Buffer::getLists() const
|
|||||||
while (tmp) {
|
while (tmp) {
|
||||||
if (tmp->layout == cap) {
|
if (tmp->layout == cap) {
|
||||||
SingleList & item = l[type];
|
SingleList & item = l[type];
|
||||||
TocItem ti;
|
string const str =
|
||||||
ti.par = tmp;
|
tostr(item.size()+1) + ". " + tmp->String(this, false);
|
||||||
ti.depth = 0;
|
item.push_back(TocItem(tmp, 0 , str));
|
||||||
ti.str = tostr(item.size()+1) + ". " + tmp->String(this, false);
|
|
||||||
item.push_back(ti);
|
|
||||||
}
|
}
|
||||||
tmp = tmp->next();
|
tmp = tmp->next();
|
||||||
}
|
}
|
||||||
|
@ -265,6 +265,8 @@ public:
|
|||||||
std::vector<std::pair<string, string> > const getBibkeyList();
|
std::vector<std::pair<string, string> > const getBibkeyList();
|
||||||
///
|
///
|
||||||
struct TocItem {
|
struct TocItem {
|
||||||
|
TocItem(LyXParagraph * p, int d, string const & s)
|
||||||
|
: par(p), depth(d), str(s) {}
|
||||||
///
|
///
|
||||||
LyXParagraph * par;
|
LyXParagraph * par;
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user