mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-25 22:03:45 -06:00
RichText header/footer optimized
git-svn-id: svn://ultimatepp.org/upp/trunk@10086 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b577db64b4
commit
05c34f4a50
12 changed files with 107 additions and 69 deletions
|
|
@ -119,9 +119,9 @@ String AsHtml(const RichTxt& text, const RichStyles& styles, Index<String>& css,
|
|||
{
|
||||
if(text.IsTable(i)) {
|
||||
const RichTable& t = text.GetTable(i);
|
||||
int nx = t.format.column.GetCount();
|
||||
int ny = t.cell.GetCount();
|
||||
const RichTable::Format& tf = t.format;
|
||||
const RichTable::Format& tf = t.GetFormat();
|
||||
int nx = tf.column.GetCount();
|
||||
int ny = t.GetRows();
|
||||
html << "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
|
||||
if(tf.before > 0)
|
||||
html << "<tr><td height=" << HtmlDot(tf.before, z) << " colspan=\"3\"></td></tr>";
|
||||
|
|
@ -137,14 +137,14 @@ String AsHtml(const RichTxt& text, const RichStyles& styles, Index<String>& css,
|
|||
html << "<table width=\"100%\"" << FormatClass(css, style) << ">";
|
||||
int sum = 0;
|
||||
for(int i = 0; i < nx; i++)
|
||||
sum += t.format.column[i];
|
||||
sum += tf.column[i];
|
||||
html << "<colgroup>";
|
||||
for(int i = 0; i < nx; i++)
|
||||
html << "<col width=\"" << 100 * t.format.column[i] / sum << "%\">";
|
||||
html << "<col width=\"" << 100 * tf.column[i] / sum << "%\">";
|
||||
html << "</colgroup>";
|
||||
html << "\r\n";
|
||||
for(int i = 0; i < ny; i++) {
|
||||
const Array<RichCell>& r = t.cell[i];
|
||||
const Array<RichCell>& r = t[i];
|
||||
html << "<tr>";
|
||||
for(int j = 0; j < r.GetCount(); j++) {
|
||||
if(t(i, j)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue