Commit Graph
1983 Commits
Author SHA1 Message Date
Marco Arnulfo ac8bbd84eb Grid: a cell with line breaks and Wrap Text off draws the whole string on one line (fixes #1604) 2026-10-16 05:14:19 +02:00
Marco Arnulfo e8c6fcb8b0 XLSX: keep custom column widths that round to the default width (fixes #1607) 2026-10-16 05:11:07 +02:00
Marco Arnulfo f3398ee218 Grid: a scrolled Table's header names and filter buttons in the column headings (#1423) 2026-10-16 04:27:49 +02:00
Marco Arnulfo 706127402a XLSX: keep header and footer pictures on save (part of #1257) 2026-10-16 02:48:25 +02:00
Dylan M. Taylor e91e7f7a68 ci: delegate FreeBSD workflow, add nix check, and remove flatpak-pages 2026-10-15 20:47:20 -04:00
skylar taylor-barrick bb685e3275 Merge pull request #1588 from marcoarnulfo/fix/filter-menu-enter-applies
AutoFilter: Enter in the filter menu applies the filter and closes it
2026-10-15 18:28:45 -06:00
Marco Arnulfo 81422c315d Contributors: add my name for the About window 2026-10-16 02:19:55 +02:00
Marco Arnulfo 79e8973c30 Web: keep preferences such as dark mode between visits (fixes #1562) 2026-10-16 01:35:02 +02:00
Marco Arnulfo fda8e7b703 AutoFilter: Enter in the filter menu applies the filter and closes it (fixes #1516) 2026-10-16 01:13:10 +02:00
NetterSilverandClaude Haiku 5.5 d50e32bf25 Docs: put the new sentence in the Fidelity / notes column
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 21:27:55 +00:00
NetterSilverandClaude Haiku 5.5 1ab9e60d88 Reject formula number literals too large for f64 as parse errors
Found while testing crates/formula/src/lexer.rs:258

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 22:23:34 +02:00
NetterSilver 9f6bd5848c Docs: update the progress docs for this change 2026-10-15 20:17:42 +00:00
NetterSilver 47185eef1f XLSX export: a picture shared by several sheets is one media part (#985)
The writer gave every drawing its own xl/media/imageN part even when the pictures
had the same bytes, so a workbook with one logo on 16 sheets grew 16 copies of
it on a plain open and save. Out::image_part now returns the existing part when
an identical picture was already written (same extension and bytes), and every
drawing's relationship points to it, as Excel stores a copied picture.
2026-10-15 20:17:27 +00:00
Nihilist NarwhalandClaude Opus 5.5 82ee02aac4 Formula parser: Excel's 8,192-character limit and postfix nesting (never crash) (#1330)
A hostile file could abort any process that opens it: a cell formula of a
million `%` (`1%%%…`) or a 200,000-term sum parsed into trees deep enough to
overflow the stack when printed, saved, evaluated or dropped, even in release
builds. Postfix operators (`%`, invoking a result) built their nesting in a
loop that the 256-level limit did not see.

- `parse` refuses formula text longer than Excel's 8,192 characters
  (`MAX_FORMULA_LEN`, counted in characters, the leading `=` excluded). This
  also bounds the depth of the left-deep trees long operator chains build.
- Each postfix `%` and each call of a result counts towards the nesting limit.
- A file's formula that is refused keeps its text and cached value, as other
  unparsable formulas do.

Regression tests: formula (small-stack thread: long `%`, invoke and operator
chains are errors; the limit counts characters, not bytes) and xlsx
(`hostile_formula_text_does_not_overflow_the_stack`: open, save and drop a
workbook with such formulas and a defined name on a 1 MiB stack). Both abort
with a stack overflow without the fix.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:39:28 -06:00
Harrison O'Connor-Hoover 79e85c1b80 fix(edit): recalculate every cell changed by large clears (#1032) (#1128) 2026-10-15 13:38:13 -06:00
Marco Arnulfo 7a352cee09 Grid: an armed Format Painter paints whole rows and columns from their headers (refs #1211) 2026-10-15 21:22:40 +02:00
Marco Arnulfo c0d6f290e7 Name Manager: preview a name over several ranges through parse_name 2026-10-15 21:20:52 +02:00
NetterSilverandClaude Haiku 5.5 2bb222aea6 Sort and de-duplicate data.textToColumns fixed-width breaks
Found while testing crates/engine/src/cmd/data.rs:826

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 17:48:47 +02:00
ismaelezequiel c6be911b99 ui: truncate long workbook titles in the title bar 2026-10-15 12:43:48 -03:00
NetterSilverandClaude Haiku 5.5 883a07fb7b Keep nan/inf time and fraction look-alikes as text
Found while testing crates/core/src/parse.rs:~170 (parse_time, parts parsed with f64::parse)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 17:31:12 +02:00
MarekSpodBiedry 27dab49e3d UI: Delete dismisses the AutoComplete proposal, and deleting text never brings it back (#1521) 2026-10-15 17:16:35 +02:00
MarekSpodBiedry 98f4b9d855 Focus the Find what field when Find and Replace opens (#1518) 2026-10-15 17:16:20 +02:00
MarekSpodBiedry 0ec27a6101 Open the Insert Chart dialog from Recommended Charts instead of inserting a chart (#1399) 2026-10-15 17:15:12 +02:00
midasmatterhorn f8cbfb7cb6 engine: sort and remove duplicates move the rows' notes and hyperlinks
do_sort moved cells, formulas, cell pictures, row heights and floating
object anchors through the sort permutation, and remove_duplicates moved
cells and pictures through the compaction, but neither touched
Sheet::comments or Sheet::hyperlinks (keyed by CellRef): a note that
described one record stayed behind and annotated whatever landed on that
row — 'late payment' on a paid invoice — and a note on a row removed by
Remove Duplicates annotated blank cells. Sheet::comments/hyperlinks are
exactly the range-scoped side data that row and column inserts already
remap and edit.clear already clears, so the omission looks unintended.

Both maps now travel through the same permutation the cells use (the
sort collects before re-inserting, so a swap cannot resurrect an entry
from a destination that is also a source; Remove Duplicates compacts the
kept rows and drops the rest).

Regression test: sort_and_remove_duplicates_move_the_rows_notes_and_links
— on main the note and link stay on their old cells; with the fix they
travel with their record.
2026-10-15 17:40:18 +03:00
midasmatterhorn e6c0f92d59 engine: a cut takes the source's notes, hyperlinks and merged areas with it
A cut removed the source's cells and pictures and then re-created the
block's merged areas at the destination and copied its notes there — but
removed nothing from the source, so one merged block became two (an
empty one left behind) and a note ended up on both the old and the new
cell. Excel moves both and leaves the source clean.

The cut now clears the source range's comments, hyperlinks and merges
the same way edit.clear does. A second gap in the same path: paste never
transferred hyperlinks at all, so clearing the source would have lost
them — paste now carries hyperlinks (in What::All and a new
What::Hyperlinks, so edit.pasteSpecial {"what":"hyperlinks"} works
like "comments").

Regression test: a_cut_moves_the_sources_notes_hyperlinks_and_merges —
on main the old merge stays behind and the note is on both cells; with
the fix the merge, note and link all move and the source is clean.
2026-10-15 17:30:35 +03:00
midasmatterhorn 7deb382f3d xlsx: keep a table's filter criteria when the sheet AutoFilter coincides with it
The engine's live filter state is always sheet.autofilter — apply_filter,
filter_values, clear_filter, reapply and the slicer command all read and
write it, and a table's header dropdown installs one over the table's own
range — while Table::filter is only ever filled by the reader. Writing
suppressed the sheet <autoFilter> whenever any table merely intersected
it and wrote the table part from Table::filter, which was empty: a
filtered table saved with its rows still hidden and no criteria anywhere,
so on reopen there was no filter to clear and Excel showed an inactive
filter over mysteriously hidden rows. A slicer's selection was lost the
same way.

Fold the coinciding sheet filter's criteria into the table part (colId
offsets are relative to the range's first column, and both ranges start
at the same column, so they carry over verbatim); a filter that only
partially covers a table still has nowhere valid to go and keeps being
suppressed.

Regression test: a_table_filter_criteria_survive_a_round_trip — on main
the table part carries no criteria after a save; with the fold they round
trip, the hidden row stays, and the sheet keeps no duplicate autoFilter.
2026-10-15 17:22:31 +03:00
midasmatterhorn 18fecf8e8c engine: pageLayout.printTitles only touches the axes it is given
print_titles read both rows and cols as Options and assigned both
unconditionally, so {"rows":"2:2"} set title_cols = None and
{"cols":"A:A"} set title_rows = None: the repeated rows or columns
disappeared from every printed page with no message, and there was no
way to set or clear just one axis. The sibling pageLayout.pageSetup
already distinguishes "key absent" from "key present but empty"; read
both axes the same way — absent leaves the axis alone, empty/null clears
it, anything else that is not a range is an error rather than a silent
wipe.

Regression test: print_titles_keeps_the_axis_it_is_not_given — on main
the rows-only call clears the columns; with the fix each axis is touched
only when named, an explicit empty value still clears, and a bad range
errors.
2026-10-15 17:18:19 +03:00
midasmatterhorn 3f9b73b927 functions: NETWORKDAYS.INTL accepts the all-weekend string "1111111"
weekend_mask rejected the all-weekend string outright for both
NETWORKDAYS.INTL and WORKDAY.INTL, but Microsoft documents them as
differing: NETWORKDAYS.INTL "Using 1111111 will always return 0",
WORKDAY.INTL "1111111 is an invalid string". The crate already
implements that split — workday_core's per_week == 0 guard — which was
unreachable dead code while the extra clause stood. Drop the clause:
NETWORKDAYS.INTL counts zero workdays as documented and WORKDAY.INTL
errors through the guard it already has.

The existing test asserted the old behaviour and is updated.
Regression: working_days — on main the NETWORKDAYS.INTL assertion fails
(#VALUE! where Excel returns 0); with the clause dropped it passes and
WORKDAY.INTL is asserted to error.
2026-10-15 17:12:41 +03:00
NetterSilverandClaude Haiku 5.5 67be35564c Keep leading empty columns and rows when saving CSV/text
Found while testing crates/xlsx/src/csv.rs:204 (write_csv_limited, starts at sheet.used_range().start instead of A1)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 16:01:47 +02:00
Eduardo GarciaandClaude Sonnet 5.5 ea01ad999b fix #1443: Ctrl+Q no longer closes the window outside macOS
egui's default quit shortcut closed the window without asking to save.
Clear it off macOS (Cmd+Q stays the app's Quit there) and add a regression test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 10:49:49 -03:00
quantmind-br 47268a42af UI: function help follows the interface language
The argument hint, autocomplete, Insert Function and the Formulas-tab menus
read per-language tables of function descriptions and argument names
(i18n/<lang>_functions.rs), keyed by the catalog's English text and
binary-searched. The hint is assembled from the formula syntax's function
name and separator plus the language's argument names, all of them or none,
so it never mixes two languages. Insert Function searches the translated
descriptions and shows readable category names. SPANISH_HELP moves to
es_functions.rs with its 10 functions.
2026-10-15 10:49:13 -03:00
justinjohn0306 b930d60bc3 #1505: keep scalar INDEX MATCH formulas scalar 2026-10-15 18:32:00 +05:30
NetterSilverandClaude Haiku 5.5 e1902111d8 Read securities function dates in the workbook's date system
Fixes #1457

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:29:44 +00:00
adrdsouza 7f9f73d6ba fix(numfmt): share legacy colors across grid and PDF rendering 2026-10-15 16:10:07 +05:30
Harrison BoothandClaude Opus 5.5 6db94d154a Calc: INDEX with one index on a 2-D reference is #REF!, as in Excel
INDEX(A1:C3,2) returned the whole second row. Excel gives #REF! when a
reference has several rows and columns and the column argument is
omitted, so the error also carries into ranges built from it
(A1:INDEX(A1:C3,2)), position arrays (INDEX(A1:C3,{1;2})) and outer
functions. An empty column argument (INDEX(A1:C3,2,)) still gives the
row, and arrays are unchanged: INDEX({1,2;3,4},2) is the row.

Observed in Excel that a column array with one index,
INDEX({10;20;30},2), is a 1x1 array (TYPE 64), which is what calc
already returned; the new test pins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 05:19:32 -05:00
derechopiano 9097170b08 XLSX: preserve carriage returns in saved text 2026-10-15 10:33:57 +01:00
Harrison BoothandClaude Opus 5.5 4567aed5fb fix(engine): AutoFill refuses targets that don't hold the source in a corner
edit.autoFill capped source and target at 5M cells separately, but fill()
writes one cell per source lane per step, and it never checked the target
held the source. Whole rows into whole columns (`2:3` into `A:A`) filled
every one of 16,384 columns down a million rows: ~17 billion writes, then
a 24-51 GB allocation abort that catch_unwind can't stop.

Excel (observed via COM on a synthetic workbook) refuses AutoFill when the
target doesn't contain the source or holds it away from every corner, and
accepts any corner-sharing target. edit.autoFill now applies that rule
(fill::holds_source_in_corner), and fill() bounds lanes x steps by
MAX_FILL_CELLS as a backstop. The 5M literals in auto_fill and fill_dir
use the shared constant.

Regression test: fill::tests::autofill_refuses_targets_that_do_not_extend_the_source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:39:54 -05:00
icsimpiantiandClaude Opus 5.5 e1e02f82f1 i18n(it): Foglio previsione on the ribbon button too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:21:40 +02:00
icsimpiantiandClaude Opus 5.5 a770845ebf i18n(it): align ten labels with Excel's Italian terminology
Larghezza predefinita, Cancella regole dall'intero foglio, Foglio previsione,
Giorno feriale, Singola/Doppia contabilità, Statistiche, Layout rapporto,
and the Space key name in the command search hint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:21:15 +02:00
wstock 45644d3f43 Control channel: ui.dialog.confirm sends what OK sends (#1459)
OK runs a dialog's command with build_params(&d), which reshapes the
field values for several dialogs (the rule wrapper of cfQuick, the
delimiters list of Text to Columns, the columns of Remove Duplicates and
Subtotal, Data Validation's unused fields, Zoom presets, Series, Define
Name). ui.dialog.confirm passed the raw field values instead, so a
Highlight Cells rule confirmed over the control channel added nothing
and Text to Columns ignored the ticked delimiter.

Make build_params pub(crate) and use it from ui.dialog.confirm, say so
in the control protocol doc, and add tests driving the Greater Than and
Text to Columns dialogs over the control channel.
2026-10-15 07:06:31 +00:00
wstock 348d955a0a Conditional formatting: text rules never match an error value (#1162)
In Excel the "contains", "begins with" and "ends with" rules are
SEARCH/LEFT/RIGHT formulas, which fail on an error value, so an error
cell is never formatted by them and always matches "does not contain".
GridCraft matched on the error's display text instead, so #N/A
"contained" a and "began with" #.

Skip error values in the three positive rules and match them in
notContainsText, with a regression test over =NA(), =1/0 and text cells.
2026-10-15 06:57:38 +00:00
icsimpiantiandClaude Opus 5.5 2d4a537c6a i18n: add Italian (it) UI translation
Adds Language::It ("it", native name "Italiano") with a new per-language
module crates/ui-egui/src/i18n/it.rs, following the existing pattern
(translate(text) -> Option<&'static str>). The catalog has 971 entries:
every key the most complete catalog (pt) translates, plus the PivotTable
Fields pane strings (from es) and Options|Editing. Labels follow Excel's
Italian terminology (Foglio, Cartella di lavoro, Blocca riquadri, Unisci e
allinea al centro, Somma automatica...). Function names are not touched.

Also: it / it-IT / it_CH tags resolve to Italian (system-language default),
Language::ALL and the coverage/tag/age tests include Italian, and
docs/localization-parity.md lists the new language.

Not compiled locally (no Rust toolchain on the author's machine); relying on CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:52:36 +02:00
euisuhandOpenAI Codex 370b220834 fix(solver): commit solutions and reports atomically
Prepare report data before editing so refused reports cannot leave solution cells or the saved model changed. Commit accepted reports with the optional solution and model, retaining array/protection checks and row autofit after sheet insertion.

Closes #1050

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-15 15:23:19 +09:00
NetterSilverandClaude Haiku 5.5 cdc8177fae Let GROUPBY and PIVOTBY take a LAMBDA as their function
Fixes #903

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:09:18 +02:00
CouchRiv d59e1cf604 Merge remote-tracking branch 'up/main' into fix/sheet-param-honoured 2026-10-15 01:36:08 -04:00
CouchRiv bc524fa48e Merge remote-tracking branch 'up/main' into fix/conditional-format-style-colors 2026-10-15 01:36:05 -04:00
Camthalion77 4d68300bc2 Add Greek (el) localization 2026-10-15 08:31:40 +03:00
NetterSilverandClaude Haiku 5.5 22157433ce Fix fraction numerators saturating at u64::MAX for large values
Found while testing crates/numfmt/src/render.rs:470

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:48:41 +02:00
NetterSilverandClaude Haiku 5.5 1b4df8acc2 Refuse table names that clash with defined names or R1C1 references
Found while testing crates/engine/src/cmd/insert.rs:477

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:22:02 +02:00
NetterSilverandClaude Haiku 5.5 9b155c48f7 Stop BINOM.INV/CRITBINOM hanging when trials exceed 2^53
Found while testing crates/functions/src/stat.rs:1244

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:43:57 +00:00