| 25 | } // namespace |
| 26 | |
| 27 | uint32_t Section::onPageComplete(std::unique_ptr<Page> page) { |
| 28 | if (!file) { |
| 29 | LOG_ERR("SCT", "File not open for writing page %d", pageCount); |
| 30 | return 0; |
| 31 | } |
| 32 | |
| 33 | const uint32_t position = file.position(); |
| 34 | if (!page->serialize(file)) { |
| 35 | LOG_ERR("SCT", "Failed to serialize page %d", pageCount); |
| 36 | return 0; |
| 37 | } |
| 38 | LOG_DBG("SCT", "Page %d processed", pageCount); |
| 39 | |
| 40 | pageCount++; |
| 41 | return position; |
| 42 | } |
| 43 | |
| 44 | void Section::writeSectionFileHeader(const int fontId, const float lineCompression, const bool extraParagraphSpacing, |
| 45 | const uint8_t paragraphAlignment, const uint16_t viewportWidth, |
no test coverage detected