Пример #1
0
        public int CopyFollowingLineBreaks(ITextProvider textProvider, int position)
        {
            int lineBreakCount     = Whitespace.LineBreaksAfterPosition(textProvider, position);
            int recentlyAddedCount = RecentlyAddedLineBreakCount();
            int breaks             = lineBreakCount - recentlyAddedCount;

            for (int i = 0; i < breaks; i++)
            {
                HardLineBreak();
            }

            return(breaks);
        }
Пример #2
0
        public int CopyPrecedingLineBreaks(ITextIterator iterator, int position)
        {
            int lineBreakCount     = Whitespace.LineBreaksBeforePosition(iterator, position);
            int recentlyAddedCount = RecentlyAddedLineBreakCount();
            int breaks             = lineBreakCount - recentlyAddedCount;

            for (int i = 0; i < breaks; i++)
            {
                HardLineBreak();
            }

            return(breaks);
        }
Пример #3
0
        public int CopyFollowingLineBreaks(ITextIterator iterator, int position)
        {
            var lineBreakCount     = Whitespace.LineBreaksAfterPosition(iterator, position);
            var recentlyAddedCount = RecentlyAddedLineBreakCount();
            var breaks             = lineBreakCount - recentlyAddedCount;

            for (var i = 0; i < breaks; i++)
            {
                HardLineBreak();
            }

            return(breaks);
        }
Пример #4
0
 private int RecentlyAddedLineBreakCount()
 {
     return(Whitespace.LineBreaksBeforePosition(new StringBuilderIterator(_formattedText), _formattedText.Length));
 }