Commit Graph

506 Commits

Author SHA1 Message Date
Brandon Thomas baaa606036 Merge pull request #396 from nihilist-narwhal/fix-xlookup-reference
XLOOKUP: return a reference when the result range is one
2026-10-11 15:49:34 -04:00
Brandon Thomas 6d59233e62 XLOOKUP reference path: an empty match_mode keeps the search_mode after it (review fix-up for #396)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:49:32 -04:00
Brandon Thomas c7bd7deebb Merge branch 'land' into fix-396 2026-10-11 15:49:00 -04:00
Brandon Thomas f173d6733d Merge pull request #387 from vangel76/fix/sheet-protection-password
Review: Protect Sheet passwords use Excel-compatible hashes, kept in XLSX (#346)

# Conflicts:
#	ROADMAP.md
2026-10-11 15:43:46 -04:00
Brandon Thomas 283b06453e Merge pull request #383 from vangel76/fix/sheetview-top-left-cell
View: restore and save the scroll position (topLeftCell) (#378)

# Conflicts:
#	ROADMAP.md
2026-10-11 15:43:45 -04:00
Brandon Thomas 12b46e6bbe Merge pull request #395 from vangel76/fix/space-selection-shortcuts
Keyboard: Shift+Space and Ctrl+Space select without starting an edit (#338)

# Conflicts:
#	ROADMAP.md
#	crates/ui-egui/src/grid.rs
2026-10-11 15:43:44 -04:00
Brandon Thomas 8498dedb7d Merge pull request #381 from vangel76/fix/shrink-to-fit
Grid: render Shrink to fit (#375)

# Conflicts:
#	ROADMAP.md
#	crates/ui-egui/src/grid.rs
2026-10-11 15:43:32 -04:00
Brandon Thomas d90a072d90 Merge pull request #380 from vangel76/fix/merged-range-borders
Grid: merged ranges draw their right and bottom borders (#376)

# Conflicts:
#	ROADMAP.md
2026-10-11 15:43:31 -04:00
Brandon Thomas 39c3b04d0d Merge pull request #382 from vangel76/fix/dx12-dxc-startup
Windows: compile DirectX 12 shaders with FXC, no DXC runtime needed (#339, #354)
2026-10-11 15:43:30 -04:00
Brandon Thomas 380b355d77 Merge pull request #400 from nihilist-narwhal/fix-index-array-args
INDEX: arrays of row and column numbers pick a value each
2026-10-11 15:43:13 -04:00
Brandon Thomas fca801c17e INDEX: compare the result size with saturating u64 math, so it can't overflow on 32-bit targets (review fix-up for #400)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:43:11 -04:00
Brandon Thomas fbb2285532 Merge branch 'land' into fix-400 2026-10-11 15:42:32 -04:00
Brandon Thomas 437881f53a Merge pull request #399 from nihilist-narwhal/fix-future-function-prefixes
XLSX: write the _xlfn. prefix for GROUPBY, PIVOTBY, ENCODEURL and the REGEX functions
2026-10-11 15:42:27 -04:00
Brandon Thomas d821aa1409 Merge pull request #398 from nihilist-narwhal/fix-relative-names
Defined names: relative references follow the cell that uses the name
2026-10-11 15:42:26 -04:00
Brandon Thomas 2657cb2fa6 Merge pull request #397 from nihilist-narwhal/fix-validation-formulas
Data validation: relative formulas, checked with the value being entered
2026-10-11 15:42:25 -04:00
Brandon Thomas 4dca02c89b Merge pull request #9 from justinjohn0306/fix/system-fonts-in-list
Fix: list and render installed system fonts (#4)
2026-10-11 15:38:44 -04:00
Brandon Thomas e211f666a6 Merge main into installed-fonts: workbook fonts bind on top of main's per-language font set and fallback faces; only families that survive drop_unparseable_fonts count as bound; a language switch rebinds them (review fix-up for #9)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:38:42 -04:00
vangel76 8587c2ba14 Review: Protect Sheet can't replace a sheet's password without unprotecting it
Re-protecting a password-protected sheet would drop its hash and let a
plain Unprotect succeed; it is now refused. The sheet tab menu offers
Unprotect Sheet on a protected sheet, like the ribbon.

Refs #346

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:36:05 +02:00
vangel76 6290bf123a Keyboard: Shift+Space and Ctrl+Space select without starting an edit (#338)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 21:32:57 +02:00
vangel76 22978a7e62 Review: Protect Sheet passwords use Excel-compatible hashes, kept in XLSX
Sheet protection stored an internal FNV hash that was never written to
XLSX, and an Excel sheet password was dropped on import, so imported
protected sheets could be unprotected without it. Protect Sheet now
stores a salted SHA-512 hash (spin count 100000) via PasswordHash; the
XLSX sheetProtection password (iterated or legacy) is read and written,
and Unprotect Sheet really verifies it. Hashes from older GridCraft JSON
workbooks are still read and verified.

Refs #346

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:29:10 +02:00
Brandon Thomas fb3737aa03 Merge pull request #19 from justinjohn0306/fix/vba-macro-preservation
Preserve VBA macros + Excel-style macros UX (issue #6)
2026-10-11 15:20:47 -04:00
Brandon Thomas 9bf5ecaf04 Merge main into VBA preservation; save macros only into .xlsm (an .xlsx never carries a VBA project); drop the shell round-trip script (review fix-up for #19)
The Rust round-trip test covers what scripts/check-vba-roundtrip.sh checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:20:45 -04:00
vangel76 fbabac15d4 Review: Protect Workbook dialog with an Excel-compatible password (#345)
The ribbon button toggled structure protection silently. It now opens a
Protect Structure and Windows dialog with an optional password; when a
password was set, unprotecting asks for it and really verifies it
(SHA-512, spin count 100000, salted). The password hash is read from and
written to XLSX workbookProtection (workbookAlgorithmName/HashValue/
SaltValue/SpinCount or the legacy workbookPassword); an unreadable one
stays locked. File › Info uses the same flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:12:24 +02:00
vangel76 04001fd943 View: restore and save the scroll position (sheetView topLeftCell) (#378)
The model read topLeftCell but the grid always opened at A1 and never wrote
the current scroll back. Sheets now open scrolled to their saved first
visible cell; saves record the current one (and the active cell) without
dirtying the workbook. Frozen panes use the pane's topLeftCell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:11:23 +02:00
Brandon Thomas 1d3abfa4a7 Merge pull request #203 from gyurix/system-theme-detection
Linux: the display theme asks the desktop, not winit
2026-10-11 15:09:46 -04:00
Brandon Thomas 55d41eb13c Desktop theme watcher starts only in the desktop app, not in every SheetApp (tests, embedders) (review fix-up for #203)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:09:43 -04:00
Brandon Thomas 0bea7178a2 Merge branch 'land' into fix-203 2026-10-11 15:04:30 -04:00
Brandon Thomas 177e52a14d Merge pull request #209 from Dejan-Port/print-only
web: print straight to the system print dialog, not just export
2026-10-11 15:04:11 -04:00
Brandon Thomas 04fb60ea5d Printing from the UI (Backstage, Ctrl+P, menu) goes through print_now, so the web build opens the browser's print dialog (review fix-up for #209)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:04:09 -04:00
vangel76 806a39a514 Windows: compile DirectX 12 shaders with FXC, never a stray dxcompiler.dll (#339, #354)
wgpu's default DX12 compiler (Auto) loads the first dxcompiler.dll on the
DLL search path. GridCraft ships none, so another program's copy is used;
without a matching dxil.dll its 'DXIL signing library not found' warning
fails wgpu's internal compute pipelines, the device is lost and the app
exits before the first frame. Pin FXC (part of Windows) unless
WGPU_DX12_COMPILER asks for another compiler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:02:20 +02:00
vangel76 3ae319154c Grid: render Shrink to fit (#375)
Cells with shrinkToFit drew at full size: text spilled or was clipped and
numbers showed ####. Too-wide content now gets a smaller font that fits the
cell or merged area, matching the PDF/print path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:01:12 +02:00
Brandon Thomas f8edb7c1a4 Merge branch 'land' into fix-209 2026-10-11 15:00:04 -04:00
Brandon Thomas 347d2a5bc2 Docs: catalog 274 / 290 after #211 and #193
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:59:45 -04:00
nihilist-narwhal 9d0053f3ad XLOOKUP: return a reference when the result range is one
XLOOKUP returned only values, so it couldn't end a range or feed
functions that need a reference: SUM(XLOOKUP("b",A1:A4,B1:B4):
XLOOKUP("d",A1:A4,B1:B4)) and SUM(B1:XLOOKUP(…)) gave #VALUE!, and so
did CELL("address",XLOOKUP(…)). A match on an empty cell gave 0, so
ISBLANK(XLOOKUP(…)) was FALSE and "x"&XLOOKUP(…) gave "x0" (#374). In
Excel XLOOKUP returns a reference to the matching row (or column) of
its result range. The evaluator now does so, finding the position with
XMATCH; arrays of lookup values, array arguments and errors still go
through the library function.
2026-10-11 13:59:08 -05:00
vangel76 7a4aaebab0 Grid: merged ranges draw their right and bottom borders from the edge cells (#376)
Excel stores a merged range's outline on the cells along each edge; the grid
only used the anchor cell's borders, so a boxed merge showed only top and left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:58:49 +02:00
Brandon Thomas dc85b2ab07 Merge pull request #193 from zaidshurbaji/feature/table-slicers
Feature/table slicers
2026-10-11 14:58:32 -04:00
Brandon Thomas 8aa9cad703 Slicers: the anchor uses #206's checked cell_param and stays on the sheet; drop the personal macOS workflow (review fix-up for #193)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:58:29 -04:00
nihilist-narwhal 686501c7de Data validation: relative formulas, checked with the value being entered
Validation formulas were evaluated as written, at every cell of the
range, and against the cell's old value. A Custom rule =A1>10 on A1:A9
rejected 20 typed into A1 (A1 was still empty) and checked A1, not A5,
when typing into A5; a Whole number rule "<= B1" on C1:C9 compared C2
with B1. As in Excel, the formulas are now relative to the first cell
of the range and see the value being entered.
2026-10-11 13:54:43 -05:00
nihilist-narwhal 683ff6003c Defined names with relative references
A name whose references have no $ was evaluated as if they were
absolute. In Excel such references are relative: defined from B2,
=Sheet1!A2 means "the cell to the left", and the file stores it
relative to A1 (Sheet1!XFD1, wrapping around the sheet's edge).

Name formulas with relative references are now moved by the using
cell's offset from A1, wrapping at the edges, and formulas.defineName
takes relative references as relative to the active cell, as Excel's
Name Manager does, and stores them relative to A1.
2026-10-11 13:53:26 -05:00
nihilist-narwhal 85ca8f6af5 INDEX: arrays of row and column numbers pick a value each
INDEX took one row and one column number, so INDEX(A1:C3,{1;3},{1,3})
gave a single value and SUM(INDEX(A1:C3,{1,2,3},2)) summed one cell.
In Excel, arrays of positions return an array of the values at each
(broadcast) position. A position that picks a whole row or column gives
#CALC! there, as arrays can't nest.
2026-10-11 13:52:23 -05:00
nihilist-narwhal 2ded7bf193 XLSX: write the _xlfn. prefix for GROUPBY, PIVOTBY, ENCODEURL and the REGEX functions
These were missing from the list of functions newer than the original
file format, so they were saved without the prefix, and Excel shows
#NAME? for such formulas.
2026-10-11 13:52:18 -05:00
Brandon Thomas 205981a52a Merge branch 'land' into fix-193
# Conflicts:
#	crates/engine/src/cmd/mod.rs
#	crates/ui-egui/src/chartview.rs
2026-10-11 14:48:14 -04:00
Brandon Thomas ce0483fc17 Merge pull request #211 from Zarvinx/feat/drag-selected-columns
Reorder selected columns by dragging headers
2026-10-11 14:47:43 -04:00
Brandon Thomas 506320b548 Merge branch 'land' into fix-211
# Conflicts:
#	crates/engine/src/tests.rs
#	docs/ui-parity.md
2026-10-11 14:39:47 -04:00
Brandon Thomas 743ca809cc Fix-up: Insert Copied Cells target and PivotChart anchor use #206's checked cell_param
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:34:37 -04:00
Brandon Thomas a9f9b09acc Merge pull request #365 from MarekSpodBiedry/issue-359
Ctrl+click on an already selected header or cell deselects it (#359)
2026-10-11 14:34:17 -04:00
Brandon Thomas 57ab1790ad Merge pull request #364 from MarekSpodBiedry/issue-362
Edit date cells as dates, not serial numbers (#362)
2026-10-11 14:34:16 -04:00
Brandon Thomas 1fc7f50104 Merge pull request #360 from ege-arhan/fix/formulas-ribbon-layout
fix(ribbon): Watch Window layout in Formulas ribbon (#342)
2026-10-11 14:34:14 -04:00
Brandon Thomas ff516650da Merge pull request #206 from mikl0s/
Cell references: an invalid reference is an error instead of the active cell
2026-10-11 14:34:10 -04:00
Brandon Thomas 76f3a29c79 Merge branch 'land' into fix-206 2026-10-11 14:23:51 -04:00