RichText: Fixed QTF new page ^^ with tables

git-svn-id: svn://ultimatepp.org/upp/trunk@10233 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-09-22 14:58:17 +00:00
parent 85b3470e86
commit 024bf6f641
2 changed files with 17 additions and 9 deletions

View file

@ -1,5 +1,4 @@
#include "RichText.h"
#include "RichText.h"
namespace Upp {
@ -253,14 +252,8 @@ void RichQtfParser::EndPart()
}
else {
Flush();
if(table.GetCount()) {
RichTable& tab = Table();
RichTable::Format tabformat = tab.GetFormat();
if(breakpage)
tabformat.newpage = true;
tab.SetFormat(tabformat);
if(table.GetCount())
table.Top().text.Cat(paragraph, target.GetStyles());
}
else {
if(breakpage)
paragraph.format.newpage = true;
@ -849,6 +842,13 @@ void RichQtfParser::Parse(const char *qtf, int _accesskey)
Table().AddColumn(r);
while(Key(':'))
Table().AddColumn(ReadNumber());
if(breakpage) {
RichTable& tab = Table();
RichTable::Format tabformat = tab.GetFormat();
tabformat.newpage = true;
tab.SetFormat(tabformat);
breakpage = false;
}
TableFormat();
SetFormat();
}

View file

@ -626,7 +626,15 @@ in dots.]
:: [s0; [C@(128.0.255) `|][/C@(0.0.255) number]]
:: [s0; Vertical cell span.]
:: [s0; [C@(128.0.255) ;]]
::= [s0; NOP separator. In some cases it helps to separate command code.]}}&]
::= [s0; NOP separator. In some cases it helps to separate command code.]
::^ [s0; [C@(128.0.255) P]]
::= [s0; Page break before table.]
::^ [s0;%- [%%C@(128.0.255) T][/C@(0.0.255) qtf][C@(128.0.255) `^`^][/C@(0.0.255) qtf][C@(128.0.255) `^
`^]]
:: [s0; New text header / footer, [%-/C@(0.0.255) qtf] is complete embeded
QTF representing header/footer. This QTF can contain field[@5
`{:VALUE:PAGENUMBER:`} ]to represent page number and[@5 `{:VALUE:PAGECOUNT:`}]
to represent total number of pages.]}}&]
[s0;3 &]
[s0; Note: There is also legacy support for old table format (from
previous QTF version) that is based on [@(128.0.255) `+`+ ]pair