Lines Matching refs:fParagraphIndex

128         const TextLine& cLine = fLines[cursor.fParagraphIndex];
152 if (pos.fParagraphIndex < fLines.size()) {
153 fLines[pos.fParagraphIndex].fText.insert(pos.fTextByteIndex, utf8Text, byteLen);
154 this->markDirty(&fLines[pos.fParagraphIndex]);
156 SkASSERT(pos.fParagraphIndex == fLines.size());
160 pos = Editor::TextPosition{pos.fTextByteIndex + byteLen, pos.fParagraphIndex};
161 size_t newlinecount = count_char(fLines[pos.fParagraphIndex].fText, '\n');
163 StringSlice src = std::move(fLines[pos.fParagraphIndex].fText);
164 std::vector<TextLine>::const_iterator next = fLines.begin() + pos.fParagraphIndex + 1;
166 TextLine* line = &fLines[pos.fParagraphIndex];
180 if (start == end || start.fParagraphIndex == fLines.size()) {
184 if (start.fParagraphIndex == end.fParagraphIndex) {
186 fLines[start.fParagraphIndex].fText.remove(
188 this->markDirty(&fLines[start.fParagraphIndex]);
190 SkASSERT(end.fParagraphIndex < fLines.size());
191 auto& line = fLines[start.fParagraphIndex];
195 fLines[end.fParagraphIndex].fText.begin() + end.fTextByteIndex,
196 fLines[end.fParagraphIndex].fText.size() - end.fTextByteIndex);
198 fLines.erase(fLines.begin() + start.fParagraphIndex + 1,
199 fLines.begin() + end.fParagraphIndex + 1);
219 if (start == end || start.fParagraphIndex == fLines.size()) {
222 if (start.fParagraphIndex == end.fParagraphIndex) {
224 auto& str = fLines[start.fParagraphIndex].fText;
229 SkASSERT(end.fParagraphIndex < fLines.size());
230 const std::vector<TextLine>::const_iterator firstP = fLines.begin() + start.fParagraphIndex;
231 const std::vector<TextLine>::const_iterator lastP = fLines.begin() + end.fParagraphIndex;
285 if (pos.fParagraphIndex >= fLines.size()) {
286 pos.fParagraphIndex = fLines.size() - 1;
287 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size();
289 pos.fTextByteIndex = align_column(fLines[pos.fParagraphIndex].fText, pos.fTextByteIndex);
292 SkASSERT(pos.fParagraphIndex < fLines.size());
293 SkASSERT(pos.fTextByteIndex <= fLines[pos.fParagraphIndex].fText.size());
295 SkASSERT(pos.fTextByteIndex == fLines[pos.fParagraphIndex].fText.size() ||
296 !is_utf8_continuation(fLines[pos.fParagraphIndex].fText.begin()[pos.fTextByteIndex]));
303 if (pos.fParagraphIndex > 0) {
304 --pos.fParagraphIndex;
305 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size();
308 const auto& str = fLines[pos.fParagraphIndex].fText;
314 if (fLines[pos.fParagraphIndex].fText.size() == pos.fTextByteIndex) {
315 if (pos.fParagraphIndex + 1 < fLines.size()) {
316 ++pos.fParagraphIndex;
320 const auto& str = fLines[pos.fParagraphIndex].fText;
327 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets;
334 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets;
339 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size();
345 SkASSERT(pos.fTextByteIndex < fLines[pos.fParagraphIndex].fCursorPos.size());
346 float x = fLines[pos.fParagraphIndex].fCursorPos[pos.fTextByteIndex].left();
347 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets;
352 pos.fTextByteIndex = find_closest_x(fLines[pos.fParagraphIndex].fCursorPos, x,
355 } else if (pos.fParagraphIndex > 0) {
356 --pos.fParagraphIndex;
357 const auto& newLine = fLines[pos.fParagraphIndex];
369 align_column(fLines[pos.fParagraphIndex].fText, pos.fTextByteIndex);
374 const std::vector<size_t>& list = fLines[pos.fParagraphIndex].fLineEndOffsets;
375 float x = fLines[pos.fParagraphIndex].fCursorPos[pos.fTextByteIndex].left();
379 const auto& bounds = fLines[pos.fParagraphIndex].fCursorPos;
383 } else if (pos.fParagraphIndex + 1 < fLines.size()) {
384 ++pos.fParagraphIndex;
385 const auto& bounds = fLines[pos.fParagraphIndex].fCursorPos;
386 const std::vector<size_t>& l2 = fLines[pos.fParagraphIndex].fLineEndOffsets;
390 pos.fTextByteIndex = fLines[pos.fParagraphIndex].fText.size();
393 align_column(fLines[pos.fParagraphIndex].fText, pos.fTextByteIndex);
402 const std::vector<bool>& words = fLines[pos.fParagraphIndex].fWordBoundaries;
403 SkASSERT(words.size() == fLines[pos.fParagraphIndex].fText.size());
411 const StringSlice& text = fLines[pos.fParagraphIndex].fText;
416 const std::vector<bool>& words = fLines[pos.fParagraphIndex].fWordBoundaries;
443 SkASSERT(pos.fParagraphIndex < fLines.size());
444 const TextLine& l = fLines[pos.fParagraphIndex];