m_CellInfo[i] = (cellStruct*) realloc(m_CellInfo[i], sizeof(cellStruct) * cols);
for (j = m_NumCols; j < cols; j++)
m_CellInfo[i][j].flag = cellFree;
}
m_ColsInfo = (colStruct*) realloc(m_ColsInfo, sizeof(colStruct) * cols);
m_CellInfo[i] = (cellStruct*) realloc(m_CellInfo[i], sizeof(cellStruct) * cols);
for (j = m_NumCols; j < cols; j++)
m_CellInfo[i][j].flag = cellFree;
}
m_ColsInfo = (colStruct*) realloc(m_ColsInfo, sizeof(colStruct) * cols);
wxSscanf(wd.c_str(), wxT("%i%%"), &m_ColsInfo[c].width);
m_ColsInfo[c].units = wxHTML_UNITS_PERCENT;
}
wxSscanf(wd.c_str(), wxT("%i%%"), &m_ColsInfo[c].width);
m_ColsInfo[c].units = wxHTML_UNITS_PERCENT;
}
wxSscanf(wd.c_str(), wxT("%i"), &m_ColsInfo[c].width);
m_ColsInfo[c].width = (int)(m_PixelScale * (double)m_ColsInfo[c].width);
m_ColsInfo[c].units = wxHTML_UNITS_PIXELS;
wxSscanf(wd.c_str(), wxT("%i"), &m_ColsInfo[c].width);
m_ColsInfo[c].width = (int)(m_PixelScale * (double)m_ColsInfo[c].width);
m_ColsInfo[c].units = wxHTML_UNITS_PIXELS;
{
if (tag.HasParam(wxT("COLSPAN"))) tag.ScanParam(wxT("COLSPAN"), wxT("%i"), &m_CellInfo[r][c].colspan);
if (tag.HasParam(wxT("ROWSPAN"))) tag.ScanParam(wxT("ROWSPAN"), wxT("%i"), &m_CellInfo[r][c].rowspan);
{
if (tag.HasParam(wxT("COLSPAN"))) tag.ScanParam(wxT("COLSPAN"), wxT("%i"), &m_CellInfo[r][c].colspan);
if (tag.HasParam(wxT("ROWSPAN"))) tag.ScanParam(wxT("ROWSPAN"), wxT("%i"), &m_CellInfo[r][c].rowspan);
if (m_WidthFloat < 0) m_Width = (100 + m_WidthFloat) * w / 100;
else m_Width = m_WidthFloat * w / 100;
}
if (m_WidthFloat < 0) m_Width = (100 + m_WidthFloat) * w / 100;
else m_Width = m_WidthFloat * w / 100;
}
- for (actrow = 0; actrow <= m_NumRows; actrow++) ypos[actrow] = m_Spacing;
-
- for (actrow = 0; actrow < m_NumRows; actrow++) {
-
+ ypos[0] = m_Spacing;
+ for (actrow = 1; actrow <= m_NumRows; actrow++) ypos[actrow] = -1;
+ for (actrow = 0; actrow < m_NumRows; actrow++)
+ {
+ if (ypos[actrow] == -1) ypos[actrow] = ypos[actrow-1];
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
- actcell -> SetMinHeight(m_CellInfo[actrow][actcol].minheight, m_CellInfo[actrow][actcol].valign);
- actcell -> Layout(fullwid);
+ actcell->SetMinHeight(m_CellInfo[actrow][actcol].minheight, m_CellInfo[actrow][actcol].valign);
+ actcell->Layout(fullwid);
if (m_CellInfo[actrow][actcol].flag != cellUsed) continue;
actcell = m_CellInfo[actrow][actcol].cont;
if (m_CellInfo[actrow][actcol].flag != cellUsed) continue;
actcell = m_CellInfo[actrow][actcol].cont;
ypos[actrow + m_CellInfo[actrow][actcol].rowspan] - ypos[actrow] - m_Spacing,
m_CellInfo[actrow][actcol].valign);
fullwid = 0;
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
ypos[actrow + m_CellInfo[actrow][actcol].rowspan] - ypos[actrow] - m_Spacing,
m_CellInfo[actrow][actcol].valign);
fullwid = 0;
for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++)
fullwid += m_ColsInfo[i].pixwidth;
fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing;
- actcell -> Layout(fullwid);
- actcell -> SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]);
+ actcell->Layout(fullwid);
+ actcell->SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]);
- c -> SetWidthFloat(tag, m_WParser -> GetPixelScale());
- m_Table = new wxHtmlTableCell(c, tag, m_WParser -> GetPixelScale());
- m_OldAlign = m_WParser -> GetAlign();
+ c->SetWidthFloat(tag, m_WParser->GetPixelScale());
+ m_Table = new wxHtmlTableCell(c, tag, m_WParser->GetPixelScale());
+ m_OldAlign = m_WParser->GetAlign();
- m_WParser -> SetAlign(m_OldAlign);
- m_WParser -> SetContainer(oldcont);
- m_WParser -> CloseContainer();
+ m_WParser->SetAlign(m_OldAlign);
+ m_WParser->SetContainer(oldcont);
+ m_WParser->CloseContainer();
- else {
- m_WParser -> SetAlign(m_OldAlign);
- c = m_WParser -> SetContainer(new wxHtmlContainerCell(m_Table));
- m_Table -> AddCell(c, tag);
+ else
+ {
+ m_WParser->SetAlign(m_OldAlign);
+ c = m_WParser->SetContainer(new wxHtmlContainerCell(m_Table));
+ m_Table->AddCell(c, tag);
- if (als == wxT("RIGHT")) m_WParser -> SetAlign(wxHTML_ALIGN_RIGHT);
- else if (als == wxT("CENTER")) m_WParser -> SetAlign(wxHTML_ALIGN_CENTER);
+ if (als == wxT("RIGHT")) m_WParser->SetAlign(wxHTML_ALIGN_RIGHT);
+ else if (als == wxT("CENTER")) m_WParser->SetAlign(wxHTML_ALIGN_CENTER);