Refactor to a more generic unobstrusive approach

This commit is contained in:
jpirnay
2026-03-27 17:06:30 +01:00
parent 3f8a87e907
commit a51fd3953d
3 changed files with 8 additions and 6 deletions
+3
View File
@@ -31,6 +31,8 @@ class Epub {
std::vector<std::string> cssFiles;
// -1 unknown, 0 unreliable, 1 reliable
mutable int tocReliabilityState = -1;
// Library-level option: app code can override this per-book instance.
bool syntheticTocFallbackEnabled = false;
bool findContentOpfFile(std::string* contentOpfFile) const;
bool parseContentOpf(BookMetadataCache::BookMetadata& bookMetadata);
@@ -69,6 +71,7 @@ class Epub {
int getSpineIndexForTocIndex(int tocIndex) const;
int getTocIndexForSpineIndex(int spineIndex) const;
bool hasReliableToc() const;
void setSyntheticTocFallbackEnabled(bool enabled) { syntheticTocFallbackEnabled = enabled; }
size_t getCumulativeSpineItemSize(int spineIndex) const;
int getSpineIndexForTextReference() const;