Form controls: the object commands leave a locked control on a protected sheet alone

control.format and control.assign refused to change a locked control on
a protected sheet, but object.move, object.delete,
object.setAnchorMode, arrange.bringForward, arrange.sendBackward and
arrange.align changed it all the same. They now refuse it with the
same message; an unlocked control still moves, and other kinds of
objects are unchanged.
This commit is contained in:
prxnvt
2026-10-31 16:35:36 -04:00
parent 0fb3ea7a68
commit 14dee9155d
4 changed files with 50 additions and 1 deletions
+2
View File
@@ -1187,6 +1187,8 @@ fn object_param(s: &Session, p: &Json, cmd: &str) -> Result<(usize, ObjRef)> {
if !d.wb.sheet(sheet).is_some_and(|sh| sh.has_object(o)) {
return Err(bad(cmd, "no such object"));
}
// A locked form control on a protected sheet stays as it is.
super::controls::check_objects_unlocked(s, sheet, kind, &[id])?;
Ok((sheet, o))
}