mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-14 22:42:46 +00:00
fix(docx): preserve Normal inference compatibility
This commit is contained in:
1 parent
6beefd7e95
commit
6d19bb44f3
2 files changed
+2
-2
No files matched your search
@@ -127,7 +127,7 @@ impl Reader<'_> {
|
||||
// doesn't nominate another style. Keep that fact for an explicitly declared
|
||||
// Normal; the gallery later synthesizes a visually identical Normal when the
|
||||
// file did not declare one, and that synthetic style is not source provenance.
|
||||
normal_is_default = Some(s.attr("w:default").is_none_or(|value| !matches!(value.trim(), "0" | "false" | "off" | "False" | "FALSE")));
|
||||
normal_is_default = Some(s.attr("w:default").is_none());
|
||||
}
|
||||
let name = s.child_val("w:name").map(ui_style_name).unwrap_or_else(|| id.clone());
|
||||
let r = |n: &str| s.child_val(n).filter(|v| !v.is_empty()).map(|v| self.pc.style_id(v));
|
||||
|
||||
@@ -538,7 +538,7 @@ impl StyleSheet {
|
||||
latent_styles: None,
|
||||
};
|
||||
let mut add = |st: Style| s.styles.push(st);
|
||||
add(Style { id: "Normal".into(), name: "Normal".into(), priority: Some(0), quick: true, default: true, ..p_style() });
|
||||
add(Style { id: "Normal".into(), name: "Normal".into(), priority: Some(0), quick: true, ..p_style() });
|
||||
add(Style {
|
||||
id: "DefaultParagraphFont".into(),
|
||||
name: "Default Paragraph Font".into(),
|
||||
|
||||
Reference in new issue
Block a user