| 331 | } |
| 332 | |
| 333 | std::string Section::getTextFromSectionFile() { |
| 334 | std::string fullText; |
| 335 | auto p = this->loadPageFromSectionFile(); |
| 336 | if (p) { |
| 337 | for (const auto& el : p->elements) { |
| 338 | if (el->getTag() == TAG_PageLine) { |
| 339 | const auto& line = static_cast<const PageLine&>(*el); |
| 340 | if (line.getBlock()) { |
| 341 | const auto& words = line.getBlock()->getWords(); |
| 342 | for (const auto& w : words) { |
| 343 | if (!fullText.empty()) fullText += " "; |
| 344 | fullText += w; |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | return fullText; |
| 351 | } |
| 352 | |
| 353 | std::optional<uint16_t> Section::getCachedPageCount() const { |
| 354 | HalFile f; |
no test coverage detected