Commit Graph
1983 Commits
Author SHA1 Message Date
Hamza e5aeea7a94 Sheet protection: obey the Sort and Use AutoFilter boxes
`SheetProtection` carries eleven permissions. `format_cells` is checked in
`apply_style`, and an edit to a locked cell is caught after the fact by
`check_protection`, but `sort` and `autofilter` had no reader anywhere outside
`sheet_read.rs`, `sheet_write.rs` and a round-trip test: they only ever
travelled through the file. So a protected sheet could still be sorted, and
Ctrl+Shift+L still put an AutoFilter on it.

`refuse_unless_allowed` sits beside `locked_cell_error`, with three call sites:
`do_sort` (which both Sort… and the A-to-Z buttons come through), `toggle_filter`
and `filter_by`.

Where the box decides is worth knowing. Sorting a range of locked cells was
already refused, by the locked-cell guard rather than the permission, because a
sort moves values between locked cells — which is Excel's rule too ("users
cannot sort ranges that contain locked cells on a protected worksheet,
regardless of this setting"). So the Sort box decides for a range that has been
unlocked, while an AutoFilter changes no cell's contents and the box is the only
thing that ever decided it. The test asserts both, and that an unprotected sheet
still sorts and filters.

Not fixed here: Delete Rows and Delete Columns are refused even when their boxes
are ticked, because deleting removes locked cells and trips the same post-hoc
guard, while Insert Rows and Insert Columns work. Letting the guard know which
operation ran is a change to code every command passes through and wants its own
PR.
2026-10-19 22:30:36 +05:00
Hamza aff9153dac Calc: CELL("filename") names the workbook's file (#1489)
It returned an empty string for every workbook, saved or not, so the classic
sheet-name formula `MID(CELL("filename",A1),FIND("]",…)+1,31)` gave #VALUE!:
with no `]` in the string there is nothing for FIND to find. Excel returns
`<folder>\[<file>]<sheet>`, and empty only before the first save.

The model had no file to report. `source_dir` could not serve: it names the
folder relative links to other workbooks are relative to, and must keep naming
it after a Save As into another folder, because the links held in memory are
still written for the old one — only the saved copy is rebased. `source_path`
is therefore its own field, with that distinction written down.

It is set when a workbook is opened, from the path made absolute so the folder
is the one the user sees, and when a full-fidelity save makes a file the
document's own — before the `saved` snapshot, or the workbook would read as
dirty the moment it was saved, and only when it changes, so an ordinary Save
does not clone the workbook for nothing. A workbook that arrived as bytes knows
its name but never a folder and reports `[name]Sheet`, which still splits on the
`]`; an import reports the file it came from, as Excel does. The sheet is the one
the reference is on, not the active one.

CELL is volatile and already in the volatile sets, so a cell holding it answers
from the next recalculation; after a Save As that means F9 rather than the save
itself, which the engine test asserts rather than papers over. Making a save
recalculate is a larger decision than this issue.

`check` still skips CELL("filename") as volatile, as docs/cli.md says: the
cached value in a file is the folder of the machine that saved it.
2026-10-19 22:29:37 +05:00
Harrison BoothandClaude Sonnet 5.5 43655df887 Merge main into chore/contributors-harrison-booth
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 12:25:06 -05:00
bfentyandClaude da97bde61c fix(ui): seed Sort dialog column from the active cell
The Sort dialog's 'Sort by' box was a free-text field hard-coded to
'A', so sorting a region in column B silently sorted column A unless
the user noticed and retyped the letter. It now seeds from the column
the cursor is in and renders a dropdown of the current region's
columns, labelled with their header text. '+ Add Level' seeds the
next region column instead of a hard-coded B.

