Commit Graph

1013 Commits

Author SHA1 Message Date
Eduardo Soares 26c6e3df44 #833: pin hidden-row formatting, grow-only restore branch, tighten tests 2026-10-12 20:48:43 -03:00
Eduardo Soares dc3ccc4ea0 #833: docs — track row auto-fit for oversized fonts
# Conflicts:
#	ROADMAP.md
#	docs/gaps.md
2026-10-12 20:48:43 -03:00
Eduardo Soares 1086e4aab8 #833: opened files grow non-custom rows to their tallest font 2026-10-12 20:47:31 -03:00
Eduardo Soares a0a17b154c #833: whole-row/column formatting re-fits row heights 2026-10-12 20:47:31 -03:00
NetterSilver 805ffba836 Docs: update the progress docs for this change 2026-10-13 01:46:09 +02:00
NetterSilver c5c1763774 XLSX: keep chart sheets on open and save (#727)
Chart sheets (a sheet that holds one chart; Move Chart > New sheet, F11) were
skipped on open, and their chart sheet, drawing, chart, style and colour parts
were dropped with them because the pass-through treats those kinds as content
GridCraft rewrites. Saving a workbook lost every chart sheet.

They are now kept as they were: the <sheet> entry (name, visibility and its
place among the worksheets), the chartsheet part and everything behind it,
byte for byte, written back in place. The workbook's other sheet positions
(active tab, print areas, scoped names) are computed with the chart sheets
counted. A chart sheet is left out on save when the chart is no longer
valid for the workbook: a sheet it plots was deleted or renamed, or a
worksheet took its name.
2026-10-13 01:45:40 +02:00
derechopiano cf7138b5e1 UI: Show rule-specific data validation fields 2026-10-13 00:31:48 +01:00
NetterSilver daeda9db47 Credit Silvertree2010 in the About window 2026-10-13 01:17:16 +02:00
NetterSilver d1260e1878 Docs: update the progress docs for this change 2026-10-13 01:17:16 +02:00
NetterSilver 39b3d55f8a CSV export: refuse a file over 512 MiB instead of expanding the whole used range (#528)
write_csv visited every position of the used range and appended to one growing
String with no limit, so two cells far apart (A1 and XFD1048576) asked for
about 16 GiB of commas. The output is now capped at 512 MiB: a lower bound
(delimiters and line ends of every row) is checked before anything is
allocated, and the text written so far is checked after each row. Over the
cap, write_csv returns IoError::TooLarge naming the rows, columns and limit,
and Save As / Export CSV and TSV report it without writing a file. Accepted
exports are unchanged. write_csv now returns a Result.
2026-10-13 01:16:05 +02:00
Marco Arnulfo 68a3eabe20 Sheet tabs: All Sheets navigator with a filter field (fixes #839) 2026-10-13 00:25:32 +02:00
Marco Arnulfo 443301f9ee UI: Enter pastes the copied range and ends copy mode (fixes #845) 2026-10-13 00:21:25 +02:00
Bryan Mark a38c58ef48 Merge branch 'main' into recent-modified
Brings in upstream main (0.6.1), which fixes the two CSV tests this
branch failed CI on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 07:20:22 +09:00
Marco Arnulfo 9c3db37ca2 UI: AutoComplete folds case beyond ASCII and cuts the proposed rest on characters (#842) 2026-10-13 00:18:55 +02:00
Marco Arnulfo a7e22d299f Grid: horizontal scrollbar in the sheet tab bar (fixes #840) 2026-10-13 00:14:40 +02:00
Marco Arnulfo 7a8235a586 UI: AutoComplete for cell values can be turned off, Backspace and Escape drop the proposal (fixes #842) 2026-10-13 00:13:35 +02:00
Marco Arnulfo 1f19bf4a27 Grid: Shift+arrows in point mode extend from the pointed cell, also up and left (fixes #835) 2026-10-12 23:28:26 +02:00
bmh129 0153457580 View ribbon: lay out the Show group's checkboxes in two columns
The Show group stacked Ruler, Formula Bar, Gridlines and Headings in
one column, but the ribbon body fits only three rows, so Headings was
cut off at the bottom and could not be reached. The four checkboxes now
sit in two columns of two (Ruler/Gridlines, Formula Bar/Headings), as in
Excel's Show group. Checked in English and German, which has the
longest labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:03:47 -05:00
Marco Arnulfo 52b4f873c7 XLSX: a hyperlink to another file is saved as an external relationship (fixes #800) 2026-10-12 22:57:20 +02:00
Marco Arnulfo 484612f638 XLS: formulas that use a skipped defined name keep their saved results (fixes #803) 2026-10-12 22:56:40 +02:00
Marco Arnulfo 5406fc5629 XLSX: Save As into another folder keeps links on the same workbook (fixes #801)
Excel stores the path of a linked workbook relative to the file that uses it, and rewrites it when the file is saved into another folder. The path was kept as text, so after Save As it named a file next to the new copy: a missing link, or another workbook with the same name. Relative externalLinkPath targets are now resolved against the folder the workbook was read from and written relative to the folder it is saved into (absolute when there is no relative path, on another drive).
2026-10-12 22:55:53 +02:00
Marco Arnulfo 6939d95cae Formula bar: hide _xludf. like Excel, keep it when the edit is confirmed unchanged (#726) 2026-10-12 22:53:10 +02:00
Marco Arnulfo 75305dfedf XLSX: keep the workbook's default font on save (fixes #805)
Cell format 0 always mapped to the model's built-in Calibri 11 default, so the file's Normal font was replaced on save and every default-formatted cell changed size. The Normal style now takes the font of cell format 0, and a Normal font in the theme's body face is written with scheme="minor" again.
2026-10-12 22:51:41 +02:00
Marco Arnulfo 930fa1cada XLSX: keep fileVersion and calcFeatures in workbook.xml on save (fixes #799)
Excel uses the cached cell values of a saved file only when workbook.xml has both <fileVersion> and the calcFeatures extension; without them it recalculates everything on open, and lookups into closed workbooks come back as #CALC!. Both are now read into the workbook's kept content and written back in schema order: fileVersion first, the calcFeatures ext in <extLst> last. A workbook that had neither gets neither.
2026-10-12 22:49:34 +02:00
Marco Arnulfo 9a58f2d086 XLS: a formula kept as its saved value keeps a text result (fixes #802) 2026-10-12 22:40:01 +02:00
Claude 6e2caa9f86
Web: opt-in embedding bridge for host pages (?host=parent)
A page that frames GridCraft on the same origin can now open workbooks
in it and store what it saves, through postMessage, instead of Save and
Export becoming browser downloads. Built for a Nextcloud integration,
but nothing in it is host-specific.

Only the web shell changes:
- gridcraft:open from the parent goes through the inbox, like a picked
  or dropped file
- Services::download sends the bytes to the parent (gridcraft:save); an
  .xlsx workbook handed over counts as saved under that name
- gridcraft:dirty reports unsaved changes; gridcraft:ready and
  gridcraft:failed report start-up
- in host mode no sample opens, and ?author= names the user for notes
  and comments

Enabled only by ?host=parent inside a frame; only the parent window on
the page's own origin is heard or answered. Without it nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6GtUCaPiCMEQCN4QcdQnp
2026-10-12 16:36:26 -04:00
neilcawse ef1cd55d24 PivotTables: a collapsed item puts its value captions in the Values column (outline, tabular) 2026-10-12 16:29:02 -04:00
vangel76 a540a7138a PDF: text width cannot overflow; dash, stroke width and NaN sizes are sanitised (#812)
text_width sums in u64; an all-zero or non-finite dash array is written as
solid ([] 0 d); stroke widths are clamped to >= 0 (NaN -> 0); drawing calls
with non-finite or non-positive geometry return before storing anything.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 22:18:58 +02:00
vangel76 0042240c05 PDF: title and author are written as UTF-16BE when they are not ASCII (#813)
Info strings were WinAnsi; PDF text strings are PDFDocEncoding or UTF-16BE.
Printable ASCII stays a literal string; anything else is a <FEFF...> hex
string. Info strings are capped at 1024 characters.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 22:18:46 +02:00
vangel76 a60b49fad0 Numfmt: format-code parsing is linear, and an unclosed [ is treated the same in both passes (#810)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 22:10:35 +02:00
neilcawse e5b12dab06 Functions: COUNTIF family counts the 255 criterion limit in UTF-16 units, as in Excel 2026-10-12 16:09:52 -04:00
vangel76 5f992be525 Numfmt: no panic on a fraction denominator with 65,536 zeros; format codes are capped at 255 characters (#807)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 22:09:29 +02:00
vangel76 fd53de7c46 Numfmt: TEXT() and chart labels parse each format code once (#806)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 22:09:09 +02:00
vangel76 2be04524b3 Calc: SUBTOTAL(10x) recalculates when Row Height, AutoFit Row Height or Ungroup reveal rows
home.rowHeight, home.autofitRowHeight and data.ungroup change row hidden
state without marking the edit structural, so SUBTOTAL(101-111) kept a stale
value. Found by the command-sequence fuzz (seed 3).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 21:09:27 +02:00
Marco Arnulfo a5f531838b Functions: note the dependency gap of computed criteria (part of #737) 2026-10-12 21:08:20 +02:00
neilcawse aa2a580626 PivotTables: values on rows review fixes (Total header, Σ Values last in Columns)
With values on rows and no column field, the header cell above the data
column reads "Total", as Excel saves it (tabular checked against a real
file).

Σ Values in Columns always comes after the last column field: the column
layout doesn't place it anywhere else, so `pivot.moveField` no longer
stores a position there, the reader ignores where `-2` sits in colFields
and the writer puts it last.

`pivot.changeSource` removes dropped row and column fields one by one so
Σ Values keeps its place ahead of the field it preceded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:05:59 -04:00
vangel76 bd105a569b Page Layout view: vertical ruler on the right for RTL sheets, header/footer distance clamped to the margins (#792)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 21:03:37 +02:00
vangel76 600c25098f Fix footer clamp expectation in the drag test (#792)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 21:01:22 +02:00
vangel76 c4ad8e3a9b Page Layout view: header/footer margins on the ruler, live re-pagination, right-to-left rulers (#792)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 21:01:09 +02:00
vangel76 339f8ed35b Page Layout view: drag the margins on the rulers (#792)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 20:57:02 +02:00
Michał Marcin Brzuchalski 26ed66cfe1
i18n: look up the Format Cells dialog labels in the catalog
The Format Cells dialog drew English literals in every language. Its
tabs, labels, options and protection note now go through Language::tr,
as do dialog titles and the shared OK/Cancel buttons. The Fill tab is
keyed Format Cells|Fill because the Alignment tab's Fill is a different
word in some languages. d.tab keeps the English name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:35:10 +02:00
neilcawse 4c2bcd637c Functions: *IFS with two or more criteria pairs match the first 255 characters of a longer criterion, as in Excel 2026-10-12 14:34:18 -04:00
vangel76 47c0af3f1b Data: Forecast Sheet Forecast Start option (#785)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 20:34:07 +02:00
Marco Arnulfo 531dc5a5aa functions: MODE comments name Excel 365 as the reference, not POI's cached values (#736) 2026-10-12 20:21:19 +02:00
neilcawse caf3193261 Functions: *IFS with two or more criteria pairs accept criteria over 255 characters, as in Excel 2026-10-12 14:19:29 -04:00
neilcawse 5524e2520a Functions: COUNTIF family returns #VALUE! for criteria over 255 characters
Excel rejects a text criterion longer than 255 characters in COUNTIF(S),
SUMIF(S), AVERAGEIF(S), MAXIFS and MINIFS with #VALUE!; GridCraft matched
it anyway. Found by the calc oracle on an Excel-saved report where a
268-character concatenated criterion caches #VALUE!.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:19:29 -04:00
vangel76 2797d468c5 Security: cell hyperlinks open only http, https and mailto, after a confirmation (#777)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 20:17:30 +02:00
Marco Arnulfo 1767a28371 Numfmt: scientific formats with a literal after E±, a % or a comma match Excel (fixes #768)
The exponent sign goes right before the exponent digits, after any literal that follows
the E; ? pads exponent digits with spaces; % and commas never scale a scientific section;
zero shows 0 in every integer placeholder. Checked against the 248 TEXT() rows of Apache
POI's NumberFormatApproxTests.xlsx, copied as data into a test.
2026-10-12 19:43:33 +02:00
vangel76 76e7f1de07 Grid: the selection outline stays visible when extended to the last row (#687)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 19:25:51 +02:00
vangel76 afce16c8d2 Grid: deleting several Ctrl-selected rows removes them all (#758)
home.deleteRows/deleteColumns used only the last selected area. They now
take every area (or a comma list like "3:3,7:8"), merge them and delete
from the last to the first inside one edit, so it is one undo step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 19:24:36 +02:00