| 90 | } |
| 91 | |
| 92 | std::string TextData::get_plain_text() const { |
| 93 | if(paragraphs.empty()) |
| 94 | return ""; |
| 95 | std::string toRet; |
| 96 | for(auto& p : paragraphs) { |
| 97 | toRet += p.text; |
| 98 | toRet += '\n'; |
| 99 | } |
| 100 | toRet.pop_back(); |
| 101 | return toRet; |
| 102 | } |
| 103 | |
| 104 | bool TextPosition::operator<(const TextPosition& o) const { |
| 105 | return (this->fParagraphIndex < o.fParagraphIndex) || (this->fParagraphIndex == o.fParagraphIndex && this->fTextByteIndex < o.fTextByteIndex); |
no test coverage detected