mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-30 05:37:00 -06:00
Engine: a macro in a newer format is kept unread and saved back unchanged
A macro whose format version is above this build's was dropped on open, so the next save removed it from the file, and the warning said only that it couldn't be opened. It is now kept as the file held it (Workbook::macros_unread, shared between snapshots), never read, listed or run, and written back unchanged by JSON and xlsx saves, numbered after the readable macros and around visible names of the storage shape. Kept macros count toward the 1,000-macro limit after the readable ones; one too large for an xlsx item is left out. The warning says it is kept and saved back; damaged and over-limit macros keep their own warning.
This commit is contained in:
+6
-4
@@ -66,10 +66,12 @@ is someone's own name: opening a file leaves it alone, and saving stores the mac
|
||||
it does not use.
|
||||
|
||||
Each macro carries its format version, `v` (1 in this version; a missing `v` reads as 1). When a
|
||||
file is opened, a macro that is damaged, over the limits or in a newer format (a `v` above 1) is
|
||||
left out with one warning, and the rest of the workbook and its other macros open. A newer
|
||||
macro is never read in part, so a save can't write it back with its newer fields missing; a
|
||||
macro that was left out is not in the saved file.
|
||||
file is opened, a macro in a newer format (a `v` above 1) is kept unread, with a warning: this
|
||||
version can't show or run it, and saving writes it back exactly as the file held it, so the newer
|
||||
version gets it back whole. It is never read in part. Kept macros count toward the 1,000-macro
|
||||
limit after the readable ones, and one too large for an xlsx file is left out. A macro that is
|
||||
damaged or over the limits is left out with one warning, and the rest of the workbook and its
|
||||
other macros open; a macro that was left out is not in the saved file.
|
||||
|
||||
## Automate scripts and VBA
|
||||
|
||||
|
||||
Reference in New Issue
Block a user