diff --git a/crates/engine/src/io.rs b/crates/engine/src/io.rs index fab2ac822..5c0bf800b 100644 --- a/crates/engine/src/io.rs +++ b/crates/engine/src/io.rs @@ -681,7 +681,7 @@ mod tests { wb.sheet_mut(0).unwrap().images.push(gridcraft_model::Image { id: 1, anchor: gridcraft_model::Anchor { cell: CellRef::new(0, 0), dx: 0.0, dy: 0.0, width: 72.0, height: 36.0, mode: Default::default() }, - data: vec![1, 2, 3], + data: vec![1, 2, 3].into(), mime: "image/png".into(), alt: "a \"logo\"".into(), }); @@ -703,7 +703,7 @@ mod tests { sh.images.push(gridcraft_model::Image { id: 1, anchor: gridcraft_model::Anchor { cell: CellRef::new(3, 2), dx: 5.0, dy: 7.0, width: 10.0, height: 20.0, mode: Default::default() }, - data: vec![1], + data: vec![1].into(), mime: "image/png".into(), alt: String::new(), }); @@ -729,7 +729,7 @@ mod tests { height: 10.0, mode: Default::default(), }, - data: vec![1], + data: vec![1].into(), mime: "image/png".into(), alt: String::new(), }); diff --git a/crates/ui-egui/src/editor.rs b/crates/ui-egui/src/editor.rs index 2e4e07e30..8984ad53c 100644 --- a/crates/ui-egui/src/editor.rs +++ b/crates/ui-egui/src/editor.rs @@ -163,7 +163,7 @@ impl EditState { /// Ctrl+Shift+A, as in Excel: right after a function name, or after its `(`, inserts the /// argument names (optional ones without their brackets) and the closing parenthesis, and /// the `(` too when missing. Anywhere else nothing changes and it returns false. - pub fn insert_argument_names(&mut self) -> bool { + pub fn insert_argument_names(&mut self, language: crate::i18n::Language) -> bool { if !self.is_formula() { return false; } @@ -183,7 +183,7 @@ impl EditState { if name.is_empty() || name.starts_with(|c: char| c.is_ascii_digit()) { return false; } - let Some(signature) = crate::formula_locale::signature(&name, self.locale) else { return false }; + let Some(signature) = crate::formula_locale::signature(&name, self.locale, language) else { return false }; let sep = self.locale.list_separator(); let inner = signature.split_once('(').map(|(_, rest)| rest.trim_end().trim_end_matches(')')).unwrap_or(""); let args: Vec<&str> = inner.split(sep).map(|a| a.trim().trim_start_matches('[').trim_end_matches(']')).filter(|a| !a.is_empty()).collect(); diff --git a/crates/ui-egui/src/formula_bar.rs b/crates/ui-egui/src/formula_bar.rs index da07b62eb..6ec3083ac 100644 --- a/crates/ui-egui/src/formula_bar.rs +++ b/crates/ui-egui/src/formula_bar.rs @@ -278,7 +278,7 @@ pub fn editor_widget(app: &mut SheetApp, ui: &mut egui::Ui, id: egui::Id, font: // as in Excel, so it never falls through to the text's select-all. if ui.input_mut(|i| i.consume_key(egui::Modifiers::CTRL | egui::Modifiers::SHIFT, Key::A)) { let (text, caret) = (ed.text.clone(), ed.caret); - if ed.insert_argument_names() + if ed.insert_argument_names(app.ui.language) && let Some(mut state) = egui::TextEdit::load_state(ui.ctx(), id) { // The text edit records an undo point only once typing pauses: mark the text diff --git a/crates/xlsx/src/tests/chart_book_names.rs b/crates/xlsx/src/tests/chart_book_names.rs index 3182cbae1..4c1af5158 100644 --- a/crates/xlsx/src/tests/chart_book_names.rs +++ b/crates/xlsx/src/tests/chart_book_names.rs @@ -46,6 +46,7 @@ fn series(name: &str, values: &str) -> Series { kind: None, smooth: false, trendlines: Vec::new(), + quartiles: Default::default(), } } diff --git a/crates/xlsx/src/tests/multilevel_category_roundtrip.rs b/crates/xlsx/src/tests/multilevel_category_roundtrip.rs index 556a8917a..730edc8a6 100644 --- a/crates/xlsx/src/tests/multilevel_category_roundtrip.rs +++ b/crates/xlsx/src/tests/multilevel_category_roundtrip.rs @@ -37,6 +37,7 @@ fn workbook(categories: &str, values: &str) -> Workbook { kind: None, smooth: false, trendlines: Vec::new(), + quartiles: Default::default(), }], legend: LegendPos::Bottom, data_labels: false, diff --git a/crates/xlsx/src/tests/roundtrip.rs b/crates/xlsx/src/tests/roundtrip.rs index 07dbb6b5e..5b79438db 100644 --- a/crates/xlsx/src/tests/roundtrip.rs +++ b/crates/xlsx/src/tests/roundtrip.rs @@ -790,6 +790,7 @@ fn cell_text_carriage_returns_survive_xlsx_roundtrip() { resolved: false, visible: false, dates: vec![], + note_box: None, }, );