ironcalc 0.8.3.0 → 0.9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99ad95c481d32e19c1ac19db71a37fac4b4c0239911d28909ba4e55aa1e3e28b
4
- data.tar.gz: 3ee57b654e4633a521ef5e0f0e323437150d5a4c4663497c4a244b877f8e278d
3
+ metadata.gz: 1e609992a014e903a48028efa83a063c10e23ca907a04eeb8e40779b1c5a1db2
4
+ data.tar.gz: a4aec775ff1216db62486e01addaf603531a55a14264e1378cd80debfc31226b
5
5
  SHA512:
6
- metadata.gz: ba91db3f951436ec7434c4f6439c216fbb6bd876dbb32ba1f30aa5dbd14d8be2503c955c98861b9a8cd9ecde2d98b744d60973ef7ce3fa180595a266a3dcbe5d
7
- data.tar.gz: 13353e79cfac4675511ec1fd1bb1bb20912344ef5d1b8d395422b4012ae54d7f6daa4266c98251e3c2cf94c87be384535e0a0e26c303c6db99129cf22ef5b511
6
+ metadata.gz: 798a3fe643ce2f1cbeb44f9c291766ce3627d29a5699a4bcee6abb00fffca05ccab7e682b7d2970e89b25478dc973fa40dfd30d00e9eac52324911104679c0cd
7
+ data.tar.gz: fc6ee83b138f57b63c52db357a0662e9f2bcda9ad04fd817578806cfdb897f72e47e43bdfdbe4c1b6a73c4e7b6e4af498db35e548e1daacfbfca9620d89e765b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 0.9.1.0
2
+
3
+ - update the IronCalc engine to 0.9.1
4
+ - merged cells on `Model` and `UserModel`: `merge_cells`, `merge_cells_across`,
5
+ `merge_cells_center`, `merge_cells_down`, `unmerge_cells` and
6
+ `get_merged_cells`, plus `get_merge_structure` on `Model`, which returns a
7
+ Hash tagged by `:type` (`{type: "Anchor", width:, height:}`)
8
+
9
+ ## 0.9.0.0
10
+
11
+ - update the IronCalc engine to 0.9.0
12
+
1
13
  ## 0.8.3.0
2
14
 
3
15
  - update the IronCalc engine to 0.8.3
data/Cargo.lock CHANGED
@@ -8,17 +8,6 @@ version = "2.0.1"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
9
  checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
10
10
 
11
- [[package]]
12
- name = "aes"
13
- version = "0.8.4"
14
- source = "registry+https://github.com/rust-lang/crates.io-index"
15
- checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
16
- dependencies = [
17
- "cfg-if",
18
- "cipher",
19
- "cpufeatures",
20
- ]
21
-
22
11
  [[package]]
23
12
  name = "aho-corasick"
24
13
  version = "1.1.4"
@@ -58,12 +47,6 @@ version = "1.5.1"
58
47
  source = "registry+https://github.com/rust-lang/crates.io-index"
59
48
  checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
60
49
 
61
- [[package]]
62
- name = "base64ct"
63
- version = "1.8.3"
64
- source = "registry+https://github.com/rust-lang/crates.io-index"
65
- checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
66
-
67
50
  [[package]]
68
51
  name = "bindgen"
69
52
  version = "0.72.1"
@@ -79,7 +62,7 @@ dependencies = [
79
62
  "regex",
80
63
  "rustc-hash",
81
64
  "shlex 1.3.0",
82
- "syn",
65
+ "syn 2.0.117",
83
66
  ]
84
67
 
85
68
  [[package]]
@@ -103,7 +86,7 @@ checksum = "238b90427dfad9da4a9abd60f3ec1cdee6b80454bde49ed37f1781dd8e9dc7f9"
103
86
  dependencies = [
104
87
  "proc-macro2",
105
88
  "quote",
106
- "syn",
89
+ "syn 2.0.117",
107
90
  ]
108
91
 
109
92
  [[package]]
@@ -112,15 +95,6 @@ version = "2.13.0"
112
95
  source = "registry+https://github.com/rust-lang/crates.io-index"
113
96
  checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
114
97
 
115
- [[package]]
116
- name = "block-buffer"
117
- version = "0.10.4"
118
- source = "registry+https://github.com/rust-lang/crates.io-index"
119
- checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
120
- dependencies = [
121
- "generic-array",
122
- ]
123
-
124
98
  [[package]]
125
99
  name = "bumpalo"
126
100
  version = "3.20.3"
@@ -133,32 +107,6 @@ version = "1.25.0"
133
107
  source = "registry+https://github.com/rust-lang/crates.io-index"
134
108
  checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
135
109
 
136
- [[package]]
137
- name = "byteorder"
138
- version = "1.5.0"
139
- source = "registry+https://github.com/rust-lang/crates.io-index"
140
- checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
141
-
142
- [[package]]
143
- name = "bzip2"
144
- version = "0.4.4"
145
- source = "registry+https://github.com/rust-lang/crates.io-index"
146
- checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
147
- dependencies = [
148
- "bzip2-sys",
149
- "libc",
150
- ]
151
-
152
- [[package]]
153
- name = "bzip2-sys"
154
- version = "0.1.13+1.0.8"
155
- source = "registry+https://github.com/rust-lang/crates.io-index"
156
- checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14"
157
- dependencies = [
158
- "cc",
159
- "pkg-config",
160
- ]
161
-
162
110
  [[package]]
163
111
  name = "cc"
164
112
  version = "1.2.64"
@@ -166,8 +114,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
166
114
  checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f"
167
115
  dependencies = [
168
116
  "find-msvc-tools",
169
- "jobserver",
170
- "libc",
171
117
  "shlex 2.0.1",
172
118
  ]
173
119
 
@@ -186,6 +132,23 @@ version = "1.0.4"
186
132
  source = "registry+https://github.com/rust-lang/crates.io-index"
187
133
  checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
188
134
 
