Ejemplo n.º 1
0
        internal void InsertInternal(int rowIndex, int rowCount, ExcelRow sourceRow)
        {
            ArrayList list = new ArrayList();

            if (sourceRow != null)
            {
                foreach (ExcelCell cell in sourceRow.AllocatedCells)
                {
                    CellRange mergedRange = cell.MergedRange;
                    if (((mergedRange != null) && (mergedRange.FirstRowIndex == sourceRow.Index)) && (mergedRange.LastRowIndex == sourceRow.Index))
                    {
                        list.Add(mergedRange);
                    }
                }
            }
            base.FixAllIndexes(rowIndex, rowCount);
            for (int i = rowCount - 1; i >= 0; i--)
            {
                ExcelRow row;
                if (sourceRow != null)
                {
                    row = new ExcelRow(this, sourceRow)
                    {
                        Index = rowIndex + i
                    };
                    foreach (CellRange range2 in list)
                    {
                        row.Cells.GetSubrangeAbsolute(row.Index, range2.FirstColumnIndex, row.Index, range2.LastColumnIndex).Merged = true;
                    }
                }
                else
                {
                    row = new ExcelRow(this, rowIndex + i);
                }
                base.Items.Insert(rowIndex, row);
            }
        }
Ejemplo n.º 2
0
 public void InsertCopy(int rowCount, ExcelRow sourceRow)
 {
     ((ExcelRowCollection)base.Parent).InsertInternal(base.Index, rowCount, sourceRow);
 }
Ejemplo n.º 3
0
 internal ExcelRow(ExcelRowCollection parent, ExcelRow sourceRow) : base(parent, (ExcelColumnRowBase)sourceRow)
 {
     this.height         = 255;
     this.height         = sourceRow.height;
     this.cellCollection = new ExcelCellCollection(parent.Parent, sourceRow.cellCollection);
 }