2871 Commits
Author SHA1 Message Date
Dylan M. Taylor 11a5711ab1 xlsx: drop unresolved/non-workbook XLSB external formulas before remapping (#4601)
* xlsx: drop unresolved/non-workbook XLSB external formulas before ordinal remapping

* fix(xlsb): do not treat numeric structured-table headers as external ordinals
2026-11-20 16:45:35 -05:00
Dylan M. Taylor 0b2b5c6a79 xlsx: emit schema-valid externalLink child for missing/other XLSB slots (#4599)
* xlsx: emit schema-valid ddeLink child for missing/other XLSB externalLink parts

* xlsx: remap surviving XLSB external link ordinals and warn on missing links
2026-11-20 16:05:48 -05:00
Dylan M. Taylor 606fa7a37e xlsx: emit placeholder externalLink part and r:id for missing XLSB link slots (#4598) 2026-11-20 15:29:55 -05:00
Dylan M. Taylor d4ed031ec3 test(xlsb): cover external sheetData cell types and definedName attributes for SonarCloud (#4597) 2026-11-20 15:02:56 -05:00
Dylan M. Taylor 544a50c5cf xlsx: preserve external workbook target relationships on XLSB -> XLSX save (#4596)
* xlsx: preserve external workbook target relationships on XLSB -> XLSX save

* fix(xlsb): format CellRef with Display instead of nonexistent to_a1

* xlsx: preserve external link ordinals across missing slots on XLSB -> XLSX save
2026-11-20 14:41:44 -05:00
Dylan M. Taylor c89d550364 xlsx: adopt craft-libs#1347 for XLSB external-book formula decoding (craft-libs#778) (#4593)
* xlsx: adopt craft-libs#1347 for XLSB external-book formula decoding

* test(xlsb): encode BrtBeginSupBook nullable strings as u32
2026-11-20 13:49:02 -05:00
Dylan M. Taylor 442a40ecb1 xlsx: add full workbook import/save/reopen round-trip parity test (craft-libs#778) (#4589)
* test(xlsx): add full workbook import/save/reopen round-trip parity test (#778)

* test(xlsx): place <c:dTable> under <c:plotArea> in round-trip fixture

* test(xlsx): match <externalReferences with xmlns:r attribute in roundtrip assertion
2026-11-20 11:59:56 -05:00
Dylan M. Taylor 2bb905a441 mcp: add protocol transcript tests for initialize, cancel, and batch (#4588) 2026-11-20 11:32:16 -05:00
FredApps 17e276f95f Merge pull request #676 from xmaks82/i18n-ru-catalog
i18n(ru): translate 547 more labels, dialog strings and tooltips
2026-11-20 21:29:50 +07:00
Dylan M. Taylor 296ffbadce xlsx: partial sheet retention, trendline metadata pairing, and XLSB formulas/names (#4584)
* xlsx: complete remaining #778 items (partial sheet retention, trendline pairing, XLSB formulas/names)

* fix(xlsb): use Formula::new(&text), CellFormula::range, and Workbook::defined_names

* test(engine): expect preserved XLSB formula in xlsb_import_keeps_cached_values_and_reports_limits

* test(xlsx): trigger MismatchedTag in partial_sheet_read_retains_rows_and_pre_damage_layout

* test(xlsx): trigger TooDeep after row 1 in partial_sheet_read_retains_rows_and_pre_damage_layout
2026-11-20 09:21:56 -05:00
FredApps 6c5d06d805 Translate page order controls alongside Russian page setup labels 2026-11-20 15:16:23 +01:00
FredApps 2eb0e13a11 Merge main into Russian catalog update, preserving current translations 2026-11-20 15:05:13 +01:00
Dylan M. Taylorandkiwi4boy 48122b42c2 #2126: use shared XLSB text budget on desktop (#4577)
Co-authored-by: kiwi4boy <[email protected]>
2026-11-20 07:22:40 -05:00
Dylan M. Taylor 4aab8a7026 xlsx: delegate worksheet, drawing, and chart XML to craft-xlsx (storytold/craft-libs#778) (#4562)
* xlsx: delegate worksheet, drawing, and chart XML to craft-xlsx (storytold/craft-libs#778)

* xlsx: fix craft-libs type mismatches for CI gate

* fix(xlsx): borrow CANONICAL in drawing::Options::canonical

* xlsx: bump craft-libs to ed3aad7c3, sync Cargo.lock, and add #778 round-trip test

* xlsx: remove dead RowState fields and gate test-only push_a1

* xlsx: preserve per-series box-whisker quartileMethod and pin craft-libs main

* xlsx: read chartex series formulas and tx refs from chartData

* xlsx: handle chartex XML without chartData in read_chartex

* xlsx: honour omitted val attribute on <c:smooth/>

* xlsx: include series-level data_labels in Chart::data_labels

* xlsx: accept self-closing <a:rPr/> in equation_tests

* xlsx: detect secondary axis on combo groups with unreferenced axId

* fix(xlsx): replace ax_ids closure with fn to satisfy lifetime inference

* xlsx: fix clippy needless_lifetimes warning in chart.rs

* xlsx: preserve LineMarkers default and validation order before extLst

* xlsx: preserve same-type multi-axis charts, skip damaged note VML, and report oversized sheet XML as damaged

* xlsx: keep part-size TooLarge errors as IoError::TooLarge

* xlsx: read multiple hyperlinks blocks and cap merges at MAX_XML_NODES

* xlsx: use sheet_part.merges for MAX_XML_NODES check

* xlsx: read multiple cols blocks when present

* xlsx: keep SHEET_SLOTS order for AlternateContent oleObjects before controls

* xlsx: fall back to marker spPr solidFill for scatter series color

* xlsx: read chartex axis titles from cx:axis/cx:title

* xlsx: read chartex series color from cx:spPr/a:solidFill

* xlsx: read trendline CT_Boolean defaults and large forecast values from XML
2026-11-20 06:21:14 -05:00
Dylan M. Taylor 61ebc0e3df xlsx: delegate XLSB record and package parsing to craft-xlsx (#4561)
* xlsx: delegate XLSB record and package parsing to craft-xlsx (storytold/craft-libs#778)

* xlsb: validate [Content_Types].xml namespace

* fix(xlsx): pass Canonical::new to craft_xml::Options::canonical

* fix(xlsx): check strict rels XML and worksheet content type in xlsb

* fix(xlsx): fix craft_opc ContentTypes and rels_path in xlsb

* fix(xlsx): collapse if let for clippy

* chore: update Cargo.lock for craft-opc

* chore: repin craft-xlsx to craft-libs main
2026-11-19 20:08:40 -05:00
Dylan M. Taylor ba2bcb79e0 mcp: delegate server framing to craft-mcp-server (#4553) 2026-11-19 15:56:40 -05:00
Dylan M. Taylor 1687a9c05b Merge pull request #4523 from storytold/fix/omml-import-parity
Preserve OMML import fallback after shared math cutover
2026-11-19 02:52:33 -05:00
952a3b3f34 Shapes: select, resize from every handle and rotate (#1321)
* Shapes: rotation in the model, XLSX and object.move

Shape gains `rotation` (degrees clockwise about its centre, serde
default 0 so older workbooks load). XLSX reads and writes it as the
shape's `a:xfrm rot`. `object.move` takes `rotation` for shapes and
refuses it for charts, pictures and slicers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* UI: select, resize and rotate shapes with a full frame

A selected shape showed no frame, so clicking it looked like nothing
happened; only text boxes drew one. Every selected object now draws
the frame with eight resize handles (corners only on small frames),
and shapes add a rotation handle above the top edge.

- Each handle resizes from its own side; the opposite side stays put.
  Shift keeps the aspect ratio on a corner.
- The rotation handle turns the shape; Shift snaps to 15 degrees.
- A turned shape paints, hit-tests and resizes along its own axes.
- Each handle shows the cursor for its direction; the body shows Move.
- Arrow keys nudge the selected object 6 pt (Ctrl/Alt: 1 pt), Escape
  deselects it, Enter/F2 edits a text box.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Shape text test: the new rotation field starts at zero

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Shapes: keep flat lines flat, Ctrl+arrow nudges, finite rotation, ink does not rotate

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Shapes: no resize handles on ink, handles act only over cells, arrows follow the screen on right-to-left sheets

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Merge upstream main into fix/shape-select-rotate

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Print rotated shapes and shape text

* Fix rotated PDF regression assertion

* Fix protected rotation and flat-line resizing

* Format shape rotation regression changes

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Fluorine <[email protected]>
2026-11-19 00:00:18 -06:00
Dylan M. Taylor 6ec4034b26 fix(xlsx): retain visible text in rejected Office Math boxes 2026-11-18 22:06:41 -05:00
Dylan M. Taylor 3b06206327 Wire craft-xls and craft-drawingml from craft-libs main (#4516)
* Wire craft-xls and craft-drawingml to craft-libs main (#778)

* fix(xlsx): simplify nonminimal_bool in drawing.rs
2026-11-18 21:59:29 -05:00
Dylan M. Taylor 72f11bbacb fix(xlsx): preserve OMML fallback and bound conversion 2026-11-18 21:49:15 -05:00
Dylan M. Taylor 5cbe45d16e Cut over xlsx omml to craft-math (#4515)
* Cut over xlsx omml to craft-math (storytold/craft-libs#778)

* fix(omml): preserve opposite-side brace limit placement
2026-11-18 21:41:12 -05:00
5514a3a099 xlsx: fix main after the ODS cutover (clippy, empty first sheet, values, package checks) (#4518)
* xlsx: clear the two clippy errors the ODS cutover left on main

SheetNames::insert lost its only caller when the ODS reader moved to
craft-ods, and craft_ods::Value::Text already holds an Arc<str>.

* xlsx: ODS import keeps only the ODS tables, with unique valid names

The craft-ods cutover (#4513) built the workbook with Workbook::new(),
which already holds an empty Sheet1, and appended the ODS tables after
it. Opening an ODS file therefore showed an empty first sheet, and
ods_import_keeps_cached_values_and_reports_limits (plus the reader's
own sheets[0] tests) failed. It also stopped making sheet names unique
and valid, so two tables named Data and data became two sheets with
clashing names.

Clear the default sheet as the XLSX, XLS and XLSB readers do, and name
sheets through SheetNames again, as the reader did before the cutover.
That restores SheetNames::insert, which the previous commit removed
while it was unused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* xlsx: ODS import keeps unreadable values as text and the exact mimetype check

Three more behaviours the craft-ods cutover (#4513) dropped, each
covered by an ods_tests case that has failed since:

- A cell whose typed value cannot be read (an unparsable number or
  date, a calcext error cache, a formula without a result) was skipped
  or marked unavailable. It keeps its displayed text again, else its
  raw value, with the same warning as before.
- Number formats are the old ones again: [h]:mm:ss.000 for durations
  and yyyy-mm-dd hh:mm:ss.000 for dates with a time. They are applied
  only when the typed value was read.
- read_ods checks the exact mimetype first, as sniff does; craft-ods
  alone accepted one with a trailing space.

The encryption case now writes its encryption-data inside the
content.xml file entry, where LibreOffice puts it and where craft-odf
looks for it. A bare one under the manifest root encrypts nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: FredApps <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-19 09:10:52 +07:00
MaciekandMaciej Malinowski 42acfafcd3 Find and Replace: Undo and Redo reach the sheet while the dialog is open (#2140)
* Find and Replace: Undo and Redo reach the sheet while the dialog is open

Ctrl+Z after Replace All did nothing until the dialog was closed: the open
dialog kept the keyboard from the grid. The dialog now undoes and redoes
the workbook itself unless a text box has focus (there the shortcuts edit
the typed text).

* Find and Replace: Undo and Redo use the sheet's shortcut table

The dialog passed hard-coded keys to edit.undo and edit.redo. It now hands
Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z and Cmd/Ctrl+Y to ribbon::shortcut, the table
the grid uses, so the dialog and the sheet keep the same bindings. The test
also covers the Mac Redo shortcut (Cmd+Shift+Z).

* fix(find): allow workbook undo when a dialog button has focus

Reserve Undo/Redo for text editing only while a text edit has focus. The regression reproduces the failure with keyboard focus on Replace All, checks both Redo shortcuts, and verifies text-field Undo leaves the sheet unchanged. Regression failed before the fix and passes now. Validation: 1143 UI integration tests pass; only existing missing-glyph failures U+1E9E and U+1EBB remain. WASM, assets, layers and generators pass. Full CI reaches the unchanged Windows CLI clippy::only_used_in_recursion failure in apps/gridcraft-cli/src/check.rs.

* fix(find): block workbook shortcuts behind a modal message

Check app.message before dispatching workbook Undo/Redo. Regression uses an empty Replace All search to open the real error, covers all three shortcuts, and checks Redo after dismissal. Extend text-focus coverage to type and undo actual text. Modal regression fails before the guard and passes after it. Validation: 1144 integration tests pass; two existing missing-glyph failures remain. WASM, assets and layers pass. Full CI still stops at the unchanged Windows CLI clippy::only_used_in_recursion warning.

---------

Co-authored-by: Maciej Malinowski <[email protected]>
2026-11-19 08:37:18 +07:00
Dylan M. Taylor 83ab01678a Cut over gridcraft-xlsx ODS reader to craft-ods (#4513) 2026-11-18 17:22:18 -05:00
Michael Higgins 00e8f4fae0 Drag a selected chart's data outline to change its range (#4389, #4390) (#4391)
#4389, #4390: drag a selected chart's data outline to change its range

A selected chart now outlines its data as Excel does: series names in red,
category labels in purple and the values as one blue block. The values
block has a handle on each corner. Dragging one previews the new block,
and the release points the chart at it as one undo step. Esc cancels.

The new engine command chart.setValuesRange does the move. Each series
keeps its formatting, a wider block adds series and a narrower one drops
them, and names, category labels and bubble sizes that line up with the
block follow it. PivotCharts and series that are not one block are
refused.
#4389: chart data drag review fixes

- Category labels are compared as blocks, so a reference written with a
  leading = still counts as the same labels.
- A resize keeps the orientation the series were read in, so a chart
  shrunk to one cell per series stays resizable.
- The preview stays while edge scrolling moves the chart off screen.
- A values corner hidden under frozen panes is not a handle.
- The release takes the block from the pointer's last position, even when
  it moved in the release frame.
- Esc cancels the drag with Ctrl or Cmd held too.

Each fix has a test that fails without it.
#4389: read a corner drag from the grabbed corner's own cell

A values corner lies on a cell boundary, which belongs to the next row
and column, so a press on the bottom-right corner of A1:A5 read as B6:
releasing where the press was, or dragging straight down the edge of
column A, changed the other axis too. The drag now records the offset
from the press point to the centre of the corner's cell and reads the
pointer through it, so the press point stays in its cell and each whole
cell of movement moves the corner by one.
#4389: snap a dragged chart data edge to the nearest gridline

Reading the pointer from the middle of the grabbed corner's cell let the
grabbed row's height decide when the block moved: with a tall row 5 and
a short row 6, the pointer reached the bottom of row 6 while the block
stayed at A1:A5. Each edge the corner moves now snaps to the gridline
nearest the pointer, so every row and column changes over at its own
middle. A release where the press was still changes nothing, since the
corner lies on its own gridlines, and an edge dropped on its fixed edge
keeps one row or column.
#4389: drop a chart data drag when the chart's data changes under it

A command run between frames (the control channel, a macro) could change
the chart's values block while the button was held, and the release then
put the dragged block over that change. The drag now checks, from the
session, that the chart still plots the block it started from: a move
drops a stale drag, and the release skips it.
2026-11-18 21:53:00 +07:00
neilcawse f8af138f28 XLSX: read, evaluate and write Excel 2010 conditional formats (#717)
XLSX: read, evaluate and write Excel 2010 conditional formats

Excel 2010+ keeps conditional format rules whose formulas refer to
other sheets only in the worksheet's x14:conditionalFormattings
extension, with xm:f formulas and an inline x14:dxf in place of a
dxfId. GridCraft skipped the whole extension with a warning.

Read: x14 cellIs (every operator, one or two formulas), expression,
blanks, errors, duplicate/unique, top 10, above average and time
period rules become ordinary rules, with the inline differential
format (font, fill, border, number format) and priorities that
interleave with the main section's. A data bar's linked extension
(the x14:id of a main-section rule) adds no second rule. Other x14
kinds (data bar settings, x14 icon sets) are skipped with a warning
naming the kind.

Evaluate: cross-sheet references in rule formulas already resolve;
an engine test pins cellIs and expression rules against cells on
another sheet.

Write: a cell-value or formula rule referring to another sheet is
written in the x14 extension ({78C0D931-6437-407d-A8EE-F0AAD7539E65})
with an inline x14:dxf and a unique id; other rules stay in the main
section. The extension shares one extLst with the sparklines (CF
first). Inline number formats get ids styles.xml declares.

XLSX: say which x14 conditional format rules stay in the main section

Colour scale, data bar and icon set rules are always written in the main
section, even when their cfvo formulas refer to other sheets; the parity
docs now say so. (This commit first dropped the
reader's own x14:id linking; after the rebase onto main, main's data bar
linking from #550 is the one path, so only the docs part remains.)
XLSX: correct the x14 conditional format provenance and list skipped kinds

The file that motivated the x14 conditional format work
(watchdog-report.xlsx) was saved by LibreOffice 25.2, not Excel, so
nothing observed in Excel backs the earlier commit's statement that
Excel 2010+ keeps cross-sheet rules only in the extension. MS-XLSX
2.6.27 (CT_CfRule) allows single-sheet references in xm:f but says
nothing about where Excel places such rules; the comments and docs now
say the placement follows the LibreOffice-saved file and Excel's own
is unverified.

MS-XLSX 2.6.27 forbids sheet-range-reference (3-D spans) in xm:f, so a
rule with a 3-D span now stays in the main section.

The parity docs and gaps list name the x14 kinds read (cellIs,
expression, blanks, errors, duplicate/unique, top10, aboveAverage,
timePeriod) and those skipped with a warning and lost on save (data
bars, icon sets, colour scales, containsText, notContainsText,
beginsWith, endsWith).

Styles: differential formats keep their cell protection on save

dxf_xml, which writes both styles.xml dxfs and inline x14:dxf elements, wrote font, number format, fill, alignment and border but never protection, although read_dxf reads it. A rule whose format unlocked or hid cells lost that on save. It now writes protection after border, the order CT_Dxf requires.
XLSX: solid data bars are saved with negatives in the bar colour and no axis, as GridCraft draws them
docs: order parity revision history
docs: record verified x14 conditional format placement
docs: fold the Excel check into the PR's own changelog row instead of a new dated row
docs: the Excel check covered cross-sheet expression rules, not cell-value rules
Fix differential format serialization
Preserve default dxf protection
2026-11-18 21:13:46 +07:00
Harrison Booth aef4ceb10d RATE follows Excel's iteration (#2502)
fix(functions): RATE follows Excel's iteration

RATE used Newton with fallbacks and a bracketing search, so it found roots
Excel doesn't and missed the last iterate Excel returns. It now follows
Excel's solver as observed with synthetic inputs: a secant iteration from
the guess and the guess moved 0.001 toward a larger equation value, at most
200 steps, stopping when a step is under 1e-7 and the equation is within
1e-7 of zero (or as close as its terms allow), with the result more than
1e-7 above -100%. After 200 steps the last iterate is kept if it is within
a looser 1e-4. Subnormal steps flush to zero as in Excel.

RATE(5,0,-100,0) is now -0.999999409145182 like Excel (was #NUM!), and
RATE(4,0,-0.0001,100) is #NUM! like Excel (was 30.62). A guess at or below
-1 is #VALUE!. IRR and XIRR keep their solver.

RATE test: compare with a relative tolerance, not exact equality
ROADMAP: keep the progress log in descending date order
RATE: pin Excel's #NUM! for a fractional nper with a guess near -1
2026-11-18 20:39:57 +07:00
FredApps 8f8078c134 Fix main's build and tests after the recent merges (#4474)
- Import SheetApp in the pivot pane tests.
- Move the keyboard owner check out of keyboard() to stay within the complexity limit.
- Aim the title bar button helper at the button's own node.

Fixes #4473.

Signed-off-by: FredApps <[email protected]>
2026-11-18 19:50:37 +07:00
Michael Higgins a3119f57c2 xlsx/csv: cap secondary reader allocations (#2159) (#2199)
* xlsx/csv: cap secondary reader allocations (#2159)
  
  - XML: at most 1M children per element, 16,384 per worksheet row (TooLarge).
  - Workbook-wide cap of 16M cell elements.
  - Array-formula ranges indexed by row (budgeted), not scanned per cell.
  - <cols> writes share a 4M budget.
  - At most 4096 sheets; duplicate names deduplicated with a HashSet.
  - Pivot: field lists capped, repeated fields used once, labels borrowed.
  - CSV: fields past MAX_COLS dropped while reading the record.
  - At most 4M shared strings.
  - Relationships looked up by id through a HashMap.

* xlsx: close the remaining secondary-reader cap gaps (#2159)
  
  - CSV: characters of a field past column 16,384 are not stored; quotes,
    delimiters and line ends in it are still followed.
  - Pivot: a field list cut at MAX_FIELDS is reported with a warning.
  - Sheet names: the prefix shortens once the (n) suffix passes (999), so
    deduplicated names stay within 31 characters.
  - Rows dropped for a bad row number still charge their <c> elements
    against MAX_CELLS.
  - Test Ctx helper gains the fields upstream added.

* #2159: describe MAX_CELLS as the reader's own cap
  
  calc::eval::MAX_CELLS has the same value but limits one array result,
  not a workbook.

* #2159: warn on capped pivot cache fields, dedupe pivot names through sets
  
  A cache cut at 16,384 fields is now reported, as the table field lists
  are. Axis filters and calculated fields are deduplicated through a set
  of lower-cased names instead of a scan per field, which was quadratic in
  the 16,384 fields allowed; the first of names equal but for case still
  wins.
2026-11-18 16:36:37 +07:00
NetterSilver 272ae54101 Delete separate rows or columns in one pass (#2385)
* Delete separate rows or columns in one pass
  
  Fixes #2287
2026-11-18 16:35:49 +07:00
NetterSilver bf48def687 Create new saved files without group/other write permission (#2567)
* Create new saved files without group/other write permission
  
  Fixes #2519
2026-11-18 16:35:20 +07:00
FredApps 644861c132 Merge pull request #449 from neilcawse/fix/main-ci-csv-tests
CSV/text export: General numbers without exponents (integers below 1e16 exact); `&` switches to scientific past 21 characters
2026-11-18 16:34:02 +07:00
FredApps a492d8031a Merge pull request #3574 from SBaksa/intl-no-xlfn
XLSX: NETWORKDAYS.INTL and WORKDAY.INTL are saved without _xlfn. (fixes #3517)
2026-11-18 16:27:48 +07:00
FredApps 5b1d89f867 Merge pull request #3047 from quantforge-br/function-help-portuguese
UI: Brazilian Portuguese function help
2026-11-18 16:27:25 +07:00
FredApps 1f0d416f74 Merge pull request #3046 from quantforge-br/fix/spill-priority
Calc: a contested spill area stays with its array on full recalc and reopening (#964)
2026-11-18 16:27:02 +07:00
FredApps 21def4fa1a Merge pull request #2303 from MarekSpodBiedry/issue-2285
XLSX: write spilled text as cached strings, not shared strings (#2285)
2026-11-18 16:23:35 +07:00
FredApps 61ee368369 Merge pull request #2298 from dfendr/fix/table-style-looks
Tables: Give each style row its own look
2026-11-18 16:23:13 +07:00
FredApps d1a5c9671f Merge pull request #2293 from storytold/test/backfill-regression-tests
Regression tests for #223, #360 and #1485
2026-11-18 16:22:51 +07:00
Dominik Strebel 12dd9aea9b test: header AutoFit check measures the text as AutoFit did (#2273)
* test: header AutoFit check measures the text as AutoFit did
  
  table_filter_autofit_works_through_command_and_header_double_click
  compared the autofitted column with the engine's text-width estimate,
  but in the app AutoFit measures with the installed fonts
  (Session::text_width). Where those are narrower than the estimate (a
  Mac with Carlito, metric-compatible with Calibri), the estimate
  "overlapped" the filter button and the test failed on main. It now
  measures with the same function AutoFit used.

* test: the header AutoFit UI check measures with the app's fonts, which the app always installs
  
  The fallback to the engine's estimate never ran: SheetApp::logic installs the measure before
  AutoFit. AutoFit on the estimate is covered by the engine's autofit_filter_buttons tests.
2026-11-18 16:22:30 +07:00
FredApps 6980b00dac Merge pull request #2040 from alphazw/fix/ime-first-keystroke-bypasses-composition
IME: the first keystroke of a composition no longer lands in the cell
2026-11-18 16:22:08 +07:00
FredApps f36eaf3fbe Merge pull request #1960 from Hamza0101/checkbox-space
Space on a checkbox cell toggles it and nothing else
2026-11-18 16:21:31 +07:00
Vedran Doboš 12e1b5379b Keyboard: punctuation shortcuts follow the character the layout types (#1384) (#1385)
* Keyboard: punctuation shortcuts follow the character the layout types (#1384)
  
  On a Croatian or German keyboard Shift+, types `;`, so Excel inserts the
  date with Ctrl+Shift+,. GridCraft matched the key's US position and ran
  Decrease Font Size. Punctuation keys now go by the character typed
  (translated to the US key and Shift that type it), digits keep their
  position, and a character egui has no key for (č, ö) still falls back to
  the position. ribbon::shortcut reads the same key, so Ctrl+Shift+0
  typing `=` unhides columns instead of opening Insert, and Ctrl++ opens it.

* Keyboard: Cmd+Shift+; on a Mac doesn't insert today's date (review)
  
  ribbon::shortcut's Semicolon arm took Shift too, so the US-key mapping turned Cmd+Shift+; (and
  Cmd+Shift+. on a Croatian or German layout) into the date. Ctrl+Shift+; stays the time.

* Keyboard: tests for AZERTY and Czech, and for typing while a cell is edited (#1384)
  
  French AZERTY (`;` and `:` unshifted on the US `,` and `.` keys) and Czech (`;` on the US
  backtick key, `:` Shift+.) give the date and the time with Ctrl. The layout mapping runs only
  in the grid, which reads no shortcuts while a cell is edited; a test pins that: `;` and `:` typed
  as Shift+, and Shift+. on a Croatian or German keyboard go into the cell, and the font size stays.
2026-11-18 16:20:40 +07:00
bea2191b35 Fuzzer: undo checks follow the bounded undo history (#2332)
* Fuzzer: undo checks follow the bounded undo history

The undo history drops its oldest steps past 100 entries or 128 MB of snapshots (#1263). The
command-sequence fuzzer still compared "undo everything" with the episode's starting workbook,
so any episode whose snapshots passed the budget failed with "undoing all N steps doesn't give
back the starting workbook" although undo worked (seeds 104, 110 and 163 at 80 steps: a column
inserted next to whole-column borders, or rows deleted after filling whole columns, each made a
100 MB step).

The harness notices when an undoable command changed the workbook without the history growing,
and then compares with the state before the oldest step still in the history.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fuzzer: undo and redo checks follow the reachable history boundary

Review of #2332. The harness now tracks the oldest state the undo history
can reach instead of a trimmed flag: whenever the history's oldest entry
changes without it emptying in between, the history dropped a step, and
undoing everything stops at the new oldest entry. That boundary is kept
when an edit.undo in the sequence uses up the retained history before the
episode ends, which used to fall back to the episode's start and report a
false undo mismatch.

The redo round trip no longer assumes n undos leave n redo entries: the
redo history is bounded too, so when it dropped the first step undone,
redo is expected to stop at the oldest entry it kept.

---------

Co-authored-by: nihilist-narwhal <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-17 22:36:17 -06:00
Neil Cawse 620174e069 Merge remote-tracking branch 'upstream/main' into fix/main-ci-csv-tests 2026-11-18 04:18:44 +00:00
Valentin KleinandClaude Opus 5.5 4c388df949 Flush a saved workbook to disk before replacing the old one (#3178)
* Flush a saved workbook to disk before the rename

write_file renamed the temporary file over the workbook without sync_all, so a power loss right after a save could leave an empty or truncated file under the workbook's name. Sync the file before the rename and, on unix, sync the folder after it (best effort).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Tolerate file systems that cannot flush when saving

On Apple targets std's sync_all asks for F_FULLFSYNC, which network mounts refuse with ENOTTY or ENOTSUP. Treat exactly those errors (and ErrorKind::Unsupported) from the temp file's sync as 'cannot flush here' and carry on with the rename, as before the flush was added. All other errors still fail the save.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Treat raw error 25 as unsupported-flush only on Unix

On Windows 25 is ERROR_SEEK, a real failure that must not be skipped.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Save: treat Apple's ENOTSUP from F_FULLFSYNC as unsupported flush

On Apple targets ENOTSUP is 45 and std leaves it uncategorized (only
EOPNOTSUPP, 102, and ENOSYS map to ErrorKind::Unsupported), so a volume
refusing F_FULLFSYNC with ENOTSUP failed the save and deleted the
temporary file. The raw code is now matched on Apple targets only;
elsewhere 45 is a different errno and stays a failed save. The check is
split into a platform-parameterised helper so each platform's codes are
tested on any host, plus an Apple-only test on the real helper.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-18 08:44:04 +07:00
Cheejyg 807cf23b02 Sort: Custom Sort dialog redesign (#1593)
* Sort: Custom Sort dialog redesign

* Sort: keep the dialog on its worksheet and open when sorting fails

* Improve custom sort dialog and localisation

Localise sort controls and adapt their layout to translations. Track worksheets by identity, restore selections across sheet changes, and allow additional levels to reuse columns.

* Fix sort dialog worksheet and input handling

Open Sort on the requested worksheet, reject invalid ranges, and close any open filter menu so Enter confirms the sort. Add regression tests for each case.
2026-11-18 08:43:41 +07:00
Neil Cawse 24f58a2ee4 Merge remote-tracking branch 'upstream/main' into fix/main-ci-csv-tests 2026-11-17 13:24:58 +00:00
Neil Cawse 319a3e4c2e Merge remote-tracking branch 'upstream/main' into fix/main-ci-csv-tests 2026-11-17 04:15:59 +00:00
Dylan M. Taylor 4c943670cf pdf: move object and xref envelope writing to craft-pdf (#4398) 2026-11-16 21:58:31 -05:00