Fields: table cells keep stored values, UPDATEFIELD reaches blocks and tables, measured shading box

Table cell fields show their stored value; only formula cells evaluate
live. UPDATEFIELD on a block reference also updates the fields of its
block definition, and on a table the fields of its cells; a changed
table cell text redraws the table. The FIELDDISPLAY box is placed from
the text layout (MTEXT layout cells, TEXT / attribute pen advances) and
spans 0.345 text heights below the baseline to 1.19 above it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-06 12:25:24 +03:00
1 parent 1c242eb489
commit 383eba14e5
8 files changed
+134 -95

No files matched your search

+4 -6
View File
@@ -110,12 +110,10 @@ pub fn update_fields(
document.update_fields(&OcsFieldContext(Some(&snapshot)), event, hosts)
}
pub fn resolve_handle(
document: &CadDocument,
field: Handle,
host: Handle,
) -> Option<String> {
codec::fields::resolve_handle(document, field, host, &OcsFieldContext(Some(document)))
/// The text a table cell shows for its field: a formula is evaluated live
/// (it reads other cells), any other field shows its stored value.
pub fn cell_text(document: &CadDocument, field: Handle, table: Handle) -> Option<String> {
codec::fields::cell_field_text(document, field, table, &OcsFieldContext(Some(document)))
}
/// Evaluate one field code (`\AcVar Date \f "yyyy-MM-dd"`, or the `%<…>%`