RichText newpage now allowed in level>0

git-svn-id: svn://ultimatepp.org/upp/trunk@10089 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-07-21 19:15:29 +00:00
parent cf28e77ca7
commit dbe3da0a2d
4 changed files with 8 additions and 12 deletions

View file

@ -76,15 +76,13 @@ void RichTxt::Advance(int parti, RichContext& rc, RichContext& begin) const
{
if(part[parti].Is<RichTable>()) {
const RichTable& tab = GetTable(parti);
if(rc.text == this) {
if(tab.format.newhdrftr) {
rc.NewHeaderFooter(~tab.header, ~tab.footer);
rc.Page();
}
else
if(tab.format.newpage)
rc.Page();
if(tab.format.newhdrftr && rc.text == this) {
rc.NewHeaderFooter(~tab.header, ~tab.footer);
rc.Page();
}
else
if(tab.format.newpage)
rc.Page();
begin = rc;
rc.py = GetTable(parti).GetHeight(rc);
}
@ -110,7 +108,7 @@ void RichTxt::Advance(int parti, RichContext& rc, RichContext& begin) const
rc.Page();
}
else
if(pp.newpage && rc.text == this || rc.py.y + cy + nbefore + nline > rc.page.bottom && cy < rc.page.Height())
if(pp.newpage || rc.py.y + cy + nbefore + nline > rc.page.bottom && cy < rc.page.Height())
rc.Page();
begin = rc;
rc.py.y += pp.before + pp.ruler;