src\Framework\System\Windows\Automation\Peers\TextElementAutomationPeer.cs (8)
46return TextContainerHelper.GetAutomationPeersFromRange(textElement.ContentStart, textElement.ContentEnd, null);
68Geometry geometry = textView.GetTightBoundingGeometryFromTextPositions(textElement.ContentStart, textElement.ContentEnd);
115if (textView == null || !textView.IsValid || (!textView.Contains(textElement.ContentStart) && !textView.Contains(textElement.ContentEnd)))
135TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward);
139Rect rectElement = CalculateVisibleRect(textView, textElement, textElement.ContentStart, endPosition);
169if (textView == null || !textView.IsValid || (!textView.Contains(textElement.ContentStart) && !textView.Contains(textElement.ContentEnd)))
174if (CalculateVisibleRect(textView, textElement, textElement.ContentStart, textElement.ContentEnd) == Rect.Empty)
229return TextContainerHelper.GetAutomationPeersFromRange(start, end, textElement.ContentStart);
src\Framework\System\Windows\Documents\TextRangeEdit.cs (11)
38newElement.TextContainer.SetValues(newElement.ContentStart, element.GetLocalValueEnumerator());
554element.Reposition(element.ContentStart, newElement.ElementStart);
646bool needToSplitListItem = TextPointerBase.GetImmediateListItem(paragraph.ContentStart) != null;
758start = startParagraphOrBlockUIContainer.ContentStart;
809TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward;
1314nextPosition = ((Inline)nextPosition.GetAdjacentElement(LogicalDirection.Forward)).ContentStart;
1910MergeFormattingInlines(run.ContentStart);
2183ClearPropertyValueFromSpansAndRuns(inline.ContentStart, inline.ContentEnd, formattingProperty);
2213ClearPropertyValueFromSpansAndRuns(span.ContentStart, span.ContentEnd, formattingProperty);
2231SetStructuralInlineProperty(end.Paragraph.ContentStart, end, formattingProperty, value);
2244SetStructuralInlineProperty(paragraph.ContentStart, paragraph.ContentEnd, formattingProperty, value);
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (15)
115previousBlock.Reposition(previousBlock.ContentStart, secondParagraphOrBlockUIContainer.ElementEnd);
135firstParagraphOrBlockUIContainer.Reposition(firstParagraphOrBlockUIContainer.ContentStart, secondParagraphOrBlockUIContainer.ElementEnd);
158precedingListItem.Reposition(precedingListItem.ContentStart, followingListItem.ElementEnd);
227precedingList.Reposition(precedingList.ContentStart, followingList.ElementEnd);
356leadingListItem.Reposition(leadingListItem.ContentStart, lastListItem.ElementEnd);
379if (listItem.ContentStart.CompareTo(listItem.ContentEnd) == 0)
381TextRangeEditTables.EnsureInsertionPosition(listItem.ContentStart);
425leadingListItem.Reposition(leadingListItem.ContentStart, indentedList.ElementEnd);
435lastListItem.Reposition(lastListItem.ContentStart, nestedListOfLastItem.ElementStart);
515if (outerListItem.ContentStart.CompareTo(firstListItem.ElementStart) == 0)
523outerListItem.Reposition(outerListItem.ContentStart, firstListItem.ElementStart);
538lastListItem.Reposition(lastListItem.ContentStart, outerListItemEnd);
565if (listItem.ContentStart.CompareTo(listItem.ContentEnd) == 0)
567TextRangeEditTables.EnsureInsertionPosition(listItem.ContentStart);
717if (!UnindentListItems(new TextRange(endListItem.List.ContentStart, GetPositionAfterList(endListItem.List))))
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (42)
385anchorRow != null ? anchorRow.ContentStart : anchorPosition,
392movingRow != null ? movingRow.ContentStart : movingPosition,
464movingPosition = anchorCell.ContentStart.GetInsertionPosition();
537movingPosition = movingCell.ContentStart.GetInsertionPosition();
549movingPosition = anchorCell.Table.ContentStart;
573row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward);
605row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward);
831position = tableRowGroup.ContentStart;
840position = tableRow.ContentStart;
849position = tableCell.ContentStart;
858position = listItem.ContentStart;
911insertionPosition = implicitRun.ContentStart.GetFrozenPointer(position.LogicalDirection); // return a position with the same orientation inside a Run
926insertionPosition = implicitRun.ContentStart.GetFrozenPointer(position.LogicalDirection); // return a position with the same orientation inside a Run
1027TextRange rowsSegment = new TextRange(startRow.ContentStart, endRow.ContentEnd);
1045TextRange rowsSegment = new TextRange(startRow.ContentStart, startRow.Table.ContentEnd);
1058TextRange rowsSegment = new TextRange(endRow.Table.ContentStart, endRow.ContentEnd);
1142cell.ContentStart.TextContainer.SetValue(cell.ContentStart, TableCell.RowSpanProperty, cell.RowSpan + (rowCount > 0 ? rowCount : -rowCount));
1210return rowCount > 0 ? new TextRange(firstInsertedRow.ContentStart, lastInsertedRow.ContentEnd) : new TextRange(lastInsertedRow.ContentStart, firstInsertedRow.ContentEnd);
1325spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - deletedRowsCount);
1338newCell.ContentStart.TextContainer.SetValue(newCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - (nextRow.Index - spannedCell.Row.Index));
1409cellInsertAfter.ContentStart.TextContainer.SetValue(cellInsertAfter.ContentStart, TableCell.ColumnSpanProperty, cellInsertAfter.ColumnSpan + 1);
1520cellDelete.ContentStart.TextContainer.SetValue(cellDelete.ContentStart, TableCell.ColumnSpanProperty, cellDelete.ColumnSpan - 1);
1770IParentUndoUnit columnResizeUndoUnit = new ColumnResizeUndoUnit(table.ContentStart, columnIndex, _columnWidths, dx);
1926startCell.ContentStart.TextContainer.SetValue(startCell.ContentStart, TableCell.ColumnSpanProperty, startCell.ColumnSpan - 1);
1940return new TextRange(startCell.ContentStart, startCell.ContentStart);
1993TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward);
2452firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.RowSpanProperty, rowSpan);
2454firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.ColumnSpanProperty, columnSpan);
2455result = new TextRange(firstCell.ContentStart, firstCell.ContentStart);
2485spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, rowSpan);