MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (35)
130ITextPointer invalidateEnd = _segments[endSeg].Segment.End;
181ITextPointer invalidateEnd = _segments[endSeg].Segment.End;
209ITextPointer invalidateEnd = _segments[endSeg].Segment.End;
259if ((highlightSegment.Segment.End.CompareTo(textPosition) > 0) ||
260((highlightSegment.Segment.End.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward)))
365if (highlightSegment.Segment.End.CompareTo(rangeSegment.Start) > 0)
370IList<HighlightSegment> res = highlightSegment.Split(rangeSegment.Start, rangeSegment.End, highlightRange);
381if (rangeSegment.End.CompareTo(highlightSegment.Segment.End) <= 0)
386(rangeSegment.End.CompareTo(rangeEnumerator.Current.Start) <= 0),
393rangeSegment = new TextSegment(highlightSegment.Segment.End, rangeSegment.End);
412if (rangeSegment.End.CompareTo(highlightSegment.Segment.Start) > 0)
419rangeSegment = new TextSegment(highlightSegment.Segment.Start, rangeSegment.End);
425_segments.Insert(ind++, new HighlightSegment(rangeSegment.Start, rangeSegment.End, highlightRange));
437_segments.Insert(ind++, new HighlightSegment(rangeSegment.Start, rangeSegment.End, highlightRange));
443_segments.Insert(ind++, new HighlightSegment(rangeEnumerator.Current.Start, rangeEnumerator.Current.End, highlightRange));
450invalidateEnd = _segments[ind].Segment.End;
466if (pos.CompareTo(highlightSegment.Segment.End) < 0)
467return highlightSegment.Segment.End;
488if (pos.CompareTo(highlightSegment.Segment.End) <= 0)
495return highlightSegment.Segment.End;
512if (highlightSegment.Segment.End.CompareTo(end) == 0)
770if ((ps.CompareTo(_segment.Start) == 0) || (ps.CompareTo(_segment.End) == 0))
773((ps.CompareTo(_segment.End) == 0) && (side == LogicalDirection.Backward)))
783res.Add(new HighlightSegment(ps, _segment.End, _owners));
806if ((_segment.Start.CompareTo(ps1) > 0) || (_segment.End.CompareTo(ps1) < 0))
817if (_segment.End.CompareTo(ps1) > 0)
819res.Add(new HighlightSegment(ps1, _segment.End, _owners));
864(res[0].Segment.End.CompareTo(ps2) == 0))
959pageGeometry = view.GetTightBoundingGeometryFromTextPositions(segment.Start, segment.End);
996while (cursor.CompareTo(_segment.End) < 0)
1013CloseSegment(ref segmentStart, cursor, _segment.End);
1031CloseSegment(ref segmentStart, cursor, _segment.End);
1052CloseSegment(ref segmentStart, cursor, _segment.End);
MS\Internal\Annotations\TextAnchor.cs (39)
56_segments.Add(new TextSegment(segment.Start, segment.End));
179(_segments[i].End.CompareTo(other._segments[i].End) != 0))
210if (theirSegment.Start.CompareTo(theirSegment.End) == 0)
224if ((ourSegment.End.CompareTo(theirSegment.End) == 0) &&
225(theirSegment.End.LogicalDirection == LogicalDirection.Backward))
230if (ourSegment.Start.CompareTo(theirSegment.End) >= 0)
237if (ourSegment.End.CompareTo(theirSegment.Start) <= 0)
295Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
302if (current.Start.CompareTo(otherSegment.End) >= 0)
312if (current.End.CompareTo(otherSegment.End) <= 0)
321anchor._segments[currentIndex] = CreateNormalizedSegment(otherSegment.End, current.End);
332if (current.End.CompareTo(otherSegment.Start) > 0)
337if (current.End.CompareTo(otherSegment.End) > 0)
340anchor._segments.Insert(currentIndex + 1, CreateNormalizedSegment(otherSegment.End, current.End));
397Invariant.Assert(otherSegment.Equals(TextSegment.Null) || otherSegment.Equals(enumerator.Current) || otherSegment.End.CompareTo(enumerator.Current.Start) <= 0, "TextSegments are overlapping or not ordered.");
403if (currentSegment.Start.CompareTo(otherSegment.End) >= 0)
410if (currentSegment.End.CompareTo(otherSegment.Start) <= 0)
423anchor._segments[current] = CreateNormalizedSegment(otherSegment.Start, currentSegment.End);
430if (currentSegment.End.CompareTo(otherSegment.End) > 0)
432anchor._segments[current] = CreateNormalizedSegment(currentSegment.Start, otherSegment.End);
434anchor._segments.Insert(current + 1, CreateNormalizedSegment(otherSegment.End, currentSegment.End));
438else if (currentSegment.End.CompareTo(otherSegment.End) == 0)
522return _segments.Count > 0 ? _segments[_segments.Count - 1].End : null;
534return (_segments.Count == 1 && (object)_segments[0].Start == (object)_segments[0].End);
551textBuffer.Append(TextRangeBase.GetTextInternal(_segments[i].Start, _segments[i].End));
606if (segment.Start.CompareTo(segment.End) >= 0)
638if (i > 0 && newSegment.Start.CompareTo(_segments[i - 1].End) < 0)
642if (i < _segments.Count && newSegment.End.CompareTo(_segments[i].Start) > 0)
799return x.End.CompareTo(y.End);
System\Windows\Documents\TextRange.cs (4)
1644TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);
1648TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);
1653TextRangeEdit.SetInlineProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);
1670TextRangeEdit.SetParagraphProperty((TextPointer)textSegment.Start, (TextPointer)textSegment.End, formattingProperty, value, propertyValueAction);