135
+ [[package]]
136
+ name = "cfg_aliases"
137
+ version = "0.2.2"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
140
+
141
+ [[package]]
142
+ name = "chacha20"
143
+ version = "0.10.2"
144
+ source = "registry+https://github.com/rust-lang/crates.io-index"
145
+ checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
146
+ dependencies = [
147
+ "cfg-if",
148
+ "cpufeatures",
149
+ "rand_core",
150
+ ]
151
+
189
152
  [[package]]
190
153
  name = "chrono"
191
154
  version = "0.4.45"
@@ -209,16 +172,6 @@ dependencies = [
209
172
  "phf",
210
173
  ]
211
174
 
212
- [[package]]
213
- name = "cipher"
214
- version = "0.4.4"
215
- source = "registry+https://github.com/rust-lang/crates.io-index"
216
- checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
217
- dependencies = [
218
- "crypto-common",
219
- "inout",
220
- ]
221
-
222
175
  [[package]]
223
176
  name = "clang-sys"
224
177
  version = "1.8.1"
@@ -230,12 +183,6 @@ dependencies = [
230
183
  "libloading",
231
184
  ]
232
185
 
233
- [[package]]
234
- name = "constant_time_eq"
235
- version = "0.1.5"
236
- source = "registry+https://github.com/rust-lang/crates.io-index"
237
- checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
238
-
239
186
  [[package]]
240
187
  name = "core-foundation-sys"
241
188
  version = "0.8.7"
@@ -244,38 +191,22 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
244
191
 
245
192
  [[package]]
246
193
  name = "cpufeatures"
247
- version = "0.2.17"
194
+ version = "0.3.1"
248
195
  source = "registry+https://github.com/rust-lang/crates.io-index"
249
- checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
196
+ checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
250
197
  dependencies = [
251
198
  "libc",
252
199
  ]
253
200
 
254
201
  [[package]]
255
202
  name = "crc32fast"
256
- version = "1.5.0"
203
+ version = "1.5.3"
257
204
  source = "registry+https://github.com/rust-lang/crates.io-index"
258
- checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
205
+ checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"
259
206
  dependencies = [
260
207
  "cfg-if",
261
208
  ]
262
209
 
263
- [[package]]
264
- name = "crossbeam-utils"
265
- version = "0.8.21"
266
- source = "registry+https://github.com/rust-lang/crates.io-index"
267
- checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
268
-
269
- [[package]]
270
- name = "crypto-common"
271
- version = "0.1.7"
272
- source = "registry+https://github.com/rust-lang/crates.io-index"
273
- checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
274
- dependencies = [
275
- "generic-array",
276
- "typenum",
277
- ]
278
-
279
210
  [[package]]
280
211
  name = "csv"
281
212
  version = "1.4.0"
@@ -297,29 +228,18 @@ dependencies = [
297
228
  "memchr",
298
229
  ]
299
230
 
300
- [[package]]
301
- name = "deranged"
302
- version = "0.5.8"
303
- source = "registry+https://github.com/rust-lang/crates.io-index"
304
- checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
305
-
306
- [[package]]
307
- name = "digest"
308
- version = "0.10.7"
309
- source = "registry+https://github.com/rust-lang/crates.io-index"
310
- checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
311
- dependencies = [
312
- "block-buffer",
313
- "crypto-common",
314
- "subtle",
315
- ]
316
-
317
231
  [[package]]
318
232
  name = "either"
319
233
  version = "1.16.0"
320
234
  source = "registry+https://github.com/rust-lang/crates.io-index"
321
235
  checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
322
236
 
237
+ [[package]]
238
+ name = "equivalent"
239
+ version = "1.0.3"
240
+ source = "registry+https://github.com/rust-lang/crates.io-index"
241
+ checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
242
+
323
243
  [[package]]
324
244
  name = "find-msvc-tools"
325
245
  version = "0.1.9"
@@ -332,8 +252,8 @@ version = "1.1.9"
332
252
  source = "registry+https://github.com/rust-lang/crates.io-index"
333
253
  checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
334
254
  dependencies = [
335
- "crc32fast",
336
255
  "miniz_oxide",
256
+ "zlib-rs",
337
257
  ]
338
258
 
339
259
  [[package]]
@@ -360,37 +280,18 @@ dependencies = [
360
280
  "slab",
361
281
  ]
362
282
 
363
- [[package]]
364
- name = "generic-array"
365
- version = "0.14.7"
366
- source = "registry+https://github.com/rust-lang/crates.io-index"
367
- checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
368
- dependencies = [
369
- "typenum",
370
- "version_check",
371
- ]
372
-
373
283
  [[package]]
374
284
  name = "getrandom"
375
- version = "0.2.17"
285
+ version = "0.4.3"
376
286
  source = "registry+https://github.com/rust-lang/crates.io-index"
377
- checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
378
- dependencies = [
379
- "cfg-if",
380
- "libc",
381
- "wasi",
382
- ]
383
-
384
- [[package]]
385
- name = "getrandom"
386
- version = "0.3.4"
387
- source = "registry+https://github.com/rust-lang/crates.io-index"
388
- checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
287
+ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
389
288
  dependencies = [
390
289
  "cfg-if",
290
+ "js-sys",
391
291
  "libc",
392
292
  "r-efi",
393
- "wasip2",
293
+ "rand_core",
294
+ "wasm-bindgen",
394
295
  ]
395
296
 
396
297
  [[package]]
@@ -406,13 +307,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
406
307
  checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
407
308
 
408
309
  [[package]]
409
- name = "hmac"
410
- version = "0.12.1"
310
+ name = "hashbrown"
311
+ version = "0.17.1"
411
312
  source = "registry+https://github.com/rust-lang/crates.io-index"
412
- checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
413
- dependencies = [
414
- "digest",
415
- ]
313
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
416
314
 
417
315
  [[package]]
418
316
  name = "iana-time-zone"
@@ -439,25 +337,26 @@ dependencies = [
439
337
  ]
440
338
 
441
339
  [[package]]
442
- name = "inout"
443
- version = "0.1.4"
340
+ name = "indexmap"
341
+ version = "2.14.2"
444
342
  source = "registry+https://github.com/rust-lang/crates.io-index"
