public void MergeCells(AODL.Document.TextDocuments.TextDocument document,int cellStartIndex, int mergeCells, bool mergeContent)
{
try
{
this.Cells[cellStartIndex].ColumnRepeating = mergeCells.ToString();
if (mergeContent)
{
for(int i=cellStartIndex+1; i<cellStartIndex+mergeCells; i++)
{
foreach(IContent content in this.Cells[i].Content)
this.Cells[cellStartIndex].Content.Add(content);
}
}
for(int i=cellStartIndex+mergeCells-1; i>cellStartIndex; i--)
{
this.Cells.RemoveAt(i);
this.CellSpanCollection.Add(new CellSpan(this, (AODL.Document.TextDocuments.TextDocument)this.Document));
}
}
catch(Exception)
{
throw;
}
}