private void CalulateCellWidths(ColumnCollection colColl)
{
try
{
ArrayList colWidths = new ArrayList();
foreach(Column col in colColl)
{
if (col.Style != null
&& col.Style is ColumnStyle
&& ((ColumnStyle)col.Style).ColumnProperties != null)
{
string strColWidth = ((ColumnStyle)col.Style).ColumnProperties.Width;
if (strColWidth != null)
{
double dColWidth = AODL.Document.Helper.SizeConverter.GetDoubleFromAnOfficeSizeValue(strColWidth);
colWidths.Add(dColWidth);
if (col.NumberColumnsRepeated != null)
{
int coloumsRepeated = Int32.Parse(col.NumberColumnsRepeated);
for(int i=1; i < coloumsRepeated; i++)
{
colWidths.Add(dColWidth);
}
}
}
}
}
if (colWidths.Count == this._maxCells)
{
this._cellWidths = new float[this._maxCells];
for(int ii = 0; ii < this._maxCells; ii++)
{
this._cellWidths[ii] = (float) ((double)colWidths[ii] / this._tableWidth);
}
}
}
catch(Exception)
{
throw;
}
}