if(flags.lineW)
{
column.lineW = Max(column.lineW, cell.lineW);
- column.minW = Max(column.minW, cell.minW);
+ column.minW = Max(column.minW, cell.minW);
}
}
{
column.rowSpan = cell.rowSpan;
sumColW += column.w;
- column = column.next;
+ column = column.next;
}
rowLineW += Max(sumColW, cell.lineW);
}
if(w < table.w)
{
int needed = 0;
-
+
// Step 1: Weights how to distribute
for(column = table.columns.first; column; column = column.next)
{
while(columnStart && columnStart.rowSpan)
columnStart = columnStart.next;
-
+
for(c = 0, column = columnStart; c<cell.span && column; c++)
{
column.rowSpan = cell.rowSpan;
if(cell.span == 1)
totalW += column.w;
- column = column.next;
+ column = column.next;
}
if(cell.span == 1 && totalW < cell.lineW)
{
needed += cell.lineW - totalW;
}
- columnStart = column;
+ columnStart = column;
}
for(column = table.columns.first; column; column = column.next)
if(column.rowSpan) column.rowSpan--;
column.rowSpan = cell.rowSpan;
totalW += column.w;
sumDesires += column.desire;
- column = column.next;
+ column = column.next;
}
if(cell.span > 1 && totalW < cell.minW)
{
for(c = 0, column = columnStart; c<cell.span && column; c++)
{
totalW += column.minW;
- column = column.next;
+ column = column.next;
}
if(totalW < cell.minW)
}
}
}
- columnStart = column;
+ columnStart = column;
}
for(column = table.columns.first; column; column = column.next)
if(column.rowSpan) column.rowSpan--;
column.w = column.minW;
}
}
-
-
+
+
// Repeat Step 1: Weights how to distribute
needed = 0;
for(column = table.columns.first; column; column = column.next)
while(columnStart && columnStart.rowSpan)
columnStart = columnStart.next;
-
+
for(c = 0, column = columnStart; c<cell.span && column; c++)
{
column.rowSpan = cell.rowSpan;
if(/*cell.span == 1 && */cell.width)
totalW += column.w;
- column = column.next;
+ column = column.next;
}
if(/*cell.span == 1 && */totalW < cell.lineW && cell.width)
{
needed += cell.lineW - totalW;
}
- columnStart = column;
+ columnStart = column;
}
for(column = table.columns.first; column; column = column.next)
if(column.rowSpan) column.rowSpan--;
else
row = NextBlock(surface, row, null, 0);
}
-
+
// Step 2: Do the distribution
if(needed)
{
while(columnStart && columnStart.rowSpan)
columnStart = columnStart.next;
-
+
for(c = 0, column = columnStart; c<cell.span && column; c++)
{
column.rowSpan = cell.rowSpan;
if(/*cell.span == 1 && */!cell.width)
totalW += column.w;
- column = column.next;
+ column = column.next;
}
if(/*cell.span == 1 && */totalW < cell.lineW && !cell.width)
{
needed += cell.lineW - totalW;
}
- columnStart = column;
+ columnStart = column;
}
for(column = table.columns.first; column; column = column.next)
if(column.rowSpan) column.rowSpan--;
else
row = NextBlock(surface, row, null, 0);
}
-
+
// Step 2: Do the distribution
if(needed)
{
for(column = table.columns.first; column; column = column.next)
w += column.w;
}
-
+
// Repartition the rest of the space in the columns
if(w < table.w)
{
rightObjects.Delete(object);
}
cellW = Max(cellW, 0);
-
+
// TRIED ADDING THIS CODE HERE...
{
int x;
cell.parent = null;
cell.next = null;
-
+
/*
if(cell.width)
cellW = cell.width;
{
column.rowSpan = cell.rowSpan;
x += column.w;
- column = column.next;
+ column = column.next;
}
}
c++;
row = NextBlockUp(surface, row, null, 0);
}
else
- row = NextBlock(surface, row, null, 0);
+ row = NextBlock(surface, row, null, 0);
}
}
font = surface.font;
newLineH = ComputeLine(surface, block, textPos, &nextCellBlock, &nextCellPos, ¢ered, &lineW, maxW, maxH, RenderFlags {}, y, &leftObjects, &rightObjects, &changeLine, false, 0, 0);
- surface.font = font;
+ surface.font = font;
//surface.TextFont(font);
{
column.rowSpan = cell.rowSpan;
x += column.w;
- column = column.next;
+ column = column.next;
}
}
c++;
row = NextBlockUp(surface, row, null, 0);
}
else
- row = NextBlock(surface, row, null, 0);
+ row = NextBlock(surface, row, null, 0);
}
return result;
}
{
column.rowSpan = cell.rowSpan;
x += column.w;
- column = column.next;
+ column = column.next;
}
}
c++;