Merge #2151 (63a29800, with main at 17b9f6ff) into #2144

Main adds UiRequest::InsertName (Paste Name, Use in Formula), which puts a name in the cell
editor; a macro step drops it, as it drops a request to start editing a cell.
This commit is contained in:
prxnvt
2026-10-25 02:26:02 -04:00
130 changed files with 8235 additions and 804 deletions
+6
View File
@@ -624,6 +624,12 @@ fn the_policy_keeps_macros_away_from_files_and_the_app() {
let err = s.execute("macro.run", json!({"name": "Pic"})).unwrap_err().to_string();
assert!(err.contains("would open the insertPicture dialog"), "{err}");
assert!(s.ui_requests.is_empty());
// A step that would start editing a cell, or put a name in the edit, runs without it.
let (use_name, insert) = (json!({"name": "Rate"}), json!({"name": "SUM"}));
let steps = json!([{"command": "formulas.useInFormula", "params": use_name}, {"command": "formulas.insertFunction", "params": insert}]);
put(&mut s, json!({"name": "Edit", "output": {"onConflict": "overwrite"}, "steps": steps}));
s.execute("macro.run", json!({"name": "Edit"})).unwrap();
assert!(s.ui_requests.is_empty());
}
#[test]