* formula: Polish formula language (FormulaLocale::Pl)
- FormulaLocale::Pl: all 434 functions whose Polish Excel name differs, in
crates/formula/src/input/pl.rs. Names come from PhpSpreadsheet's pl table
(MIT) cross-checked with a second independent table; where they disagree
or are missing, Microsoft's pl-pl pages decide, and the names #1678
observed in Excel for the web fill the rest. Polish keeps MAX (only
MAXIFS is MAKS.WARUNKÓW).
- PRAWDA/FAŁSZ, `;` argument and `\` array-column separators, decimal comma.
- Polish error values on entry and display (#DZIEL/0!, #N/D, #ARG!,
#ROZLANIE!, #OBL!...); #N/D! and English spellings stay accepted.
- Table specifiers (#Wszystko, #Dane, #Nagłówki, #Sumy, #Ten wiersz) with
';' between bracketed parts.
- The locale tables are generalised (aliases()/boolean_names()) instead of
hard-coding Spanish, and the parser keeps the locale instead of an `Es`
flag; names are compared with the shared same_name, so `jeżeli` matches
`JEŻELI` and a LET name `fałsz` is matched by `FAŁSZ`. Spanish behaviour
is unchanged.
- Function help follows the interface language, as on main: Polish
descriptions and argument names belong to the Polish catalog (#1807).
- Tests: crates/formula/tests/polish_input.rs and
crates/calc/tests/polish_function_names.rs (every Polish name belongs to a
known function and none shadows an English one).
- Docs: ROADMAP.md and docs/localization-parity.md.
The Polish interface language (on main since #1091) selects the locale:
Language::formula_locale maps Pl to it.
* formula: credit PhpSpreadsheet for the Polish function name table
The English-to-Polish name table in crates/formula/src/input/pl.rs comes
from PhpSpreadsheet's locale/pl/functions (MIT). ATTRIBUTION.md now lists
it in the same form as the CLDR region data, and NOTICE carries
PhpSpreadsheet's MIT licence text verbatim. The second table the names
were checked against was only a cross-check, and nothing was copied from
it; the module comment now says so.
---------
Co-authored-by: Maciej Malinowski <[email protected]>
* Function Arguments: one box per argument with live values (#4322)
Insert Function OK, fx and Shift+F3 open a Function Arguments dialog: a box per argument from the function signature (optional ones not bold, repeating ones growing as they are filled), each box's value, the function and formula results, and per-argument descriptions for the common functions. Shift+F3 inside a call, or fx on a formula cell, opens it with the call's arguments filled in.
* Function Arguments: keep draft out of grid commits, keep given blanks, key preview by cell, stay open on refusal
* Function Arguments: show argument help through the translation catalog, key the preview cache by revision
* i18n-report: inventory the per-argument help strings as translation keys
* i18n-report: list every per-argument help key
---------
Co-authored-by: Silvertree2010 <[email protected]>
* Print: sheets left out of whole-workbook printing
PrintSettings gains `excluded` (serde default false, not written when
false). Printing or exporting the whole workbook (`sheets: all`) skips a
sheet marked excluded, unless every visible sheet is, in which case they
all print, as LibreOffice does with an OpenDocument sheet set not to
print (`table:print="false"`). Printing the active sheet alone is
unaffected. `pageLayout.pageSetup {excluded: bool}` sets it, in one undo
step with the rest of Page Setup.
Excel has no such flag, so XLSX neither reads nor writes it.
* Print: excluded active sheet is not the blank fallback; explicit range prints
Review follow-up. With `sheets: all`, when every printable sheet was
blank the fallback page came from the active sheet even if it was left
out of workbook printing; it now comes from the active sheet only when
that sheet would print, else the first sheet that would. A `range` given
for the active sheet is asked for explicitly, so that sheet prints even
when excluded (it was silently dropped).
* Print: every sheet excluded prints them all, also with a range
Review follow-up. With `sheets: all` and a `range`, the range exception
kept the active sheet among the printed ones, so the "every visible
sheet is excluded, all print" rule never applied and only the active
sheet printed. That rule is now decided first.
* Save: ask before XLSX drops a sheet's print exclusion, and report it
XLSX can't hold PrintSettings::excluded, and Save and Save As dropped it
silently. A save from the interface now asks first and offers a GridCraft
workbook (.json), AutoSave waits for that answer, and file.save,
file.saveAs and file.saveBytes return what was lost as `warnings`, which
the CLI prints. Saves that lose nothing are unchanged.
* Save question: one pending save says what was asked, by which workbook, and what follows
The question about what a save would lose kept loose dialog values and
acted on whatever was active when it was answered. It now holds one
PendingSave: the workbook that asked, the save as it was run, exactly
which sheets lose something, and the close or quit that waits for it.
- Save As with no path is asked about the file that is picked, so it
never writes the workbook's own file.
- Another workbook is never saved or agreed to; ui.dialog.set can't
change the save behind the question.
- Agreeing is to the sheets themselves, not to the text that names some.
- A question that replaces another takes its close and quit along.
* AutoSave: the hold notice goes when the hold ends
The hold lasts while AutoSave is on and the workbook has changes whose
loss was not agreed to. When it ends, its notice and its entry go, so a
later hold on the same sheets is said again. Other notices stay.
* CLI: print file.saveBytes warnings too
Review follow-up. `file.saveBytes` returns `warnings` like Save and
Save As, but the CLI printed only theirs, so `run --quiet` with a
saveBytes command hid what the .xlsx encoding lost.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Save loss: ask again when the workbook's file changed meanwhile
A held plain Save took the workbook's path when answered, so if the file
changed while the question was open, Save Anyway wrote a file nobody was
asked about. The question now records the file it is about and asks again
for the new one.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* formula: printer dialects and parsing from tokens
A `Dialect` trait states how another formula syntax spells references,
names, structured references, functions, booleans, separators, operators
and operator-less unary forms; `print_with(&Expr, &dyn Dialect)` prints
through it. `print` and `print_r1c1` are the A1 and R1C1 dialects, so
Excel output is byte-for-byte unchanged.
`parse_tokens(Vec<Token>)` builds an `Expr` from another tokenizer's
tokens with this grammar (capped at MAX_FORMULA_LEN tokens), and
`Tok::Ref` carries a reference that tokenizer has already read.
Groundwork for reading and writing OpenFormula in ODS files.
* formula: bound parse_tokens input like text; document Dialect methods
parse_tokens refuses a Tok::Ref off the grid (rows or columns past
Excel's limits) and token text (strings, names, sheet names, structured
bodies) longer than MAX_FORMULA_LEN in all, as formula text is bounded.
Range ends keep their order, as the text parser keeps `B2:A1`. The doc
says OpenFormula's `~` union is not read here.
Tok is #[non_exhaustive] now that other tokenizers can need new kinds;
no match outside the crate is exhaustive. Dialect::boolean, separators
and operator have doc comments.
* formula: parse_tokens refuses non-finite numbers, early Eof, empty sheets
A Tok::Number that is NaN or infinite is refused as the A1 lexer refuses
it (it printed as `0`, changing the value). An Eof before the last token
is an error instead of silently dropping what follows. A sheet name in a
Tok::Ref or Tok::Sheet may not be empty.
* formula: parse_tokens refuses words the A1 tokenizer would not read
A Tok::Word or Tok::Func must be what the A1 tokenizer reads from its
text (re-lexed and compared): an empty one, or `A!1`, `TRUE`, `a b`,
printed as text that would not parse back. An empty structured
reference body stays accepted: text reads `[]` the same way. Tests also
cover an empty second sheet name in Tok::Sheet.
* formula: parse_tokens refuses trees that would not print back; nesting bound as text
Review round fixes (after merging main):
- Apply main's whole-tree wrapper-height bound (#3813) to parse_tokens through a
shared finish step; a token stream of stacked `(..)%%%` levels was accepted.
- Drop spaces that are not between two operands, as text does; `Tok::Ref` now
counts as an operand for the intersection.
- Refuse negative numbers (`-1` reads back as a negation), sheet names holding
`:` (they read back as a span), `Tok::Trim` (no OpenFormula form, and most
shapes have no text form), and a word directly before `(`.
- The TRIMRANGE fallback is named through `Dialect::function`.
* formula: parse_tokens checks that the tree prints back as itself
Second review round. Correcting the first round's piecemeal checks, which
missed operands of `:` that regroup or change kind when printed:
`A1` `:` `B2:C3` printed as `A1:B2:C3` (read back as `(A1:B2):C3`), a
sheet-qualified right side read back as a 3-D span, `1` `:` `3` read back
as rows, and a row range before an intersection space printed text that
does not parse.
parse_tokens now prints the tree and parses that text back, refusing the
tokens unless the same tree returns. Numbers are compared as they print
(15 significant digits), so a longer literal is still read as given. The
earlier checks stay for their precise messages. The printed text is
bounded as typed text is, so a string that fits only without its quotes is
refused.
---------
Co-authored-by: FredApps <[email protected]>
* feat(data): paste or import clipboard text as columns
Data › Get Data (Text/CSV) becomes a split button. Its menu adds
From Clipboard…, and the cell menu adds Paste Data… after Paste
Special…. Both open a dialog that asks for the separator (comma,
semicolon, tab, space or another character), starting on the one the
text uses. From Clipboard imports into a new sheet as a table, and
Paste Data pastes the columns at the clicked cell. The dialog imports
the text it read when it opened, and Paste Data names the sheet with
its cell.
- data.fromTextCsv: `at` pastes at a cell, Sheet!-qualified or on the
active sheet. Without a delimiter, craft-csv's sniffer picks comma,
semicolon or tab. JSON records are read only when no delimiter is
given. The delimiter must be one character other than a quote or
line break, up to U+00FF. The reader's cells are written with their
number formats, so dates and percents keep them and formula-looking
text stays text.
- data.fromClipboard (UI command): the same with the system clipboard.
- Key tips: Alt/F10, A, P, N opens the Get Data menu with G and C
(APNC is new). Up/Down in a menu key tips opened moves focus onto
its items, wrapping at the ends. Enter runs the focused item without
also confirming what it opens.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(data): clipboard import review fixes and rustfmt
- Paste Data's destination is a "Paste at" reference box holding the
selection's top-left cell, the cell Paste uses. As in the other
dialogs with reference boxes, OK shows the dialog's own sheet again
first, found by its uid, and is refused once that sheet is deleted.
- A paste at a cell covers every field of the text, trailing blank
fields and records included, so they clear the cells under them.
read_csv_with_report now reports the record count and the widest
record.
- CSV dates are read as serials of the destination workbook's date
system (1900 or 1904).
- The first arrow into a key-tip menu cancels the focus move egui had
already queued, so it lands on the first item even when a ribbon
button was focused.
- cargo fmt.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(data): Paste Data refuses rows past the sheet and clears all-blank text
- read_csv_with_report reports `truncated` when the text has records
past a sheet's last row. A paste at a cell refuses such text before
writing anything, instead of dropping the rest. Text with exactly
MAX_ROWS records still pastes.
- A paste at a cell uses the text's record extent even when it has no
non-empty field, so text like `,` clears the cells it covers instead
of failing as an empty file.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(data): Paste Data refuses text wider than a sheet
The CSV reader keeps one field past MAX_COLS per record, so a wider
record can be told from one that fits, and reports it as `truncated`,
as it does records past the last row. A paste at a cell refuses such
text before writing anything; text exactly MAX_COLS fields wide still
pastes. Importing into a new sheet still keeps the first MAX_COLS
fields, as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(data): read bracket-led text without a separator as delimited text
From Text/CSV, Get Data and From Clipboard read any text whose first
character is `[` as JSON when no separator was given, so delimited text
whose first field is bracketed (`[Draft];Oslo`) was rejected with a JSON
parse error. Text is now read as records only when it parses as a JSON
array of objects; anything else goes to the delimited reader, which picks
the separator by the text.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* ci(nightly): enable scheduled nightly builds and automatic signer dispatch
* ci: update actions lockfile for nightly-dispatch.yml
* test(packaging): read workspace version from Cargo.toml in Linux launch test
Nirmala UI draws Tamil கொ as one ligature rather than the vowel sign on
both sides of க, which is also shaped. The test now fails only when the
text comes out one glyph per code point. localization-parity.md lists
the Indian-script fallback faces and no longer says Devanagari is
unshaped.
Fixes#4131.
Co-authored-by: kulveersingh <[email protected]>
Gujarati, Hindi (Devanagari) and the other Indian scripts showed as empty
boxes in cells and the interface: the default fonts (Calibri, Arial) have
no glyphs for them and the fallback chain had no Indian-script face.
Adds one fallback entry per script, probing the system's own fonts:
Nirmala UI and the per-script faces on Windows, Kohinoor, Noto and
Sangam MN on macOS (the Regular face inside each collection), Noto Sans
or Lohit on Linux and the BSDs, including Fedora's variable Noto faces
and a Flatpak's host font mounts. Nothing is bundled.
From storytold/gridcraft#581 (17328a73d, 789311da8), ported to the
theme/font_fallback.rs layout on main.
The test typed =1+1 next to the table's header row, which now grows the table
and names the column itself, so table.resize had nothing left to do and the
test no longer reached Resize Table's own header naming. The formula now goes
in D1, two columns away, and the test checks the table did not grow before
the resize.
Co-Authored-By: Claude Opus 5.5 <[email protected]>