Closes #1906

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-19 17:21:50 +00:00
Mouhand-Kaddo 6760e006ec M12.AR15: never write a font family over 14 (review) 2026-10-19 21:18:06 +04:00
Mouhand-Kaddo 24b0b5d167 M12.AR15: keep cell fonts' charset and family on save 2026-10-19 21:18:06 +04:00
Mouhand-Kaddo 4faca49836 M12.AR13: read Windows-1256 Arabic CSV and text files as Arabic 2026-10-19 21:18:05 +04:00
Camilo Agudelo 6481c17150 In-cell editor: test that an unwrapped multiline edit shows every line (#1970)
desired_rows(1) only sets the field's minimum height; it grows with its
text. Pins that an Alt+Enter edit in a cell without Wrap Text shows all of
its lines and reserves no more. Review feedback on #1974.
2026-10-19 12:02:48 -05:00
quantmind-br f84557b4c6 Merge remote-tracking branch 'upstream/main' into function-help
# Conflicts:
#	docs/localization-parity.md
2026-10-19 13:58:48 -03:00
bfentyandClaude d19627fc26 fix(engine): walk stored cells in transitive precedent selection
Bound the all-level walk to the sheet sparse cell store instead of
iterating every position of each precedent area: formulas late in a
wide area are no longer skipped, blank positions are never selected,
and only formula cells extend the frontier. Adds a regression test
(=SUM(A1:Z1) with a formula at Z1) and silences two clippy lints in
the same function.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-19 16:54:45 +00:00
Harrison BoothandClaude Sonnet 5.5 f8cec7dd6d Merge main into fix/deep-recursion-crash
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 11:54:10 -05:00
Harrison BoothandClaude Sonnet 5.5 5e0b2dd45c Merge main into fix/sumproduct-mismatches
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 11:49:08 -05:00
Camilo Agudelo 3df5e05f0f In-cell editor: measure wrapped text at the field's own wrap width (#1970)
With Frame::NONE the text field takes no text margin off its width, so it
wraps at the editor's width less the 2 px inset a side. Measuring 8 px
narrower counted rows the field doesn't have and made the editor reach
over the cells below. A test pins the field's wrap width. Review feedback
on #1974.
2026-10-19 11:43:44 -05:00
Brandon Thomas 49fe41afbf Merge pull request #1892 from vedran-dobos:options-prefix-translations
# Conflicts:
#	crates/ui-egui/src/i18n.rs
#	docs/localization-parity.md
2026-10-19 12:33:01 -04:00
Brandon Thomas 4401b3e5c5 Merge pull request #1877 from SocraticsAI:host-chrome 2026-10-19 12:32:51 -04:00
Brandon Thomas aa4125952e Merge pull request #1910 from Silvertree2010:fix/1907-bug-touchscreen-devices-cannot-p 2026-10-19 12:32:51 -04:00
Brandon Thomas 8492416c74 Merge pull request #1916 from Silvertree2010:fix/1915-desktop-theme-watcher-opens-a-ne 2026-10-19 12:32:51 -04:00
Brandon Thomas 47fc3d5d35 Merge pull request #1922 from Silvertree2010:fix/h552-rangeref-parse-accepts-signed-ro 2026-10-19 12:32:51 -04:00
Brandon Thomas 70018d4e60 Merge pull request #1925 from DrM7md:nux/insert-delete-whole-lines 2026-10-19 12:32:51 -04:00
Brandon Thomas b402359fa4 Merge pull request #1938 from Mouhand-Kaddo:fix/html-export-rtl
# Conflicts:
#	docs/file-format-parity.md
#	docs/localization-parity.md
2026-10-19 12:32:51 -04:00
NetterSilverandClaude Haiku 5.5 3a2232cfef Enter bare numbers in Percentage-formatted cells as percents
Fixes #1967

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 18:31:57 +02:00
Brandon ThomasandClaude Opus 5.5 92c0d1e936 Chrome: turning the File tab off closes a Backstage that is already open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:23:08 -04:00
Brandon ThomasandClaude Opus 5.5 27f4c9c7bc Touch pan: a pan that never saw its release doesn't swallow the next press
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:22:57 -04:00
Brandon ThomasandClaude Opus 5.5 f5267cb74e docs: one Last updated line per parity doc after merging
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:22:25 -04:00
Brandon Thomas b77848ee21 Merge pull request #1882 from neilcawse:fix/pivot-grand-totals
# Conflicts:
#	docs/file-format-parity.md
2026-10-19 12:22:07 -04:00
Brandon Thomas f8e916bcd4 Merge pull request #1902 from Shnrqpdr:fix/1846-autofit-keytips
# Conflicts:
#	docs/ui-parity.md
2026-10-19 12:22:06 -04:00
Brandon Thomas ab6fd48856 Merge pull request #1867 from HyakoV3:fix/1808-csv-as-text
# Conflicts:
#	docs/file-format-parity.md
2026-10-19 12:22:05 -04:00
Brandon Thomas 06a94d42b2 Merge pull request #1935 from Mouhand-Kaddo:fix/shape-text-rtl
# Conflicts:
#	docs/file-format-parity.md
#	docs/localization-parity.md
2026-10-19 12:22:04 -04:00
Brandon Thomas 7b8aaf9ca7 Merge pull request #1939 from Mouhand-Kaddo:fix/xls-right-to-left-sheets
# Conflicts:
#	docs/file-format-parity.md
#	docs/localization-parity.md
2026-10-19 12:22:02 -04:00
Brandon Thomas 12ee27a177 Merge pull request #1943 from Mouhand-Kaddo:fix/table-name-length
# Conflicts:
#	docs/localization-parity.md
2026-10-19 12:22:01 -04:00
Brandon Thomas 8d562e9b56 Merge pull request #1879 from Silvertree2010:fix/h2804-custom-autofilter-is-less-than-l 2026-10-19 12:21:34 -04:00
Brandon Thomas 937cfd1e91 Merge pull request #1903 from justinjohn0306:fix/1855-backspace-undo 2026-10-19 12:21:29 -04:00
Brandon Thomas 46c706a491 Merge pull request #1845 from MarekSpodBiedry:issue-1830 2026-10-19 12:21:28 -04:00
Brandon ThomasandClaude Opus 5.5 33ac9e5f64 Drop the dbus-run-session test: it spawns a bus, sleeps 9 s and fails where dbus-daemon is missing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:21:13 -04:00
Brandon ThomasandClaude Opus 5.5 8968e83359 RangeRef::parse: whole columns take at most one $ too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:21:01 -04:00
Brandon ThomasandClaude Opus 5.5 f2473d1f33 Ctrl+Shift+= on several whole-row areas still opens the Insert dialog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:20:46 -04:00
Brandon Thomas a6757829eb Merge pull request #1814 from Higgs32584:fix-1447-pivot-bool-error-flags 2026-10-19 12:19:54 -04:00
Brandon Thomas 29f9959521 Merge pull request #1866 from HyakoV3:fix/1528-formula-edit-sheet 2026-10-19 12:19:53 -04:00
Brandon Thomas 8e8e2ba73c Merge pull request #1920 from vedran-dobos:range-fill-formats 2026-10-19 12:19:51 -04:00
Brandon Thomas 33a5415f0e Merge pull request #1941 from Silvertree2010:fix/h618-textbefore-textafter-with-negati 2026-10-19 12:19:50 -04:00
Brandon Thomas 859e654dce Merge pull request #1923 from DrM7md:nux/clippy-1-95 2026-10-19 12:19:25 -04:00
Brandon Thomas 93cb9828bd Merge pull request #1926 from DrM7md:nux/rtl-explicit-align 2026-10-19 12:19:24 -04:00
Brandon Thomas 851583365f Merge pull request #1934 from Mouhand-Kaddo:fix/arabic-name-length 2026-10-19 12:19:23 -04:00
Brandon Thomas 448c167e68 Merge pull request #1947 from Mouhand-Kaddo:fix/xls-dialog-sheets 2026-10-19 12:19:17 -04:00
Brandon Thomas 9767efe66e Merge pull request #1965 from HaSh3003:fix/1714-outline-zero-width 2026-10-19 12:19:16 -04:00
bfenty 752477a231 feat(ui): Ctrl+[ / Ctrl+] select precedent and dependent cells (#1865)
Adds formulas.selectPrecedents / formulas.selectDependents engine commands
and binds them to Ctrl+[ and Ctrl+] (Ctrl+Shift walks every level), matching
Excel's shortcut parity. Direct-level traces keep whole precedent ranges;
cross-sheet precedents jump to the owning sheet; an empty trace leaves the
selection untouched with an actionable message.
2026-10-19 16:13:44 +00:00
Hamza ea00ca6b1f Control channel: a request its sender gave up on is not run later
A request that waited more than 60 s was answered with a timeout and left in
the queue, so `control::poll` ran it on the next UI pass and dropped the reply.
The client was told its command had failed while the command was applied: an
agent that retried after the error ran it twice, and one that gave up left an
unexpected change in the workbook.

`ControlRequest` now carries who has it -- pending, taken by the app, or
abandoned by its sender -- as the report suggests. `poll` claims each request
and skips one it cannot claim; the connection thread abandons the request when
its reply times out, and says which happened:

  still queued     timed out waiting for the UI (is the window minimised?)
  already started  timed out waiting for the UI, which had already started the
                   request, so it may still finish; its outcome is unknown

The second case cannot be called a failure without guessing. This is the shape
DeckCraft settled on for the same bug (its #719), so the two apps now agree.

Fix: #1914
2026-10-19 20:57:25 +05:00
Lord-Taw 71acb0c50b Atualizar o i18n.rs
CoderabbitAI
2026-10-19 12:56:10 -03:00
Lord-Taw 5c4dbbbc4a Atualizar o i18n.rs 2026-10-19 12:54:24 -03:00
Lord-Taw 8f239e3b2f Update i18n.rs
coderabbit
2026-10-19 12:41:11 -03:00