| 475 | } |
| 476 | |
| 477 | KTextEditor::Range TextDocument::textSelection() const |
| 478 | { |
| 479 | Q_D(const TextDocument); |
| 480 | |
| 481 | if (!d->document) { |
| 482 | return KTextEditor::Range::invalid(); |
| 483 | } |
| 484 | |
| 485 | KTextEditor::View *view = activeTextView(); |
| 486 | |
| 487 | if (view && view->selection()) { |
| 488 | return view->selectionRange(); |
| 489 | } |
| 490 | |
| 491 | return PartDocument::textSelection(); |
| 492 | } |
| 493 | |
| 494 | QString TextDocument::text(const KTextEditor::Range &range) const |
| 495 | { |
no test coverage detected