mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-27 02:23:56 +00:00
Merge pull request #4219 from ovezthaking/fix/builtin-styles-bcs-ics-4198
fix(styles): pair w:bCs and w:iCs with w:b and w:i in built-in styles (#4198)
This commit is contained in:
@@ -336,6 +336,7 @@ Ranked, to beta (detail and remaining milestones in [docs/roadmap.md](docs/roadm
|
||||
- 2026-10-28: A window restored to a place no monitor covers now opens centred on the primary monitor. Before, a monitor replaced by one of the same size left the window off screen, and the app seemed to close as soon as it started.
|
||||
- 2026-10-29: Built-in citation refresh indexes source tags and bibliography numbers for each operation (#4888). Existing ordering, duplicate-tag first matches and saved sources remain unchanged.
|
||||
- 2026-10-25: Select Recipients detects comma, semicolon and tab separators across quoted multiline headers. Quoted punctuation and doubled quotes stay in their cells; detection stops at the first unquoted record boundary. Existing tie preferences and parsing behavior remain unchanged.
|
||||
- 2026-10-25: Built-in styles and table styles write `w:bCs` beside `w:b` and `w:iCs` beside `w:i` in `word/styles.xml`, and `styles.modify` sets complex-script bold and italic alongside Latin when not given separately, so Arabic and Hebrew table headers and styled emphasis open bold or italic in Word and LibreOffice (#4198).
|
||||
|
||||
- 2026-10-22: View › Window › New Window opens a second window on the document (desktop). The windows are titled `Name:1` and `Name:2` and each keeps its own caret, scroll position, zoom and view; edits and Undo are the document's and show in both. Closing one of them asks nothing; the last one asks about unsaved changes, and quitting asks once per document.
|
||||
- 2026-10-22: One native window per open document on the desktop. File › New and Open (from the ribbon, File, shortcuts, the file manager, the command line or the control channel) open the document in a window of its own, focused and placed a step below and right of the last one; opening a file replaces a blank document nobody has used in its own window, and a file that is already open brings its window to the front. Each window keeps its own ribbon tab, File page, dialogs, panes, scroll position and composition. View › Window › Switch Windows lists the windows and brings the chosen one forward. File › Close and a window's close button close that window, asking about unsaved changes first; the last window stays open with no document. Quitting asks about each document with unsaved changes in its own window, and Cancel keeps everything open. The control channel's input and screenshots go to the window focused last. The web app keeps one window.
|
||||
@@ -1070,6 +1071,7 @@ MATH glyphs that reference the same construction now share its immutable variant
|
||||
| 2026-10-27 | trivial | Preserve #4249 complete-record CSV delimiter detection and its regressions in the mailings modules; recipient commands, limits and refusal behavior unchanged. |
|
||||
| 2026-10-26 | trivial | Integrate #4249 with current-main CSV helpers, preserving logical-record detection, existing recipient limits and refusal behavior. |
|
||||
| 2026-10-25 | trivial | Recipient CSV delimiter detection reads the first complete record, including quoted line breaks and doubled quotes; separator ties and cell parsing remain unchanged. Original parser and CLI import/save/reopen checks; readiness estimates unchanged. |
|
||||
| 2026-10-25 | trivial | Progress log: built-in styles and table styles write `w:bCs` beside `w:b` and `w:iCs` beside `w:i` (#4198) |
|
||||
| 2026-10-22 | trivial | Progress log: one native window per open document |
|
||||
| 2026-10-22 | trivial | Progress log: every open document keeps its own recovery copy |
|
||||
| 2026-10-22 | trivial | Progress log: several open documents in the desktop window |
|
||||
|
||||
@@ -187,6 +187,10 @@ sync_github_name = true
|
||||
[people.pakiat]
|
||||
display_name = "OtorO"
|
||||
|
||||
[people.ovezthaking]
|
||||
real_name = "Oliwer Urbaniak"
|
||||
sync_github_name = true
|
||||
|
||||
[people.TobyWu666]
|
||||
display_name = "tobywu"
|
||||
|
||||
|
||||
+53
-17
@@ -585,7 +585,7 @@ impl StyleSheet {
|
||||
outline_level: Some(i as u8),
|
||||
..para()
|
||||
},
|
||||
chr: CharProps { font: Some(font.into()), size: Some(size), italic, color: color(c), ..chr() },
|
||||
chr: CharProps { font: Some(font.into()), size: Some(size), italic, italic_cs: italic, color: color(c), ..chr() },
|
||||
priority: Some(9 + n as u32),
|
||||
quick: n <= 3,
|
||||
..p_style()
|
||||
@@ -623,17 +623,27 @@ impl StyleSheet {
|
||||
builtin: true,
|
||||
..Default::default()
|
||||
};
|
||||
add(c_style("SubtleEmphasis", "Subtle Emphasis", 19, CharProps { italic: Some(true), color: color(Rgb(0x40, 0x40, 0x40)), ..chr() }));
|
||||
add(c_style("Emphasis", "Emphasis", 20, CharProps { italic: Some(true), ..chr() }));
|
||||
add(c_style("IntenseEmphasis", "Intense Emphasis", 21, CharProps { italic: Some(true), color: color(HEADING_BLUE), ..chr() }));
|
||||
add(c_style("Strong", "Strong", 22, CharProps { bold: Some(true), ..chr() }));
|
||||
add(c_style(
|
||||
"SubtleEmphasis",
|
||||
"Subtle Emphasis",
|
||||
19,
|
||||
CharProps { italic: Some(true), italic_cs: Some(true), color: color(Rgb(0x40, 0x40, 0x40)), ..chr() },
|
||||
));
|
||||
add(c_style("Emphasis", "Emphasis", 20, CharProps { italic: Some(true), italic_cs: Some(true), ..chr() }));
|
||||
add(c_style(
|
||||
"IntenseEmphasis",
|
||||
"Intense Emphasis",
|
||||
21,
|
||||
CharProps { italic: Some(true), italic_cs: Some(true), color: color(HEADING_BLUE), ..chr() },
|
||||
));
|
||||
add(c_style("Strong", "Strong", 22, CharProps { bold: Some(true), bold_cs: Some(true), ..chr() }));
|
||||
add(Style {
|
||||
id: "Quote".into(),
|
||||
name: "Quote".into(),
|
||||
based_on: Some("Normal".into()),
|
||||
next: Some("Normal".into()),
|
||||
para: ParaProps { align: Some(Align::Center), space_before: Some(8.0), ..para() },
|
||||
chr: CharProps { italic: Some(true), color: color(Rgb(0x40, 0x40, 0x40)), ..chr() },
|
||||
chr: CharProps { italic: Some(true), italic_cs: Some(true), color: color(Rgb(0x40, 0x40, 0x40)), ..chr() },
|
||||
priority: Some(29),
|
||||
quick: true,
|
||||
..p_style()
|
||||
@@ -653,7 +663,7 @@ impl StyleSheet {
|
||||
borders: Some(Borders { top: Some(blue_line), bottom: Some(blue_line), ..Default::default() }),
|
||||
..para()
|
||||
},
|
||||
chr: CharProps { italic: Some(true), color: color(HEADING_BLUE), ..chr() },
|
||||
chr: CharProps { italic: Some(true), italic_cs: Some(true), color: color(HEADING_BLUE), ..chr() },
|
||||
priority: Some(30),
|
||||
quick: true,
|
||||
..p_style()
|
||||
@@ -663,9 +673,14 @@ impl StyleSheet {
|
||||
"IntenseReference",
|
||||
"Intense Reference",
|
||||
32,
|
||||
CharProps { bold: Some(true), small_caps: Some(true), spacing: Some(0.25), color: color(HEADING_BLUE), ..chr() },
|
||||
CharProps { bold: Some(true), bold_cs: Some(true), small_caps: Some(true), spacing: Some(0.25), color: color(HEADING_BLUE), ..chr() },
|
||||
));
|
||||
add(c_style(
|
||||
"BookTitle",
|
||||
"Book Title",
|
||||
33,
|
||||
CharProps { bold: Some(true), bold_cs: Some(true), italic: Some(true), italic_cs: Some(true), spacing: Some(0.25), ..chr() },
|
||||
));
|
||||
add(c_style("BookTitle", "Book Title", 33, CharProps { bold: Some(true), italic: Some(true), spacing: Some(0.25), ..chr() }));
|
||||
add(Style {
|
||||
id: "ListParagraph".into(),
|
||||
name: "List Paragraph".into(),
|
||||
@@ -685,7 +700,7 @@ impl StyleSheet {
|
||||
based_on: Some("Normal".into()),
|
||||
next: Some("Normal".into()),
|
||||
para: ParaProps { space_after: Some(10.0), line_spacing: Some(LineSpacing::Multiple(1.0)), ..para() },
|
||||
chr: CharProps { italic: Some(true), size: Some(9.0), color: color(Rgb(0x0E, 0x28, 0x41)), ..chr() },
|
||||
chr: CharProps { italic: Some(true), italic_cs: Some(true), size: Some(9.0), color: color(Rgb(0x0E, 0x28, 0x41)), ..chr() },
|
||||
priority: Some(35),
|
||||
..p_style()
|
||||
});
|
||||
@@ -925,9 +940,9 @@ fn table_styles() -> Vec<Style> {
|
||||
"Plain Table 1",
|
||||
TableStyleParts {
|
||||
borders: Some(Borders::all(thin(Rgb(0xBF, 0xBF, 0xBF)))),
|
||||
header_chr: CharProps { bold: Some(true), ..CharProps::default() },
|
||||
header_chr: CharProps { bold: Some(true), bold_cs: Some(true), ..CharProps::default() },
|
||||
band_fill: Some(Rgb(0xF2, 0xF2, 0xF2)),
|
||||
first_col_chr: CharProps { bold: Some(true), ..CharProps::default() },
|
||||
first_col_chr: CharProps { bold: Some(true), bold_cs: Some(true), ..CharProps::default() },
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
@@ -936,8 +951,8 @@ fn table_styles() -> Vec<Style> {
|
||||
"Grid Table 1 Light",
|
||||
TableStyleParts {
|
||||
borders: Some(Borders::all(thin(Rgb(0x99, 0x99, 0x99)))),
|
||||
header_chr: CharProps { bold: Some(true), ..CharProps::default() },
|
||||
first_col_chr: CharProps { bold: Some(true), ..CharProps::default() },
|
||||
header_chr: CharProps { bold: Some(true), bold_cs: Some(true), ..CharProps::default() },
|
||||
first_col_chr: CharProps { bold: Some(true), bold_cs: Some(true), ..CharProps::default() },
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
@@ -949,9 +964,9 @@ fn table_styles() -> Vec<Style> {
|
||||
TableStyleParts {
|
||||
borders: Some(Borders::all(thin(light))),
|
||||
header_fill: Some(dark),
|
||||
header_chr: CharProps { bold: Some(true), color: Some(TextColor::Rgb(Rgb::WHITE)), ..CharProps::default() },
|
||||
header_chr: CharProps { bold: Some(true), bold_cs: Some(true), color: Some(TextColor::Rgb(Rgb::WHITE)), ..CharProps::default() },
|
||||
band_fill: Some(light),
|
||||
first_col_chr: CharProps { bold: Some(true), ..CharProps::default() },
|
||||
first_col_chr: CharProps { bold: Some(true), bold_cs: Some(true), ..CharProps::default() },
|
||||
..Default::default()
|
||||
},
|
||||
));
|
||||
@@ -961,7 +976,7 @@ fn table_styles() -> Vec<Style> {
|
||||
TableStyleParts {
|
||||
borders: Some(Borders::box_(thin(dark))),
|
||||
header_fill: Some(dark),
|
||||
header_chr: CharProps { bold: Some(true), color: Some(TextColor::Rgb(Rgb::WHITE)), ..CharProps::default() },
|
||||
header_chr: CharProps { bold: Some(true), bold_cs: Some(true), color: Some(TextColor::Rgb(Rgb::WHITE)), ..CharProps::default() },
|
||||
total_border_top: Some(thin(dark)),
|
||||
..Default::default()
|
||||
},
|
||||
@@ -1113,6 +1128,7 @@ mod tests {
|
||||
assert!(s.table_style("RedGrid").is_some());
|
||||
}
|
||||
|
||||
/// Derived style ids strip non-alphanumeric characters and append a counter when taken.
|
||||
#[test]
|
||||
fn new_ids_unique() {
|
||||
let s = StyleSheet::builtin();
|
||||
@@ -1120,4 +1136,24 @@ mod tests {
|
||||
assert_eq!(s.new_id("Normal"), "Normal1");
|
||||
assert_eq!(s.new_id("!!!"), "Style");
|
||||
}
|
||||
|
||||
/// #4198: Word and LibreOffice make a complex-script (Arabic, Hebrew…) run bold or italic only
|
||||
/// through `w:bCs` / `w:iCs`, so every built-in style and table-style part that sets `bold` or
|
||||
/// `italic` sets `bold_cs` or `italic_cs` alongside it.
|
||||
#[test]
|
||||
fn builtin_styles_pair_complex_script_bold_and_italic() {
|
||||
let s = StyleSheet::builtin();
|
||||
for st in &s.styles {
|
||||
assert_eq!(st.chr.bold_cs, st.chr.bold, "{}: chr.bold", st.id);
|
||||
assert_eq!(st.chr.italic_cs, st.chr.italic, "{}: chr.italic", st.id);
|
||||
for part in TablePart::ALL {
|
||||
let f = st.table_part(part);
|
||||
assert_eq!(f.chr.bold_cs, f.chr.bold, "{} {part:?}: bold", st.id);
|
||||
assert_eq!(f.chr.italic_cs, f.chr.italic, "{} {part:?}: italic", st.id);
|
||||
}
|
||||
}
|
||||
let blue = s.get("GridTable4AccentBlue").unwrap();
|
||||
assert_eq!((blue.table_part(TablePart::FirstRow).chr.bold, blue.table_part(TablePart::FirstRow).chr.bold_cs), (Some(true), Some(true)));
|
||||
assert_eq!((blue.table_part(TablePart::FirstCol).chr.bold, blue.table_part(TablePart::FirstCol).chr.bold_cs), (Some(true), Some(true)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4635,6 +4635,29 @@ fn our_banded_table_styles_write_their_band_sizes() {
|
||||
assert_eq!(back.styles.table_style("GridTable4AccentBlue").map(|t| t.parts.band_size), Some(Some(1)));
|
||||
}
|
||||
|
||||
/// #4198: built-in styles and table styles write `w:bCs` beside `w:b` and `w:iCs` beside `w:i` in
|
||||
/// `word/styles.xml`, so Word and LibreOffice draw Arabic and Hebrew headers and emphasis bold or
|
||||
/// italic just as WordCraft does.
|
||||
#[test]
|
||||
fn builtin_styles_write_bcs_and_ics_with_b_and_i() {
|
||||
let d = Document::new();
|
||||
let xml = text(&unzip(&wordcraft_docx::write(&d).unwrap()), "word/styles.xml");
|
||||
let start = xml.find(r#"w:styleId="GridTable4AccentBlue""#).expect("Grid Table 4 – Blue is written");
|
||||
let style = &xml[start..start + xml[start..].find("</w:style>").unwrap()];
|
||||
assert!(
|
||||
style.contains(r#"<w:tblStylePr w:type="firstRow"><w:rPr><w:b/><w:bCs/><w:color w:val="FFFFFF"/></w:rPr>"#),
|
||||
"firstRow has w:bCs beside w:b: {style}"
|
||||
);
|
||||
assert!(
|
||||
style.contains(r#"<w:tblStylePr w:type="firstCol"><w:rPr><w:b/><w:bCs/></w:rPr></w:tblStylePr>"#),
|
||||
"firstCol has w:bCs beside w:b: {style}"
|
||||
);
|
||||
for rpr in xml.split("<w:rPr>").skip(1).filter_map(|s| s.split("</w:rPr>").next()) {
|
||||
assert_eq!(rpr.contains("<w:b/>"), rpr.contains("<w:bCs/>"), "unpaired w:b / w:bCs in {rpr}");
|
||||
assert_eq!(rpr.contains("<w:i/>"), rpr.contains("<w:iCs/>"), "unpaired w:i / w:iCs in {rpr}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vml_shape_wrap_side_and_anchor_case_insensitivity() {
|
||||
let body = r##"<w:p>
|
||||
|
||||
@@ -107,6 +107,7 @@ pub(super) fn create_style(s: &mut Session, v: &Value) -> CmdResult {
|
||||
Ok(json!({"id": id}))
|
||||
}
|
||||
|
||||
/// Modify a style's character and paragraph formatting, display name or next-paragraph style.
|
||||
pub(super) fn modify_style(s: &mut Session, v: &Value) -> CmdResult {
|
||||
let id = style_id(s, p::req_str(v, "style")?)?;
|
||||
let chr: Option<CharProps> = v.get("chr").map(|c| serde_json::from_value(c.clone())).transpose().map_err(|e| CmdError::Params(e.to_string()))?;
|
||||
@@ -114,8 +115,19 @@ pub(super) fn modify_style(s: &mut Session, v: &Value) -> CmdResult {
|
||||
v.get("para").map(|c| serde_json::from_value(c.clone())).transpose().map_err(|e| CmdError::Params(e.to_string()))?;
|
||||
let next = p::str(v, "next").map(str::to_string);
|
||||
let name = p::str(v, "name").map(str::to_string);
|
||||
let d = &s.doc.styles.default_chr;
|
||||
let (eff_b, eff_b_cs, eff_i, eff_i_cs) =
|
||||
s.doc.styles.chain(&id).into_iter().fold((d.bold, d.bold_cs, d.italic, d.italic_cs), |(b, b_cs, i, i_cs), st| {
|
||||
(st.chr.bold.or(b), st.chr.bold_cs.or(b_cs), st.chr.italic.or(i), st.chr.italic_cs.or(i_cs))
|
||||
});
|
||||
let st = Arc::make_mut(&mut s.doc.styles).get_mut(&id).ok_or_else(|| CmdError::Params("no such style".into()))?;
|
||||
if let Some(c) = chr {
|
||||
if let Some(mut c) = chr {
|
||||
if eff_b_cs.filter(|&cs| Some(cs) != eff_b).is_none() {
|
||||
c.bold_cs = c.bold_cs.or(c.bold);
|
||||
}
|
||||
if eff_i_cs.filter(|&cs| Some(cs) != eff_i).is_none() {
|
||||
c.italic_cs = c.italic_cs.or(c.italic);
|
||||
}
|
||||
st.chr.overlay(&c);
|
||||
}
|
||||
if let Some(pp) = para {
|
||||
|
||||
@@ -328,3 +328,39 @@ fn a_latin_link_inserted_into_reopened_hebrew_is_saved_left_to_right() {
|
||||
assert_eq!(s.typing_props().rtl, None);
|
||||
assert_eq!(s.typing_props().lang_bidi.as_deref(), Some("he-IL"), "the bidi language stays");
|
||||
}
|
||||
|
||||
/// #4198: inserting a styled table, typing Arabic into the header row with `para.rtl` and
|
||||
/// saving as DOCX keeps `w:bCs` beside `w:b` in the table style's header row and first column.
|
||||
#[test]
|
||||
fn arabic_table_header_row_and_modified_styles_carry_complex_script_bold_and_italic() {
|
||||
let mut s = Session::new(wordcraft_doc::Document::new());
|
||||
run(&mut s, "insert.table", json!({"rows": 2, "cols": 2, "style": "Grid Table 4 – Blue"}));
|
||||
run(&mut s, "para.rtl", json!({"value": true}));
|
||||
run(&mut s, "text.insert", json!({"text": "العنوان"}));
|
||||
let bytes = crate::io::save_bytes("x.docx", &s.doc).unwrap();
|
||||
let reopened = crate::io::open_bytes("x.docx", &bytes).unwrap();
|
||||
let blue = reopened.styles.table_style("GridTable4AccentBlue").unwrap();
|
||||
assert_eq!((blue.parts.header_chr.bold, blue.parts.header_chr.bold_cs), (Some(true), Some(true)));
|
||||
assert_eq!((blue.parts.first_col_chr.bold, blue.parts.first_col_chr.bold_cs), (Some(true), Some(true)));
|
||||
|
||||
// Modifying a style's bold or italic without an explicit complex-script value formats both
|
||||
// scripts, while an explicit `boldCs` / `italicCs` still wins.
|
||||
run(&mut s, "styles.modify", json!({"style": "Heading 1", "chr": {"bold": true, "italic": true}}));
|
||||
let h1 = s.doc.styles.get("Heading1").unwrap();
|
||||
assert_eq!((h1.chr.bold, h1.chr.bold_cs, h1.chr.italic, h1.chr.italic_cs), (Some(true), Some(true), Some(true), Some(true)));
|
||||
run(&mut s, "styles.modify", json!({"style": "Heading 1", "chr": {"bold": true, "boldCs": false, "italic": false}}));
|
||||
let h1 = s.doc.styles.get("Heading1").unwrap();
|
||||
assert_eq!((h1.chr.bold, h1.chr.bold_cs, h1.chr.italic, h1.chr.italic_cs), (Some(true), Some(false), Some(false), Some(false)));
|
||||
run(&mut s, "styles.modify", json!({"style": "Heading 1", "chr": {"bold": true}}));
|
||||
let h1 = s.doc.styles.get("Heading1").unwrap();
|
||||
assert_eq!((h1.chr.bold, h1.chr.bold_cs), (Some(true), Some(false)), "omitted boldCs keeps a distinct complex-script override");
|
||||
run(&mut s, "styles.modify", json!({"style": "TOC Heading", "chr": {"font": "Georgia", "bold": true}}));
|
||||
let toc = s.doc.styles.get("TOCHeading").unwrap();
|
||||
assert_eq!(toc.chr.bold_cs, None, "child style keeps inheriting parent's distinct complex-script override");
|
||||
let styles = std::sync::Arc::make_mut(&mut s.doc.styles);
|
||||
styles.default_chr.italic = Some(true);
|
||||
styles.default_chr.italic_cs = Some(false);
|
||||
run(&mut s, "styles.modify", json!({"style": "Normal", "chr": {"italic": true}}));
|
||||
let normal = s.doc.styles.get("Normal").unwrap();
|
||||
assert_eq!(normal.chr.italic_cs, None, "style keeps inheriting document default's distinct complex-script override");
|
||||
}
|
||||
|
||||
@@ -1048,7 +1048,22 @@ fn modify_style_dialog(app: &mut WordApp, ui: &mut Ui, d: &mut Dialog) -> bool {
|
||||
});
|
||||
let (ok, cancel) = buttons(ui, tl!("OK"));
|
||||
if ok {
|
||||
let mut chr = json!({"font": font, "size": *size, "bold": *bold, "italic": *italic});
|
||||
let was = app.session.doc.styles.get(id).map(|st| {
|
||||
app.session.doc.styles.resolve_char(
|
||||
if st.kind == wordcraft_doc::StyleKind::Paragraph { Some(id) } else { None },
|
||||
&wordcraft_doc::CharProps {
|
||||
style: if st.kind == wordcraft_doc::StyleKind::Character { Some(id.clone()) } else { None },
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
});
|
||||
let mut chr = json!({"font": font, "size": *size});
|
||||
if was.as_ref().map(|rc| rc.bold) != Some(*bold) {
|
||||
chr["bold"] = json!(*bold);
|
||||
}
|
||||
if was.as_ref().map(|rc| rc.italic) != Some(*italic) {
|
||||
chr["italic"] = json!(*italic);
|
||||
}
|
||||
if let Some(c) = wordcraft_doc::Rgb::parse(color) {
|
||||
chr["color"] = json!({"Rgb": [c.0, c.1, c.2]});
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ Measured by grepping `crates/docx/src/read` and `src/write` for the OOXML elemen
|
||||
| Tables incl. floating (`w:tblpPr`), table styles and conditional formatting | ✅ | ✅ | Custom table styles round-trip (#256); right-to-left tables (`w:bidiVisual`) and sections (`w:bidi`) round-trip (#362) |
|
||||
| Text, runs, paragraph and character properties, styles, numbering, sections | ✅ | ✅ | Including complex-script props (`w:rtl`, `w:cs`, `w:szCs`, `w:bCs`…), East Asian fonts kept apart from Latin (#111); independent complex-script formatting inherited through defaults/styles and preserved over repeated saves (`complex_script_inheritance.rs`), indents in characters (`w:firstLineChars`, `w:hangingChars`, `w:leftChars`, `w:rightChars`, #534); every ST_NumberFormat value of `w:numFmt` is kept on save, Chinese/Japanese/Korean, enclosed and full-width formats and Arabic letters (`arabicAlpha`, `arabicAbjad`) are drawn, the rest (Hebrew, Hindi, Thai…) show decimal (#534). `w:beforeLines`/`w:afterLines` not kept (the points are) |
|
||||
| Positional tabs (`w:ptab`: alignment, margin or indent, leader) | ✅ | ✅ | Laid out at their place whatever the tab stops; one with an alignment or base the spec doesn't define reads as a plain tab (#2367). `crates/docx/tests/it/positional_tabs.rs` |
|
||||
| Tables incl. floating (`w:tblpPr`), table styles and conditional formatting | ✅ | ✅ | Custom table styles round-trip (#256), every `w:tblStylePr` part (wholeTable, firstRow, lastRow, firstCol, lastCol, band1/2Vert, band1/2Horz, ne/nw/se/swCell) with run formatting, `w:jc`, cell borders, shading and `w:vAlign` (#714); a cell's own `w:vAlign w:val="top"` is kept and beats the style's (#1288); right-to-left tables (`w:bidiVisual`) and sections (`w:bidi`) round-trip (#362); table style band sizes (`w:tblStyleRowBandSize`, `w:tblStyleColBandSize`) are read and written, and a style without them has no bands, as Word reads it (ECMA-376 says one), while our banded styles write theirs (#3415) |
|
||||
| Tables incl. floating (`w:tblpPr`), table styles and conditional formatting | ✅ | ✅ | Custom table styles round-trip (#256), every `w:tblStylePr` part (wholeTable, firstRow, lastRow, firstCol, lastCol, band1/2Vert, band1/2Horz, ne/nw/se/swCell) with run formatting, `w:jc`, cell borders, shading and `w:vAlign` (#714); a cell's own `w:vAlign w:val="top"` is kept and beats the style's (#1288); right-to-left tables (`w:bidiVisual`) and sections (`w:bidi`) round-trip (#362); table style band sizes (`w:tblStyleRowBandSize`, `w:tblStyleColBandSize`) are read and written, and a style without them has no bands, as Word reads it (ECMA-376 says one), while our banded styles write theirs (#3415); built-in styles and table styles write `w:bCs` beside `w:b` and `w:iCs` beside `w:i` (#4198) |
|
||||
| Text, runs, paragraph and character properties, styles, numbering, sections | ✅ | ✅ | Including a Styles gallery for files that mark no style `w:qFormat` (LibreOffice: Word's usual quick styles are added, #1238), complex-script props (`w:rtl`, `w:cs`, `w:szCs`, `w:bCs`…), East Asian fonts kept apart from Latin (#111); independent complex-script formatting inherited through defaults/styles and preserved over repeated saves (`complex_script_inheritance.rs`), indents in characters (`w:firstLineChars`, `w:hangingChars`, `w:leftChars`, `w:rightChars`, #534); every ST_NumberFormat value of `w:numFmt` is kept on save, Chinese/Japanese/Korean, enclosed and full-width formats and Arabic letters (`arabicAlpha`, `arabicAbjad`) are drawn, the rest (Hebrew, Hindi, Thai…) show decimal (#534). `w:beforeLines`/`w:afterLines` not kept (the points are) |
|
||||
| Tables incl. floating (`w:tblpPr`), table styles and conditional formatting | ✅ | ✅ | Row table border exceptions (`w:tblPrEx/w:tblBorders`) round-trip (`row_table_borders_round_trip`); other row table exceptions are not preserved. Custom table styles round-trip (#256); right-to-left tables (`w:bidiVisual`) and sections (`w:bidi`) round-trip (#362) |
|
||||
| Headers/footers (first, even/odd), page borders, line numbers, gutter, mirror margins | ✅ | ✅ | |
|
||||
@@ -507,6 +507,7 @@ For field results, the engine parser treats a backslash in quoted arguments as e
|
||||
| 2026-10-27 | trivial | Preserve #4249 complete-record CSV delimiter detection and its regressions in the mailings modules; recipient commands, limits and refusal behavior unchanged. |
|
||||
| 2026-10-26 | trivial | Integrate #4249 with current-main CSV helpers, preserving logical-record detection, existing recipient limits and refusal behavior. |
|
||||
| 2026-10-25 | trivial | Recipient CSV delimiter detection reads the first complete record, including quoted line breaks and doubled quotes; separator ties and cell parsing remain unchanged. Original parser and CLI import/save/reopen checks; readiness estimates unchanged. |
|
||||
| 2026-10-25 | trivial | Built-in styles and table styles write `w:bCs` beside `w:b` and `w:iCs` beside `w:i` in `word/styles.xml`, so Word and LibreOffice draw Arabic and Hebrew table headers and emphasis bold or italic as WordCraft does (#4198) |
|
||||
| 2026-10-17 | trivial | Encryption rows: Standard (Word 2007, AES-ECB) encrypted packages open with a password, also when named `.doc`/`.dot`; AES headers in Word 97-2003 files are outside the public spec and refused (gap 9). The duplicate combined `.docx`/`.doc` row is removed; the `.doc` row reads 🟡 ~60% (it opens XOR/RC4/RC4 CryptoAPI); hours 2–4 → 1–2 and 4–6 → 1–2 (left: checks against Word-written files); total re-summed from the rows, 175–287 h |
|
||||
| 2026-10-25 | trivial | Repeated DOCX style IDs: repeated save/reopen regression for whole-definition replacement. |
|
||||
| 2026-10-25 | trivial | Arabic list labels: `arabicAlpha` and `arabicAbjad` draw the 28 Arabic letters (alphabetical and abjad order), doubling past the last letter; Hebrew, Hindi, Thai and Vietnamese still show decimal (`doc::section::tests::arabic_letters_count_in_both_orders`) |
|
||||
|
||||
Reference in New Issue
Block a user