MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (35)
123ITextPointer invalidateEnd = _segments[endSeg].Segment.End;
174ITextPointer invalidateEnd = _segments[endSeg].Segment.End;
202ITextPointer invalidateEnd = _segments[endSeg].Segment.End;
252if ((highlightSegment.Segment.End.CompareTo(textPosition) > 0) ||
253((highlightSegment.Segment.End.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward)))
358if (highlightSegment.Segment.End.CompareTo(rangeSegment.Start) > 0)
363IList<HighlightSegment> res = highlightSegment.Split(rangeSegment.Start, rangeSegment.End, highlightRange);
374if (rangeSegment.End.CompareTo(highlightSegment.Segment.End) <= 0)
379(rangeSegment.End.CompareTo(rangeEnumerator.Current.Start) <= 0),
386rangeSegment = new TextSegment(highlightSegment.Segment.End, rangeSegment.End);
405if (rangeSegment.End.CompareTo(highlightSegment.Segment.Start) > 0)
412rangeSegment = new TextSegment(highlightSegment.Segment.Start, rangeSegment.End);
418_segments.Insert(ind++, new HighlightSegment(rangeSegment.Start, rangeSegment.End, highlightRange));
430_segments.Insert(ind++, new HighlightSegment(rangeSegment.Start, rangeSegment.End, highlightRange));
436_segments.Insert(ind++, new HighlightSegment(rangeEnumerator.Current.Start, rangeEnumerator.Current.End, highlightRange));
443invalidateEnd = _segments[ind].Segment.End;
459if (pos.CompareTo(highlightSegment.Segment.End) < 0)
460return highlightSegment.Segment.End;
481if (pos.CompareTo(highlightSegment.Segment.End) <= 0)
488return highlightSegment.Segment.End;
505if (highlightSegment.Segment.End.CompareTo(end) == 0)
763if ((ps.CompareTo(_segment.Start) == 0) || (ps.CompareTo(_segment.End) == 0))
766((ps.CompareTo(_segment.End) == 0) && (side == LogicalDirection.Backward)))
776res.Add(new HighlightSegment(ps, _segment.End, _owners));
799if ((_segment.Start.CompareTo(ps1) > 0) || (_segment.End.CompareTo(ps1) < 0))
810if (_segment.End.CompareTo(ps1) > 0)
812res.Add(new HighlightSegment(ps1, _segment.End, _owners));
857(res[0].Segment.End.CompareTo(ps2) == 0))
952pageGeometry = view.GetTightBoundingGeometryFromTextPositions(segment.Start, segment.End);
989while (cursor.CompareTo(_segment.End) < 0)
1006CloseSegment(ref segmentStart, cursor, _segment.End);
1024CloseSegment(ref segmentStart, cursor, _segment.End);
1045CloseSegment(ref segmentStart, cursor, _segment.End);
MS\Internal\Annotations\TextAnchor.cs (39)
53_segments.Add(new TextSegment(segment.Start, segment.End));
176(_segments[i].End.CompareTo(other._segments[i].End) != 0))
207if (theirSegment.Start.CompareTo(theirSegment.End) == 0)
221if ((ourSegment.End.CompareTo(theirSegment.End) == 0) &&
222(theirSegment.End.LogicalDirection == LogicalDirection.Backward))
227if (ourSegment.Start.CompareTo(theirSegment.End) >= 0)
234if (ourSegment.End.CompareTo(theirSegment.Start) <= 0)
292Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
299if (current.Start.CompareTo(otherSegment.End) >= 0)
309if (current.End.CompareTo(otherSegment.End) <= 0)
318anchor._segments[currentIndex] = CreateNormalizedSegment(otherSegment.End, current.End);
329if (current.End.CompareTo(otherSegment.Start) > 0)
334if (current.End.CompareTo(otherSegment.End) > 0)
337anchor._segments.Insert(currentIndex + 1, CreateNormalizedSegment(otherSegment.End, current.End));
394Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
400if (currentSegment.Start.CompareTo(otherSegment.End) >= 0)
407if (currentSegment.End.CompareTo(otherSegment.Start) <= 0)
420anchor._segments[current] = CreateNormalizedSegment(otherSegment.Start, currentSegment.End);
427if (currentSegment.End.CompareTo(otherSegment.End) > 0)
429anchor._segments[current] = CreateNormalizedSegment(currentSegment.Start, otherSegment.End);
431anchor._segments.Insert(current + 1, CreateNormalizedSegment(otherSegment.End, currentSegment.End));
435else if (currentSegment.End.CompareTo(otherSegment.End) == 0)
519return _segments.Count > 0 ? _segments[_segments.Count - 1].End : null;
531return (_segments.Count == 1 && (object)_segments[0].Start == (object)_segments[0].End);
548textBuffer.Append(TextRangeBase.GetTextInternal(_segments[i].Start, _segments[i].End));
603if (segment.Start.CompareTo(segment.End) >= 0)
635if (i > 0 && newSegment.Start.CompareTo(_segments[i - 1].End) < 0)
639if (i < _segments.Count && newSegment.End.CompareTo(_segments[i].Start) > 0)
796return x.End.CompareTo(y.End);
System\Windows\Documents\TextRange.cs (4)
1634TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);
1638TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);
1643TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);
1660TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);