| 676 | } |
| 677 | |
| 678 | void TextBox::set_text_direction_between(size_t paragraphIndex1, size_t paragraphIndex2, skia::textlayout::TextDirection newDirection) { |
| 679 | auto [start, end] = get_start_end_paragraph_pos(paragraphIndex1, paragraphIndex2); |
| 680 | bool anythingChanged = false; |
| 681 | for(size_t i = start; i <= end; i++) { |
| 682 | if(paragraphs[i].pStyleData.textDirection != newDirection) { |
| 683 | anythingChanged = true; |
| 684 | paragraphs[i].pStyleData.textDirection = newDirection; |
| 685 | } |
| 686 | } |
| 687 | if(anythingChanged) { |
| 688 | needsRebuild = true; |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | ParagraphStyleData TextBox::get_paragraph_style_data_at(size_t paragraphIndex) { |
| 693 | return paragraphs[std::min(paragraphIndex, paragraphs.size() - 1)].pStyleData; |
no outgoing calls
no test coverage detected