blob: b543e5a96e3840f558fc7e697d9f9ce3259f2054 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From 9041ef42f9e0a5c4bc3b0a912d36683c4e10ca84 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Tue, 8 Aug 2017 17:39:18 +0200
Subject: [PATCH 3/3] EPUBHTMLManager: fix value of <navPoint playOrder"...">
<http://www.niso.org/workrooms/daisy/Z39-86-2005.html#NCXplay> "8.4.3
playOrder Attribute" says:
playOrder is a positive integer; the first playOrder value in a document
shall be 1.
So instead of writing an empty attribute, write the same number that's
already used for <navPoint id="...">.
---
src/lib/EPUBHTMLManager.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lib/EPUBHTMLManager.cpp b/src/lib/EPUBHTMLManager.cpp
index e5add82..03dbf21 100644
--- a/src/lib/EPUBHTMLManager.cpp
+++ b/src/lib/EPUBHTMLManager.cpp
@@ -75,7 +75,9 @@ void EPUBHTMLManager::writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath)
id << "section" << (i + 1);
navPointAttrs.insert("id", id.str().c_str());
navPointAttrs.insert("class", "document");
- navPointAttrs.insert("playOrder", "");
+ std::ostringstream playOrder;
+ playOrder << (i + 1);
+ navPointAttrs.insert("playOrder", playOrder.str().c_str());
sink.openElement("navPoint", navPointAttrs);
sink.openElement("navLabel");
sink.openElement("text");
--
2.12.3
|