Use shared IDML page reference writer

This commit is contained in:
Dylan M. Taylor committed 2026-11-13 09:23:32 -05:00
1 parent c74cf007d0
commit a9c4253e57
3 files changed
+30 -37

No files matched your search

Generated
+26 -26
View File
@@ -1242,10 +1242,10 @@ dependencies = [
[[package]]
name = "craft-idml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d695aa6ff#d695aa6fff542586d49d50e406bceb5b6e5f3452"
source = "git+https://github.com/storytold/craft-libs?rev=49e7d09ea#49e7d09ea23e3c209f98cfc336ed030d2b6bccac"
dependencies = [
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=d695aa6ff)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=d695aa6ff)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=49e7d09ea)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=49e7d09ea)",
"thiserror 2.0.21",
]
@@ -1653,6 +1653,15 @@ dependencies = [
"thiserror 2.0.21",
]
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=49e7d09ea#49e7d09ea23e3c209f98cfc336ed030d2b6bccac"
dependencies = [
"quick-xml 0.41.0",
"thiserror 2.0.21",
]
[[package]]
name = "craft-xml"
version = "0.1.0"
@@ -1680,15 +1689,6 @@ dependencies = [
"thiserror 2.0.21",
]
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d695aa6ff#d695aa6fff542586d49d50e406bceb5b6e5f3452"
dependencies = [
"quick-xml 0.41.0",
"thiserror 2.0.21",
]
[[package]]
name = "craft-xml"
version = "0.1.0"
@@ -1717,6 +1717,16 @@ dependencies = [
"thiserror 2.0.21",
]
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=49e7d09ea#49e7d09ea23e3c209f98cfc336ed030d2b6bccac"
dependencies = [
"flate2",
"thiserror 2.0.21",
"zip 9.1.1",
]
[[package]]
name = "craft-zip"
version = "0.1.0"
@@ -1747,16 +1757,6 @@ dependencies = [
"zip 9.1.1",
]
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=d695aa6ff#d695aa6fff542586d49d50e406bceb5b6e5f3452"
dependencies = [
"flate2",
"thiserror 2.0.21",
"zip 9.1.1",
]
[[package]]
name = "craft-zip"
version = "0.1.0"
@@ -2021,7 +2021,7 @@ dependencies = [
"craft-prepress",
"craft-print",
"craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=cc23ffd4d26f3074808e2187d332564817624f8f)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=d695aa6ff)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=49e7d09ea)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f23b0f33f0d00b157476533a43cbbcfd901aa1f1)",
"designcraft-color",
"designcraft-compose",
@@ -2103,9 +2103,9 @@ name = "designcraft-idml"
version = "0.20.1"
dependencies = [
"craft-file-formats",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=d695aa6ff)",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=49e7d09ea)",
"craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=cc23ffd4d26f3074808e2187d332564817624f8f)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=d695aa6ff)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=49e7d09ea)",
"designcraft-color",
"designcraft-compose",
"designcraft-doc",
@@ -2222,7 +2222,7 @@ version = "0.20.1"
dependencies = [
"craft-docx",
"craft-file-formats",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=d695aa6ff)",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=49e7d09ea)",
"craft-rtf",
"craft-wordmodel",
"craft-xlsx",
+2 -2
View File
@@ -16,10 +16,10 @@ craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "4052591363
craft-designcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "93d0998383aa150fa50a2ffbf49ef37786e37eca", version = "=0.1.0" }
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
craft-epub = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
craft-idml = { git = "https://github.com/storytold/craft-libs", rev = "d695aa6ff", version = "=0.1.0" }
craft-idml = { git = "https://github.com/storytold/craft-libs", rev = "49e7d09ea", version = "=0.1.0" }
craft-indd = { git = "https://github.com/storytold/craft-libs", rev = "47bf5650b0d503b97bfb5e841746c4957897d11f", version = "=0.1.0" }
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "cc23ffd4d26f3074808e2187d332564817624f8f", version = "=0.1.0", features = ["tree-render", "tree-text"] }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "d695aa6ff", version = "=0.1.0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "49e7d09ea", version = "=0.1.0" }
craft-xml-dtd = { package = "craft-xml", git = "https://github.com/storytold/craft-libs", rev = "f23b0f33f0d00b157476533a43cbbcfd901aa1f1", version = "=0.1.0" }
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
+2 -9
View File
@@ -165,15 +165,8 @@ impl<'a> Ex<'a> {
}
};
if let Some(kind) = kind {
let mut el = El::new("PageReference")
.attr("Self", self.fresh())
.attr("PageReferenceType", kind)
.attr("ReferencedTopic", topic_self(&r.topics))
.attr("Id", k + 1);
if let Some(n) = limit {
el.set("PageReferenceLimit", n);
}
return Some(el);
let model = craft_idml::model::PageReference::to_el(&self.fresh(), kind, &topic_self(&r.topics), k + 1, limit);
return Some(crate::xml::from_craft(model));
}
}
None