System\Windows\Documents\TextRangeEditTables.cs (83)
60TableCell firstCell = GetTableCellFromPosition((TextPointer)range.TextSegments[0].Start);
70TableCell lastCell = GetTableCellFromPosition(lastCellPointer);
132internal static TableCell GetTableCellFromPosition(TextPointer position)
135while (element != null && !(element is TableCell))
140return element as TableCell;
185TableCell anchorCell;
186TableCell movingCell;
228out TableCell anchorCell, out TableCell movingCell)
286TableCell anchorCell;
287TableCell movingCell;
327private static List<TextSegment> BuildCellSelection(TableCell anchorCell, TableCell movingCell)
343TableCell segmentStartCell = null;
344TableCell segmentEndCell = null;
349TableCell cell = cells[cellIndex];
436TableCell anchorCell;
437TableCell movingCell;
578TableCell cell = GetTableCellFromPosition(selection.MovingPosition);
595TableCell cell = GetTableCellFromPosition(selection.MovingPosition);
670TableCell cell = new TableCell(new Paragraph())
846TableCell tableCell = new TableCell();
950TableCell startCell;
951TableCell endCell;
1078TableCell cell = GetTableCellFromPosition((TextPointer)textSegment.Start);
1089cell = (TableCell)cellEnd.GetAdjacentElement(LogicalDirection.Forward);
1135TableCell[] spannedCells = currentRow.SpannedCells;
1140TableCell cell = spannedCells[i];
1141cell.ContentStart.TextContainer.SetValue(cell.ContentStart, TableCell.RowSpanProperty, cell.RowSpan + (rowCount > 0 ? rowCount : -rowCount));
1174TableCell currentCell = cells[i];
1288TableCell cell = cells[cellIndex];
1311TableCell[] spannedCells = nextRow.SpannedCells;
1317TableCell spannedCell = spannedCells[i];
1324spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - deletedRowsCount);
1335TableCell newCell = AddCellCopy(nextRow, spannedCell, cellIndex, /*copyRowSpan:*/false, /*copyColumnSpan:*/true);
1337newCell.ContentStart.TextContainer.SetValue(newCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - (nextRow.Index - spannedCell.Row.Index));
1383TableCell cellInsertAfter = null;
1387TableCell cell = row.Cells[iCell];
1408cellInsertAfter.ContentStart.TextContainer.SetValue(cellInsertAfter.ContentStart, TableCell.ColumnSpanProperty, cellInsertAfter.ColumnSpan + 1);
1434TableCell startCell;
1435TableCell endCell;
1494TableCell cellDelete = null;
1498TableCell cell = row.Cells[iCell];
1519cellDelete.ContentStart.TextContainer.SetValue(cellDelete.ContentStart, TableCell.ColumnSpanProperty, cellDelete.ColumnSpan - 1);
1539TableCell startCell;
1540TableCell endCell;
1623TableCell cell = cellInfo.Cell;
1828TableCell startCell;
1829TableCell endCell;
1879TableCell startCell;
1880TableCell endCell;
1925startCell.ContentStart.TextContainer.SetValue(startCell.ContentStart, TableCell.ColumnSpanProperty, startCell.ColumnSpan - 1);
1928startCell.ClearValue(TableCell.ColumnSpanProperty);
1986private static TextSegment NewNormalizedCellSegment(TableCell startCell, TableCell endCell)
2047out TableCell anchorCell, out TableCell movingCell,
2132out TableCell anchorCell, out TableCell movingCell,
2171out TableCell cell,
2189if (element is TableCell)
2191cell = (TableCell)element;
2253private static TableCell AddCellCopy(TableRow newRow, TableCell currentCell, int cellInsertionIndex, bool copyRowSpan, bool copyColumnSpan)
2257TableCell newCell = new TableCell();
2276if (propertyEntry.Property == TableCell.RowSpanProperty && !copyRowSpan ||
2277propertyEntry.Property == TableCell.ColumnSpanProperty && !copyColumnSpan)
2386TableCell[] spannedCells = rowGroup.Rows[topRow].SpannedCells;
2404TableCell firstCell;
2405TableCell lastCell;
2433TableCell firstCell;
2434TableCell lastCell;
2447firstCell.ClearValue(TableCell.RowSpanProperty);
2451firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.RowSpanProperty, rowSpan);
2453firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.ColumnSpanProperty, columnSpan);
2470TableCell[] spannedCells = row.SpannedCells;
2473TableCell spannedCell = spannedCells[i];
2480spannedCell.ClearValue(TableCell.RowSpanProperty);
2484spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, rowSpan);
2510private static bool GetBoundaryCells(TableRow row, int bottomRow, int leftColumn, int rightColumn, out TableCell firstCell, out TableCell lastCell)
2519TableCell cell = row.Cells[cellIndex];
2545private static bool IsLastCellInRow(TableCell cell)