445
- checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
343
+ checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
446
344
  dependencies = [
447
- "generic-array",
345
+ "equivalent",
346
+ "hashbrown",
448
347
  ]
449
348
 
450
349
  [[package]]
451
350
  name = "ironcalc"
452
- version = "0.8.3"
351
+ version = "0.9.1"
453
352
  source = "registry+https://github.com/rust-lang/crates.io-index"
454
- checksum = "384c2a5b1e78741cedfaa4fd3209fdb115c1a52453bc10137dfe970ed92872be"
353
+ checksum = "aabf0987c9f8e941476a7bfd2564496ca9f97bbf25a7165f7d499895b35fff0c"
455
354
  dependencies = [
456
355
  "bitcode",
457
356
  "chrono",
458
357
  "ironcalc_base",
459
- "itertools 0.12.1",
460
- "roxmltree",
358
+ "itertools 0.15.0",
359
+ "quick-xml",
461
360
  "serde",
462
361
  "serde_json",
463
362
  "thiserror",
@@ -466,9 +365,9 @@ dependencies = [
466
365
 
467
366
  [[package]]
468
367
  name = "ironcalc_base"
469
- version = "0.8.3"
368
+ version = "0.9.1"
470
369
  source = "registry+https://github.com/rust-lang/crates.io-index"
471
- checksum = "ce1dd83cada7da742782076daccda92e33162e9f4396a958ae3e7c5bb64e6a01"
370
+ checksum = "ecf55ea346dcda5e0f0034d8300dc2d40ffbcb64e7c4db23bfa1d8a0cf11c738"
472
371
  dependencies = [
473
372
  "bitcode",
474
373
  "chrono",
@@ -497,18 +396,18 @@ dependencies = [
497
396
 
498
397
  [[package]]
499
398
  name = "itertools"
500
- version = "0.12.1"
399
+ version = "0.13.0"
501
400
  source = "registry+https://github.com/rust-lang/crates.io-index"
502
- checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
401
+ checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
503
402
  dependencies = [
504
403
  "either",
505
404
  ]
506
405
 
507
406
  [[package]]
508
407
  name = "itertools"
509
- version = "0.13.0"
408
+ version = "0.15.0"
510
409
  source = "registry+https://github.com/rust-lang/crates.io-index"
511
- checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
410
+ checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc"
512
411
  dependencies = [
513
412
  "either",
514
413
  ]
@@ -519,16 +418,6 @@ version = "1.0.18"
519
418
  source = "registry+https://github.com/rust-lang/crates.io-index"
520
419
  checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
521
420
 
522
- [[package]]
523
- name = "jobserver"
524
- version = "0.1.34"
525
- source = "registry+https://github.com/rust-lang/crates.io-index"
526
- checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
527
- dependencies = [
528
- "getrandom 0.3.4",
529
- "libc",
530
- ]
531
-
532
421
  [[package]]
533
422
  name = "js-sys"
534
423
  version = "0.3.102"
@@ -562,11 +451,17 @@ dependencies = [
562
451
  "windows-link",
563
452
  ]
564
453
 
454
+ [[package]]
455
+ name = "libm"
456
+ version = "0.2.16"
457
+ source = "registry+https://github.com/rust-lang/crates.io-index"
458
+ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
459
+
565
460
  [[package]]
566
461
  name = "log"
567
- version = "0.4.32"
462
+ version = "0.4.34"
568
463
  source = "registry+https://github.com/rust-lang/crates.io-index"
569
- checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a"
464
+ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
570
465
 
571
466
  [[package]]
572
467
  name = "magnus"
@@ -588,7 +483,7 @@ checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
588
483
  dependencies = [
589
484
  "proc-macro2",
590
485
  "quote",
591
- "syn",
486
+ "syn 2.0.117",
592
487
  ]
593
488
 
594
489
  [[package]]
@@ -613,6 +508,18 @@ dependencies = [
613
508
  "simd-adler32",
614
509
  ]
615
510
 
511
+ [[package]]
512
+ name = "nix"
513
+ version = "0.31.3"
514
+ source = "registry+https://github.com/rust-lang/crates.io-index"
515
+ checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
516
+ dependencies = [
517
+ "bitflags",
518
+ "cfg-if",
519
+ "cfg_aliases",
520
+ "libc",
521
+ ]
522
+
616
523
  [[package]]
617
524
  name = "nom"
618
525
  version = "7.1.3"
@@ -623,12 +530,6 @@ dependencies = [
623
530
  "minimal-lexical",
624
531
  ]
625
532
 
626
- [[package]]
627
- name = "num-conv"
628
- version = "0.2.2"
629
- source = "registry+https://github.com/rust-lang/crates.io-index"
630
- checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
631
-
632
533
  [[package]]
633
534
  name = "num-traits"
634
535
  version = "0.2.19"
@@ -636,6 +537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
636
537
  checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
637
538
  dependencies = [
638
539
  "autocfg",
540
+ "libm",
639
541
  ]
640
542
 
641
543
  [[package]]
@@ -644,29 +546,6 @@ version = "1.21.4"
644
546
  source = "registry+https://github.com/rust-lang/crates.io-index"
645
547
  checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
646
548
 
647
- [[package]]
648
- name = "password-hash"
649
- version = "0.4.2"
650
- source = "registry+https://github.com/rust-lang/crates.io-index"
651
- checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
652
- dependencies = [
653
- "base64ct",
654
- "rand_core",
655
- "subtle",
656
- ]
657
-
658
- [[package]]
659
- name = "pbkdf2"
660
- version = "0.11.0"
661
- source = "registry+https://github.com/rust-lang/crates.io-index"
662
- checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
663
- dependencies = [
664
- "digest",
665
- "hmac",
666
- "password-hash",
667
- "sha2",
668
- ]
669
-
670
549
  [[package]]
671
550
  name = "phf"
672
551
  version = "0.12.1"
@@ -692,33 +571,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
692
571
  checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
693
572
 
694
573
  [[package]]
695
- name = "pkg-config"
696
- version = "0.3.33"
697
- source = "registry+https://github.com/rust-lang/crates.io-index"
698
- checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
699
-
700
- [[package]]
701
- name = "powerfmt"
702
- version = "0.2.0"
703
- source = "registry+https://github.com/rust-lang/crates.io-index"
704
- checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
705
-
706
- [[package]]
707
- name = "ppv-lite86"
708
- version = "0.2.21"
574
+ name = "proc-macro2"
575
+ version = "1.0.106"
709
576
  source = "registry+https://github.com/rust-lang/crates.io-index"
710
- checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
577
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
711
578
  dependencies = [
712
- "zerocopy",
579
+ "unicode-ident",
713
580
  ]
714
581
 
715
582
  [[package]]
716
- name = "proc-macro2"
717
- version = "1.0.106"
583
+ name = "quick-xml"
584
+ version = "0.42.0"
718
585
  source = "registry+https://github.com/rust-lang/crates.io-index"
719
- checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
586
+ checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
720
587
  dependencies = [
721
- "unicode-ident",
588
+ "memchr",
722
589
  ]
723
590
 
724
591
  [[package]]
@@ -732,39 +599,26 @@ dependencies = [
732
599
 
733
600
  [[package]]
734
601
  name = "r-efi"
735
- version = "5.3.0"
602
+ version = "6.0.0"
736
603
  source = "registry+https://github.com/rust-lang/crates.io-index"
737
- checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
604
+ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
738
605
 
739
606
  [[package]]
740
607
  name = "rand"
741
- version = "0.8.6"
608
+ version = "0.10.3"
742
609
  source = "registry+https://github.com/rust-lang/crates.io-index"
743
- checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a"
610
+ checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af"
744
611
  dependencies = [
745
- "libc",
746
- "rand_chacha",
747
- "rand_core",
748
- ]
749
-
750
- [[package]]
751
- name = "rand_chacha"
752
- version = "0.3.1"
753
- source = "registry+https://github.com/rust-lang/crates.io-index"
754
- checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
755
- dependencies = [
756
- "ppv-lite86",
612
+ "chacha20",
613
+ "getrandom",
757
614
  "rand_core",
758
615
  ]
759
616
 
760
617
  [[package]]
761
618
  name = "rand_core"
762
- version = "0.6.4"
619
+ version = "0.10.1"
763
620
  source = "registry+https://github.com/rust-lang/crates.io-index"
764
- checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
765
- dependencies = [
766
- "getrandom 0.2.17",
767
- ]
621
+ checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
768
622
 
769
623
  [[package]]
770
624
  name = "rb-sys"
@@ -787,7 +641,7 @@ dependencies = [
787
641
  "quote",
788
642
  "regex",
789
643
  "shell-words",
790
- "syn",
644
+ "syn 2.0.117",
791
645
  ]
792
646
 
793
647
  [[package]]
@@ -831,12 +685,6 @@ version = "0.8.11"
831
685
  source = "registry+https://github.com/rust-lang/crates.io-index"
832
686
  checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
833
687
 
834
- [[package]]
835
- name = "roxmltree"
836
- version = "0.19.0"
837
- source = "registry+https://github.com/rust-lang/crates.io-index"
838
- checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f"
839
-
840
688
  [[package]]
841
689
  name = "rustc-hash"
842
690
  version = "2.1.2"
@@ -888,7 +736,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
888
736
  dependencies = [
889
737
  "proc-macro2",
890
738
  "quote",
891
- "syn",
739
+ "syn 2.0.117",
892
740
  ]
893
741
 
894
742
  [[package]]
@@ -915,28 +763,6 @@ dependencies = [
915
763
  "tap",
916
764
  ]
917
765
 
918
- [[package]]
919
- name = "sha1"
920
- version = "0.10.6"
921
- source = "registry+https://github.com/rust-lang/crates.io-index"
922
- checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
923
- dependencies = [
924
- "cfg-if",
925
- "cpufeatures",
926
- "digest",
927
- ]
928
-
929
- [[package]]
930
- name = "sha2"
931
- version = "0.10.9"
932
- source = "registry+https://github.com/rust-lang/crates.io-index"
933
- checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
934
- dependencies = [
935
- "cfg-if",
936
- "cpufeatures",
937
- "digest",
938
- ]
939
-
940
766
  [[package]]
941
767
  name = "shell-words"
942
768
  version = "1.1.1"
@@ -957,9 +783,9 @@ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
957
783
 
958
784
  [[package]]
959
785
  name = "simd-adler32"
960
- version = "0.3.9"
786
+ version = "0.3.10"
961
787
  source = "registry+https://github.com/rust-lang/crates.io-index"
962
- checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
788
+ checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
963
789
 
964
790
  [[package]]
965
791
  name = "siphasher"
@@ -975,25 +801,31 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
975
801
 
976
802
  [[package]]
977
803
  name = "statrs"
978
- version = "0.18.0"
804
+ version = "0.19.1"
979
805
  source = "registry+https://github.com/rust-lang/crates.io-index"
980
- checksum = "2a3fe7c28c6512e766b0874335db33c94ad7b8f9054228ae1c2abd47ce7d335e"
806
+ checksum = "c1837f9a1bd13dabbdbb04489c39451482d3cdd35a6e1a0d0f3570dea2b8c8be"
981
807
  dependencies = [
982
808
  "approx",
983
809
  "num-traits",
810
+ "thiserror",
984
811
  ]
985
812
 
986
813
  [[package]]
987
- name = "subtle"
988
- version = "2.6.1"
814
+ name = "syn"
815
+ version = "2.0.117"
989
816
  source = "registry+https://github.com/rust-lang/crates.io-index"
990
- checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
817
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
818
+ dependencies = [
819
+ "proc-macro2",
820
+ "quote",
821
+ "unicode-ident",
822
+ ]
991
823
 
992
824
  [[package]]
993
825
  name = "syn"
994
- version = "2.0.117"
826
+ version = "3.0.9"
995
827
  source = "registry+https://github.com/rust-lang/crates.io-index"
996
- checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
828
+ checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
997
829
  dependencies = [
998
830
  "proc-macro2",
999
831
  "quote",
@@ -1008,48 +840,29 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
1008
840
 
1009
841
  [[package]]
1010
842
  name = "thiserror"
1011
- version = "1.0.69"
843
+ version = "2.0.21"
1012
844
  source = "registry+https://github.com/rust-lang/crates.io-index"
1013
- checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
845
+ checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
1014
846
  dependencies = [
1015
847
  "thiserror-impl",
1016
848
  ]
1017
849
 
1018
850
  [[package]]
1019
851
  name = "thiserror-impl"
1020
- version = "1.0.69"
852
+ version = "2.0.21"
1021
853
  source = "registry+https://github.com/rust-lang/crates.io-index"
1022
- checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
854
+ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
1023
855
  dependencies = [
1024
856
  "proc-macro2",
1025
857
  "quote",
1026
- "syn",
1027
- ]
1028
-
1029
- [[package]]
1030
- name = "time"
1031
- version = "0.3.49"
1032
- source = "registry+https://github.com/rust-lang/crates.io-index"
1033
- checksum = "711a53c2d47bbd818258c498c8dbfe186a2526c631495cfe7e078567f86b8469"
1034
- dependencies = [
1035
- "deranged",
1036
- "num-conv",
1037
- "powerfmt",
1038
- "serde_core",
1039
- "time-core",
858
+ "syn 3.0.9",
1040
859
  ]
1041
860
 
1042
861
  [[package]]
1043
- name = "time-core"
1044
- version = "0.1.9"
1045
- source = "registry+https://github.com/rust-lang/crates.io-index"
1046
- checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
1047
-
1048
- [[package]]
1049
- name = "typenum"
1050
- version = "1.20.1"
862
+ name = "typed-path"
863
+ version = "0.13.0"
1051
864
  source = "registry+https://github.com/rust-lang/crates.io-index"
1052
- checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
865
+ checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
1053
866
 
1054
867
  [[package]]
1055
868
  name = "unicode-ident"
@@ -1057,27 +870,6 @@ version = "1.0.24"
1057
870
  source = "registry+https://github.com/rust-lang/crates.io-index"
1058
871
  checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
1059
872
 
1060
- [[package]]
1061
- name = "version_check"
1062
- version = "0.9.5"
1063
- source = "registry+https://github.com/rust-lang/crates.io-index"
1064
- checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
1065
-
1066
- [[package]]
1067
- name = "wasi"
1068
- version = "0.11.1+wasi-snapshot-preview1"
1069
- source = "registry+https://github.com/rust-lang/crates.io-index"
1070
- checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
1071
-
1072
- [[package]]
1073
- name = "wasip2"
1074
- version = "1.0.4+wasi-0.2.12"
1075
- source = "registry+https://github.com/rust-lang/crates.io-index"
1076
- checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
1077
- dependencies = [
1078
- "wit-bindgen",
1079
- ]
1080
-
1081
873
  [[package]]
1082
874
  name = "wasm-bindgen"
1083
875
  version = "0.2.125"
@@ -1110,7 +902,7 @@ dependencies = [
1110
902
  "bumpalo",
1111
903
  "proc-macro2",
1112
904
  "quote",
1113
- "syn",
905
+ "syn 2.0.117",
1114
906
  "wasm-bindgen-shared",
1115
907
  ]
1116
908
 
@@ -1144,7 +936,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
1144
936
  dependencies = [
1145
937
  "proc-macro2",
1146
938
  "quote",
1147
- "syn",
939
+ "syn 2.0.117",
1148
940
  ]
1149
941
 
1150
942
  [[package]]
@@ -1155,7 +947,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
1155
947
  dependencies = [
1156
948
  "proc-macro2",
1157
949
  "quote",
1158
- "syn",
950
+ "syn 2.0.117",
1159
951
  ]
1160
952
 
1161
953
  [[package]]
@@ -1183,82 +975,51 @@ dependencies = [
1183
975
  ]
1184
976
 
1185
977
  [[package]]
1186
- name = "wit-bindgen"
1187
- version = "0.57.1"
978
+ name = "windows-sys"
979
+ version = "0.61.2"
1188
980
  source = "registry+https://github.com/rust-lang/crates.io-index"
1189
- checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
1190
-
1191
- [[package]]
1192
- name = "zerocopy"
1193
- version = "0.8.52"
1194
- source = "registry+https://github.com/rust-lang/crates.io-index"
1195
- checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f"
1196
- dependencies = [
1197
- "zerocopy-derive",
1198
- ]
1199
-
1200
- [[package]]
1201
- name = "zerocopy-derive"
1202
- version = "0.8.52"
1203
- source = "registry+https://github.com/rust-lang/crates.io-index"
1204
- checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930"
981
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
1205
982
  dependencies = [
1206
- "proc-macro2",
1207
- "quote",
1208
- "syn",
983
+ "windows-link",
1209
984
  ]
1210
985
 
1211
986
  [[package]]
1212
987
  name = "zip"
1213
- version = "0.6.6"
988
+ version = "9.1.2"
1214
989
  source = "registry+https://github.com/rust-lang/crates.io-index"
1215
- checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
990
+ checksum = "ec2e3161de27091f18a831d9494e9c53378a34833af5c1dda35ad85849da18d6"
1216
991
  dependencies = [
1217
- "aes",
1218
- "byteorder",
1219
- "bzip2",
1220
- "constant_time_eq",
1221
992
  "crc32fast",
1222
- "crossbeam-utils",
1223
993
  "flate2",
1224
- "hmac",
1225
- "pbkdf2",
1226
- "sha1",
1227
- "time",
1228
- "zstd",
994
+ "getrandom",
995
+ "indexmap",
996
+ "memchr",
997
+ "nix",
998
+ "typed-path",
999
+ "windows-sys",
1000
+ "zopfli",
1229
1001
  ]
1230
1002
 
1231
1003
  [[package]]
1232
- name = "zmij"
1233
- version = "1.0.21"
1234
- source = "registry+https://github.com/rust-lang/crates.io-index"
1235
- checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
1236
-
1237
- [[package]]
1238
- name = "zstd"
1239
- version = "0.11.2+zstd.1.5.2"
1004
+ name = "zlib-rs"
1005
+ version = "0.6.8"
1240
1006
  source = "registry+https://github.com/rust-lang/crates.io-index"
1241
- checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
1242
- dependencies = [
1243
- "zstd-safe",
1244
- ]
1007
+ checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
1245
1008
 
1246
1009
  [[package]]
1247
- name = "zstd-safe"
1248
- version = "5.0.2+zstd.1.5.2"
1010
+ name = "zmij"
1011
+ version = "1.0.21"
1249
1012
  source = "registry+https://github.com/rust-lang/crates.io-index"
1250
- checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
1251
- dependencies = [
1252
- "libc",
1253
- "zstd-sys",
1254
- ]
1013
+ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
1255
1014
 
1256
1015
  [[package]]
1257
- name = "zstd-sys"
1258
- version = "2.0.16+zstd.1.5.7"
1016
+ name = "zopfli"
1017
+ version = "0.8.4"
1259
1018
  source = "registry+https://github.com/rust-lang/crates.io-index"
1260
- checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
1019
+ checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11"
1261
1020
  dependencies = [
1262
- "cc",
1263
- "pkg-config",
1021
+ "bumpalo",
1022
+ "crc32fast",
1023
+ "log",
1024
+ "simd-adler32",
1264
1025
  ]
data/README.md CHANGED
@@ -263,18 +263,19 @@ corners.
263
263
  ### Coverage compared to the Python bindings
264
264
 
265
265
  Both bindings wrap the same engine, so anything both expose behaves the same.
266
- They do not expose the same amount of it. Counted against **IronCalc 0.8.3**,
266
+ They do not expose the same amount of it. Counted against **IronCalc 0.9.0**,
267
267
  the version this gem tracks, and accurate at the time of writing:
268
268
 
269
269
  | | Python | Ruby |
270
270
  |---|---|---|
271
- | `Model` | 69 | 62 |
272
- | `UserModel` | 102 | 52 |
271
+ | `Model` | 81 | 62 |
272
+ | `UserModel` | 119 | 52 |
273
273
 
274
274
  Most of the difference is deliberate. Selection, scrolling, clipboard and
275
275
  keyboard state belong to a UI rather than to a library, and are not exposed
276
- here. Conditional formatting, named styles and themes are a known backlog,
277
- listed explicitly in `rake parity`'s `ENGINE_DEFERRED` so they stay visible.
276
+ here. Conditional formatting, named styles, themes, merged cells and
277
+ hyperlinks are a known backlog, listed explicitly in `rake parity`'s
278
+ `ENGINE_DEFERRED` so they stay visible.
278
279
 
279
280
  What Ruby adds is mostly layering rather than extra engine coverage: Hash-based
280
281
  styles, `batch`, and xlsx in memory (`to_xlsx_bytes` / `load_from_xlsx_bytes`).
@@ -14,4 +14,4 @@ serde_magnus = "0.11"
14
14
  bitcode = "0.6.8"
15
15
  # The IronCalc engine, published on crates.io as `ironcalc`. Renamed to `xlsx`
16
16
  # here so the source can refer to `xlsx::base`, `xlsx::import`, `xlsx::export`.
17
- xlsx = { package = "ironcalc", version = "0.8.3" }
17
+ xlsx = { package = "ironcalc", version = "0.9.1" }
@@ -293,6 +293,11 @@ fn init(ruby: &Ruby) -> Result<(), Error> {
293
293
  get_defined_name_list/0, new_defined_name/3, update_defined_name/5,
294
294
  delete_defined_name/2, is_valid_defined_name/3,
295
295
  ]);
296
+ // Merged cells
297
+ define_methods!(model_class, Model, [
298
+ merge_cells/1, merge_cells_across/1, merge_cells_center/1, merge_cells_down/1,
299
+ unmerge_cells/1, get_merged_cells/1, get_merge_structure/3,
300
+ ]);
296
301
  // User API: IronCalc::UserModel
297
302
  let user_model_class = module.define_class("UserModel", ruby.class_object())?;
298
303
  // Persistence and collaboration (diff queue)
@@ -336,6 +341,11 @@ fn init(ruby: &Ruby) -> Result<(), Error> {
336
341
  get_defined_name_list/0, new_defined_name/3, update_defined_name/5,
337
342
  delete_defined_name/2, is_valid_defined_name/3,
338
343
  ]);
344
+ // Merged cells
345
+ define_methods!(user_model_class, UserModel, [
346
+ merge_cells/1, merge_cells_across/1, merge_cells_center/1, merge_cells_down/1,
347
+ unmerge_cells/1, get_merged_cells/1,
348
+ ]);
339
349
 
340
350
  Ok(())
341
351
  }
@@ -4,7 +4,8 @@ use std::io::Cursor;
4
4
  use magnus::value::StaticSymbol;
5
5
  use magnus::error::ErrorType;
6
6
  use magnus::value::ReprValue;
7
- use magnus::{IntoValue, RArray, RString, Ruby, TryConvert, Value};
7
+ use magnus::r_hash::ForEach;
8
+ use magnus::{IntoValue, RArray, RHash, RString, Ruby, TryConvert, Value};
8
9
  use serde::de::DeserializeOwned;
9
10
  use serde::Serialize;
10
11
 
@@ -22,6 +23,29 @@ pub(crate) fn to_ruby<T: Serialize>(value: &T) -> Result<Value, magnus::Error> {
22
23
  serde_magnus::serialize(&ruby(), value)
23
24
  }
24
25
 
26
+ /// An enum of unit and struct variants as `{type: "Variant", field: value, ...}`.
27
+ pub(crate) fn to_ruby_tagged<T: Serialize>(value: &T) -> Result<Value, magnus::Error> {
28
+ let ruby = ruby();
29
+ let value = to_ruby(value)?;
30
+ let tagged = ruby.hash_new();
31
+ let type_key = ruby.sym_new("type");
32
+ if let Some(variant) = RString::from_value(value) {
33
+ tagged.aset(type_key, variant)?;
34
+ return Ok(tagged.as_value());
35
+ }
36
+ // serde_magnus writes any other variant as `{"Name" => {field: value, ...}}`.
37
+ let variant = RHash::from_value(value).filter(|hash| hash.len() == 1);
38
+ let Some(variant) = variant else {
39
+ return Err(magnus::Error::new(ruby.exception_type_error(), "expected an enum variant"));
40
+ };
41
+ variant.foreach(|name: RString, fields: RHash| {
42
+ tagged.aset(type_key, name)?;
43
+ tagged.update(fields)?;
44
+ Ok(ForEach::Continue)
45
+ })?;
46
+ Ok(tagged.as_value())
47
+ }
48
+
25
49
  pub(crate) fn from_ruby<T: DeserializeOwned>(value: Value) -> Result<T, magnus::Error> {
26
50
  let ruby = ruby();
27
51
  serde_magnus::deserialize(&ruby, value).map_err(|error| match error.error_type() {
@@ -734,4 +758,66 @@ impl Model {
734
758
  .is_valid_defined_name(&name, scope, &formula)
735
759
  .map_err(workbook_error)
736
760
  }
761
+
762
+ // Merged cells ----------------------------------------------------------
763
+
764
+ pub fn merge_cells(&self, range: Value) -> Result<(), magnus::Error> {
765
+ let range: Area = from_ruby(range)?;
766
+ self.model
767
+ .borrow_mut()
768
+ .merge_cells(&range)
769
+ .map_err(workbook_error)
770
+ }
771
+
772
+ pub fn merge_cells_across(&self, range: Value) -> Result<(), magnus::Error> {
773
+ let range: Area = from_ruby(range)?;
774
+ self.model
775
+ .borrow_mut()
776
+ .merge_cells_across(&range)
777
+ .map_err(workbook_error)
778
+ }
779
+
780
+ pub fn merge_cells_center(&self, range: Value) -> Result<(), magnus::Error> {
781
+ let range: Area = from_ruby(range)?;
782
+ self.model
783
+ .borrow_mut()
784
+ .merge_cells_center(&range)
785
+ .map_err(workbook_error)
786
+ }
787
+
788
+ pub fn merge_cells_down(&self, range: Value) -> Result<(), magnus::Error> {
789
+ let range: Area = from_ruby(range)?;
790
+ self.model
791
+ .borrow_mut()
792
+ .merge_cells_down(&range)
793
+ .map_err(workbook_error)
794
+ }
795
+
796
+ pub fn unmerge_cells(&self, range: Value) -> Result<(), magnus::Error> {
797
+ let range: Area = from_ruby(range)?;
798
+ self.model
799
+ .borrow_mut()
800
+ .unmerge_cells(&range)
801
+ .map_err(workbook_error)
802
+ }
803
+
804
+ pub fn get_merged_cells(&self, sheet: u32) -> Result<Value, magnus::Error> {
805
+ let model = self.model.borrow();
806
+ let merged_cells = model.get_merged_cells(sheet).map_err(workbook_error)?;
807
+ to_ruby(&merged_cells)
808
+ }
809
+
810
+ pub fn get_merge_structure(
811
+ &self,
812
+ sheet: u32,
813
+ row: i32,
814
+ column: i32,
815
+ ) -> Result<Value, magnus::Error> {
816
+ let structure = self
817
+ .model
818
+ .borrow()
819
+ .get_merge_structure(sheet, row, column)
820
+ .map_err(workbook_error)?;
821
+ to_ruby_tagged(&structure)
822
+ }
737
823
  }
@@ -473,4 +473,55 @@ impl UserModel {
473
473
  .is_valid_defined_name(&name, scope, &formula)
474
474
  .map_err(workbook_error)
475
475
  }
476
+
477
+ // Merged cells ----------------------------------------------------------
478
+
479
+ pub fn merge_cells(&self, range: Value) -> Result<(), magnus::Error> {
480
+ let range: Area = from_ruby(range)?;
481
+ self.model
482
+ .borrow_mut()
483
+ .merge_cells(&range)
484
+ .map_err(workbook_error)
485
+ }
486
+
487
+ pub fn merge_cells_across(&self, range: Value) -> Result<(), magnus::Error> {
488
+ let range: Area = from_ruby(range)?;
489
+ self.model
490
+ .borrow_mut()
491
+ .merge_cells_across(&range)
492
+ .map_err(workbook_error)
493
+ }
494
+
495
+ pub fn merge_cells_center(&self, range: Value) -> Result<(), magnus::Error> {
496
+ let range: Area = from_ruby(range)?;
497
+ self.model
498
+ .borrow_mut()
499
+ .merge_cells_center(&range)
500
+ .map_err(workbook_error)
501
+ }
502
+
503
+ pub fn merge_cells_down(&self, range: Value) -> Result<(), magnus::Error> {
504
+ let range: Area = from_ruby(range)?;
505
+ self.model
506
+ .borrow_mut()
507
+ .merge_cells_down(&range)
508
+ .map_err(workbook_error)
509
+ }
510
+
511
+ pub fn unmerge_cells(&self, range: Value) -> Result<(), magnus::Error> {
512
+ let range: Area = from_ruby(range)?;
513
+ self.model
514
+ .borrow_mut()
515
+ .unmerge_cells(&range)
516
+ .map_err(workbook_error)
517
+ }
518
+
519
+ pub fn get_merged_cells(&self, sheet: u32) -> Result<Value, magnus::Error> {
520
+ let merged_cells = self
521
+ .model
522
+ .borrow()
523
+ .get_merged_cells(sheet)
524
+ .map_err(workbook_error)?;
525
+ to_ruby(&merged_cells)
526
+ }
476
527
  }
@@ -629,6 +629,70 @@ module IronCalc
629
629
  # @return [void]
630
630
  # @raise [IronCalc::Error]
631
631
 
632
+ # @!method merge_cells(range)
633
+ # Merges a range into one cell anchored at its top-left cell.
634
+ # @param range [Hash] the engine's +Area+: +{sheet:, row:, column:, width:,
635
+ # height:}+
636
+ # @return [void]
637
+ # @raise [IronCalc::Error] if the range is a single cell, out of bounds,
638
+ # intersects a merged cell or an array formula, or has more than one cell
639
+ # with content; nothing changes
640
+
641
+ # @!method merge_cells_across(range)
642
+ # {#merge_cells} on each row of the range; all rows or none.
643
+ # @param range [Hash] the engine's +Area+
644
+ # @return [void]
645
+ # @raise [IronCalc::Error] as {#merge_cells}, for any row
646
+
647
+ # @!method merge_cells_center(range)
648
+ # {#merge_cells}, then centers the merged cell horizontally.
649
+ # @param range [Hash] the engine's +Area+
650
+ # @return [void]
651
+ # @raise [IronCalc::Error] as {#merge_cells}
652
+
653
+ # @!method merge_cells_down(range)
654
+ # {#merge_cells} on each column of the range; all columns or none.
655
+ # @param range [Hash] the engine's +Area+
656
+ # @return [void]
657
+ # @raise [IronCalc::Error] as {#merge_cells}, for any column
658
+
659
+ # @!method unmerge_cells(range)
660
+ # Removes every merged cell that intersects the range.
661
+ # @param range [Hash] the engine's +Area+
662
+ # @return [void]
663
+ # @raise [IronCalc::Error] if the range is invalid (a +row+, +column+,
664
+ # +width+ or +height+ below 1) or the sheet doesn't exist, not if it
665
+ # holds no merged cells
666
+
667
+ # @!method get_merged_cells(sheet)
668
+ # The sheet's merged cells as +{row:, column:, width:, height:}+ Hashes,
669
+ # +row+ and +column+ being the anchor.
670
+ # @param sheet [Integer]
671
+ # @return [Array<Hash>]
672
+ # @raise [IronCalc::Error]
673
+
674
+ # @!method get_merge_structure(sheet, row, column)
675
+ # Where a cell stands relative to the sheet's merged cells, as a Hash
676
+ # tagged by the engine's +MergeStructure+ variant: +{type: "None"}+,
677
+ # +{type: "Anchor", width:, height:}+ or
678
+ # +{type: "Covered", anchor_row:, anchor_column:}+.
679
+ # @example The +Area+ displayed as one cell at a position
680
+ # def displayed_area(model, sheet, row, column)
681
+ # case model.get_merge_structure(sheet, row, column)
682
+ # in {type: "None"}
683
+ # {sheet: sheet, row: row, column: column, width: 1, height: 1}
684
+ # in {type: "Anchor", width:, height:}
685
+ # {sheet: sheet, row: row, column: column, width: width, height: height}
686
+ # in {type: "Covered", anchor_row:, anchor_column:}
687
+ # displayed_area(model, sheet, anchor_row, anchor_column)
688
+ # end
689
+ # end
690
+ # @param sheet [Integer]
691
+ # @param row [Integer]
692
+ # @param column [Integer]
693
+ # @return [Hash]
694
+ # @raise [IronCalc::Error]
695
+
632
696
  # (yardoc bug lsegal/yard#1207). Doc-only file, never loaded at runtime.
633
697
  # @!visibility private
634
698
  def __yard_anchor__
@@ -973,6 +1037,45 @@ module IronCalc
973
1037
  # +evaluate+ afterwards to bring the workbook up to date.
974
1038
  # @return [void]
975
1039
 
1040
+ # @!method merge_cells(range)
1041
+ # {Model#merge_cells}, as one undo step.
1042
+ # @param range [Hash] the engine's +Area+: +{sheet:, row:, column:, width:,
1043
+ # height:}+
1044
+ # @return [void]
1045
+ # @raise [IronCalc::Error] as {Model#merge_cells}
1046
+
1047
+ # @!method merge_cells_across(range)
1048
+ # {Model#merge_cells_across}, as one undo step.
1049
+ # @param range [Hash] the engine's +Area+
1050
+ # @return [void]
1051
+ # @raise [IronCalc::Error] as {Model#merge_cells}, for any row
1052
+
1053
+ # @!method merge_cells_center(range)
1054
+ # {Model#merge_cells_center}, as one undo step.
1055
+ # @param range [Hash] the engine's +Area+
1056
+ # @return [void]
1057
+ # @raise [IronCalc::Error] as {Model#merge_cells}
1058
+
1059
+ # @!method merge_cells_down(range)
1060
+ # {Model#merge_cells_down}, as one undo step.
1061
+ # @param range [Hash] the engine's +Area+
1062
+ # @return [void]
1063
+ # @raise [IronCalc::Error] as {Model#merge_cells}, for any column
1064
+
1065
+ # @!method unmerge_cells(range)
1066
+ # {Model#unmerge_cells}, as one undo step (none if no merged cell intersects
1067
+ # the range).
1068
+ # @param range [Hash] the engine's +Area+
1069
+ # @return [void]
1070
+ # @raise [IronCalc::Error] as {Model#unmerge_cells}
1071
+
1072
+ # @!method get_merged_cells(sheet)
1073
+ # The sheet's merged cells as +{row:, column:, width:, height:}+ Hashes,
1074
+ # +row+ and +column+ being the anchor.
1075
+ # @param sheet [Integer]
1076
+ # @return [Array<Hash>]
1077
+ # @raise [IronCalc::Error]
1078
+
976
1079
  # Anchors the @!method stubs above — see {Model}.
977
1080
  # @!visibility private
978
1081
  def __yard_anchor__
@@ -1,3 +1,3 @@
1
1
  module IronCalc
2
- VERSION = "0.8.3.0"
2
+ VERSION = "0.9.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ironcalc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3.0
4
+ version: 0.9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jvdp
@@ -58,7 +58,7 @@ metadata:
58
58
  source_code_uri: https://github.com/jvdp/IronCalc-Ruby
59
59
  bug_tracker_uri: https://github.com/jvdp/IronCalc-Ruby/issues
60
60
  changelog_uri: https://github.com/jvdp/IronCalc-Ruby/blob/main/CHANGELOG.md
61
- documentation_uri: https://jvdp.github.io/IronCalc-Ruby/0.8.3/
61
+ documentation_uri: https://jvdp.github.io/IronCalc-Ruby/0.9.1/
62
62
  rubygems_mfa_required: 'true'
63
63
  rdoc_options: []
64
64
  require_paths: