fast_excel 0.6.0 → 0.6.1
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 +4 -4
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +3 -1
- data/Rakefile +4 -1
- data/fast_excel.gemspec +1 -1
- data/lib/fast_excel/binding/workbook.rb +9 -0
- data/lib/fast_excel/binding/worksheet.rb +2 -2
- data/lib/fast_excel/binding.rb +16 -13
- data/libxlsxwriter/.cirrus.yml +9 -0
- data/libxlsxwriter/.github/workflows/cmake_actions.yml +10 -6
- data/libxlsxwriter/.github/workflows/code_style.yml +2 -0
- data/libxlsxwriter/.github/workflows/make_32_actions.yml +43 -0
- data/libxlsxwriter/.github/workflows/windows_build.yml +7 -6
- data/libxlsxwriter/.github/workflows/zig_build.yml +1 -3
- data/libxlsxwriter/.gitignore +9 -7
- data/libxlsxwriter/.indent.pro +6 -0
- data/libxlsxwriter/CMakeLists.txt +377 -238
- data/libxlsxwriter/Changes.txt +189 -0
- data/libxlsxwriter/LICENSE.txt +1 -1
- data/libxlsxwriter/Makefile +36 -4
- data/libxlsxwriter/Readme.md +1 -1
- data/libxlsxwriter/build.zig +181 -92
- data/libxlsxwriter/build.zig.zon +15 -4
- data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +4 -0
- data/libxlsxwriter/include/xlsxwriter/app.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/chart.h +134 -1
- data/libxlsxwriter/include/xlsxwriter/chartsheet.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/comment.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/common.h +12 -8
- data/libxlsxwriter/include/xlsxwriter/content_types.h +3 -1
- data/libxlsxwriter/include/xlsxwriter/core.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/custom.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/drawing.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/format.h +34 -3
- data/libxlsxwriter/include/xlsxwriter/hash_table.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/metadata.h +5 -1
- data/libxlsxwriter/include/xlsxwriter/packager.h +6 -1
- data/libxlsxwriter/include/xlsxwriter/relationships.h +3 -1
- data/libxlsxwriter/include/xlsxwriter/rich_value.h +51 -0
- data/libxlsxwriter/include/xlsxwriter/rich_value_rel.h +50 -0
- data/libxlsxwriter/include/xlsxwriter/rich_value_structure.h +53 -0
- data/libxlsxwriter/include/xlsxwriter/rich_value_types.h +49 -0
- data/libxlsxwriter/include/xlsxwriter/shared_strings.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/styles.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/table.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/theme.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/third_party/ioapi.h +4 -4
- data/libxlsxwriter/include/xlsxwriter/third_party/zip.h +3 -3
- data/libxlsxwriter/include/xlsxwriter/utility.h +58 -7
- data/libxlsxwriter/include/xlsxwriter/vml.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/workbook.h +59 -2
- data/libxlsxwriter/include/xlsxwriter/worksheet.h +159 -13
- data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +11 -10
- data/libxlsxwriter/include/xlsxwriter.h +5 -4
- data/libxlsxwriter/libxlsxwriter.podspec +6 -6
- data/libxlsxwriter/src/Makefile +2 -1
- data/libxlsxwriter/src/app.c +2 -1
- data/libxlsxwriter/src/chart.c +360 -63
- data/libxlsxwriter/src/chartsheet.c +2 -1
- data/libxlsxwriter/src/comment.c +2 -1
- data/libxlsxwriter/src/content_types.c +22 -1
- data/libxlsxwriter/src/core.c +2 -1
- data/libxlsxwriter/src/custom.c +2 -1
- data/libxlsxwriter/src/drawing.c +7 -3
- data/libxlsxwriter/src/format.c +21 -1
- data/libxlsxwriter/src/hash_table.c +2 -1
- data/libxlsxwriter/src/metadata.c +176 -20
- data/libxlsxwriter/src/packager.c +306 -6
- data/libxlsxwriter/src/relationships.c +25 -1
- data/libxlsxwriter/src/rich_value.c +191 -0
- data/libxlsxwriter/src/rich_value_rel.c +142 -0
- data/libxlsxwriter/src/rich_value_structure.c +162 -0
- data/libxlsxwriter/src/rich_value_types.c +199 -0
- data/libxlsxwriter/src/shared_strings.c +2 -1
- data/libxlsxwriter/src/styles.c +31 -7
- data/libxlsxwriter/src/table.c +2 -1
- data/libxlsxwriter/src/theme.c +2 -1
- data/libxlsxwriter/src/utility.c +136 -46
- data/libxlsxwriter/src/vml.c +2 -1
- data/libxlsxwriter/src/workbook.c +191 -10
- data/libxlsxwriter/src/worksheet.c +514 -34
- data/libxlsxwriter/src/xmlwriter.c +17 -22
- data/libxlsxwriter/third_party/minizip/Makefile.orig +1 -1
- data/libxlsxwriter/third_party/minizip/configure.ac +1 -1
- data/libxlsxwriter/third_party/minizip/ioapi.h +6 -6
- data/libxlsxwriter/third_party/minizip/miniunz.c +16 -2
- data/libxlsxwriter/third_party/minizip/unzip.c +4 -4
- data/libxlsxwriter/third_party/minizip/unzip.h +1 -1
- data/libxlsxwriter/third_party/minizip/zip.c +5 -5
- data/libxlsxwriter/third_party/minizip/zip.h +3 -3
- data/libxlsxwriter/version.txt +1 -1
- data/test/validations_test.rb +3 -3
- data/test/worksheet_test.rb +10 -2
- metadata +11 -4
- data/libxlsxwriter/cmake/FindMINIZIP.cmake +0 -121
- data/libxlsxwriter/cmake/FindPackage.cmake +0 -183
- data/libxlsxwriter/cmake/i686-toolchain.cmake +0 -7
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Used in conjunction with the libxlsxwriter library.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
7
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
7
8
|
*
|
|
8
9
|
*/
|
|
9
10
|
|
|
@@ -27,16 +28,16 @@ STATIC char *_escape_attributes(struct xml_attribute *attribute);
|
|
|
27
28
|
|
|
28
29
|
char *lxw_escape_data(const char *data);
|
|
29
30
|
|
|
30
|
-
STATIC void _fprint_escaped_attributes(FILE *
|
|
31
|
+
STATIC void _fprint_escaped_attributes(FILE *xmlfile,
|
|
31
32
|
struct xml_attribute_list *attributes);
|
|
32
33
|
|
|
33
|
-
STATIC void _fprint_escaped_data(FILE *
|
|
34
|
+
STATIC void _fprint_escaped_data(FILE *xmlfile, const char *data);
|
|
34
35
|
|
|
35
36
|
/*
|
|
36
37
|
* Write the XML declaration.
|
|
37
38
|
*/
|
|
38
39
|
void
|
|
39
|
-
lxw_xml_declaration(FILE *
|
|
40
|
+
lxw_xml_declaration(FILE *xmlfile)
|
|
40
41
|
{
|
|
41
42
|
fprintf(xmlfile, "<?xml version=\"1.0\" "
|
|
42
43
|
"encoding=\"UTF-8\" standalone=\"yes\"?>\n");
|
|
@@ -46,7 +47,7 @@ lxw_xml_declaration(FILE * xmlfile)
|
|
|
46
47
|
* Write an XML start tag with optional attributes.
|
|
47
48
|
*/
|
|
48
49
|
void
|
|
49
|
-
lxw_xml_start_tag(FILE *
|
|
50
|
+
lxw_xml_start_tag(FILE *xmlfile,
|
|
50
51
|
const char *tag, struct xml_attribute_list *attributes)
|
|
51
52
|
{
|
|
52
53
|
fprintf(xmlfile, "<%s", tag);
|
|
@@ -61,7 +62,7 @@ lxw_xml_start_tag(FILE * xmlfile,
|
|
|
61
62
|
* This is a minor speed optimization for elements that don't need encoding.
|
|
62
63
|
*/
|
|
63
64
|
void
|
|
64
|
-
lxw_xml_start_tag_unencoded(FILE *
|
|
65
|
+
lxw_xml_start_tag_unencoded(FILE *xmlfile,
|
|
65
66
|
const char *tag,
|
|
66
67
|
struct xml_attribute_list *attributes)
|
|
67
68
|
{
|
|
@@ -82,7 +83,7 @@ lxw_xml_start_tag_unencoded(FILE * xmlfile,
|
|
|
82
83
|
* Write an XML end tag.
|
|
83
84
|
*/
|
|
84
85
|
void
|
|
85
|
-
lxw_xml_end_tag(FILE *
|
|
86
|
+
lxw_xml_end_tag(FILE *xmlfile, const char *tag)
|
|
86
87
|
{
|
|
87
88
|
fprintf(xmlfile, "</%s>", tag);
|
|
88
89
|
}
|
|
@@ -91,7 +92,7 @@ lxw_xml_end_tag(FILE * xmlfile, const char *tag)
|
|
|
91
92
|
* Write an empty XML tag with optional attributes.
|
|
92
93
|
*/
|
|
93
94
|
void
|
|
94
|
-
lxw_xml_empty_tag(FILE *
|
|
95
|
+
lxw_xml_empty_tag(FILE *xmlfile,
|
|
95
96
|
const char *tag, struct xml_attribute_list *attributes)
|
|
96
97
|
{
|
|
97
98
|
fprintf(xmlfile, "<%s", tag);
|
|
@@ -106,7 +107,7 @@ lxw_xml_empty_tag(FILE * xmlfile,
|
|
|
106
107
|
* This is a minor speed optimization for elements that don't need encoding.
|
|
107
108
|
*/
|
|
108
109
|
void
|
|
109
|
-
lxw_xml_empty_tag_unencoded(FILE *
|
|
110
|
+
lxw_xml_empty_tag_unencoded(FILE *xmlfile,
|
|
110
111
|
const char *tag,
|
|
111
112
|
struct xml_attribute_list *attributes)
|
|
112
113
|
{
|
|
@@ -127,7 +128,7 @@ lxw_xml_empty_tag_unencoded(FILE * xmlfile,
|
|
|
127
128
|
* Write an XML element containing data with optional attributes.
|
|
128
129
|
*/
|
|
129
130
|
void
|
|
130
|
-
lxw_xml_data_element(FILE *
|
|
131
|
+
lxw_xml_data_element(FILE *xmlfile,
|
|
131
132
|
const char *tag,
|
|
132
133
|
const char *data, struct xml_attribute_list *attributes)
|
|
133
134
|
{
|
|
@@ -146,7 +147,7 @@ lxw_xml_data_element(FILE * xmlfile,
|
|
|
146
147
|
* Write an XML <si> element for rich strings, without encoding.
|
|
147
148
|
*/
|
|
148
149
|
void
|
|
149
|
-
lxw_xml_rich_si_element(FILE *
|
|
150
|
+
lxw_xml_rich_si_element(FILE *xmlfile, const char *string)
|
|
150
151
|
{
|
|
151
152
|
fprintf(xmlfile, "<si>%s</si>", string);
|
|
152
153
|
}
|
|
@@ -238,7 +239,7 @@ lxw_escape_data(const char *data)
|
|
|
238
239
|
uint8_t
|
|
239
240
|
lxw_has_control_characters(const char *string)
|
|
240
241
|
{
|
|
241
|
-
while (string) {
|
|
242
|
+
while (*string) {
|
|
242
243
|
/* 0xE0 == 0b11100000 masks values > 0x19 == 0b00011111. */
|
|
243
244
|
if (!(*string & 0xE0) && *string != 0x0A && *string != 0x09)
|
|
244
245
|
return LXW_TRUE;
|
|
@@ -369,7 +370,7 @@ lxw_escape_url_characters(const char *string, uint8_t escape_hash)
|
|
|
369
370
|
|
|
370
371
|
/* Write out escaped attributes. */
|
|
371
372
|
STATIC void
|
|
372
|
-
_fprint_escaped_attributes(FILE *
|
|
373
|
+
_fprint_escaped_attributes(FILE *xmlfile,
|
|
373
374
|
struct xml_attribute_list *attributes)
|
|
374
375
|
{
|
|
375
376
|
struct xml_attribute *attribute;
|
|
@@ -396,7 +397,7 @@ _fprint_escaped_attributes(FILE * xmlfile,
|
|
|
396
397
|
|
|
397
398
|
/* Write out escaped XML data. */
|
|
398
399
|
STATIC void
|
|
399
|
-
_fprint_escaped_data(FILE *
|
|
400
|
+
_fprint_escaped_data(FILE *xmlfile, const char *data)
|
|
400
401
|
{
|
|
401
402
|
/* Escape the data section of the XML element. */
|
|
402
403
|
if (!strpbrk(data, "&<>")) {
|
|
@@ -425,18 +426,12 @@ lxw_new_attribute_str(const char *key, const char *value)
|
|
|
425
426
|
|
|
426
427
|
/* Create a new integer XML attribute. */
|
|
427
428
|
struct xml_attribute *
|
|
428
|
-
lxw_new_attribute_int(const char *key,
|
|
429
|
+
lxw_new_attribute_int(const char *key, int32_t value)
|
|
429
430
|
{
|
|
430
431
|
struct xml_attribute *attribute = malloc(sizeof(struct xml_attribute));
|
|
431
432
|
|
|
432
433
|
LXW_ATTRIBUTE_COPY(attribute->key, key);
|
|
433
|
-
|
|
434
|
-
#if defined(_MSC_VER)
|
|
435
|
-
lxw_snprintf(attribute->value, LXW_MAX_ATTRIBUTE_LENGTH, "%lld", value);
|
|
436
|
-
#else
|
|
437
|
-
lxw_snprintf(attribute->value, LXW_MAX_ATTRIBUTE_LENGTH, "%ld",
|
|
438
|
-
(long) value);
|
|
439
|
-
#endif
|
|
434
|
+
lxw_snprintf(attribute->value, LXW_MAX_ATTRIBUTE_LENGTH, "%d", value);
|
|
440
435
|
|
|
441
436
|
return attribute;
|
|
442
437
|
}
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/* Linux needs this to support file operation on files larger then 4+GB
|
|
33
|
+
* But might need better if/def to select just the platforms that needs them. */
|
|
34
34
|
|
|
35
35
|
#ifndef __USE_FILE_OFFSET64
|
|
36
36
|
#define __USE_FILE_OFFSET64
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
#if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
|
|
67
67
|
#define ftello64 _ftelli64
|
|
68
68
|
#define fseeko64 _fseeki64
|
|
69
|
-
#else
|
|
69
|
+
#else /* old MSC */
|
|
70
70
|
#define ftello64 ftell
|
|
71
71
|
#define fseeko64 fseek
|
|
72
72
|
#endif
|
|
@@ -150,7 +150,7 @@ typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream)
|
|
|
150
150
|
typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin);
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
/* here is the "old" 32 bits structure
|
|
153
|
+
/* here is the "old" 32 bits structure */
|
|
154
154
|
typedef struct zlib_filefunc_def_s
|
|
155
155
|
{
|
|
156
156
|
open_file_func zopen_file;
|
|
@@ -194,8 +194,8 @@ typedef struct zlib_filefunc64_32_def_s
|
|
|
194
194
|
|
|
195
195
|
#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
|
|
196
196
|
#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
/* #define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) */
|
|
198
|
+
/* #define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) */
|
|
199
199
|
#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
|
|
200
200
|
#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
|
|
201
201
|
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
/* change_file_date : change the date/time of a file
|
|
81
81
|
filename : the filename of the file where date/time must be modified
|
|
82
|
-
dosdate : the new date at the
|
|
82
|
+
dosdate : the new date at the MSDOS format (4 bytes)
|
|
83
83
|
tmu_date : the SAME new date at the tm_unz format */
|
|
84
84
|
static void change_file_date(const char *filename, uLong dosdate, tm_unz tmu_date) {
|
|
85
85
|
#ifdef _WIN32
|
|
@@ -186,7 +186,7 @@ static int makedir(const char *newdir) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
static void do_banner(void) {
|
|
189
|
-
printf("MiniUnz 1.
|
|
189
|
+
printf("MiniUnz 1.1, demo of zLib + Unz package written by Gilles Vollant\n");
|
|
190
190
|
printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -356,6 +356,20 @@ static int do_extract_currentfile(unzFile uf, const int* popt_extract_without_pa
|
|
|
356
356
|
else
|
|
357
357
|
write_filename = filename_withoutpath;
|
|
358
358
|
|
|
359
|
+
if (write_filename[0]!='\0')
|
|
360
|
+
{
|
|
361
|
+
const char* relative_check = write_filename;
|
|
362
|
+
while (relative_check[1]!='\0')
|
|
363
|
+
{
|
|
364
|
+
if (relative_check[0]=='.' && relative_check[1]=='.')
|
|
365
|
+
write_filename = relative_check;
|
|
366
|
+
relative_check++;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
while (write_filename[0]=='/' || write_filename[0]=='.')
|
|
371
|
+
write_filename++;
|
|
372
|
+
|
|
359
373
|
err = unzOpenCurrentFilePassword(uf,password);
|
|
360
374
|
if (err!=UNZ_OK)
|
|
361
375
|
{
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
const char unz_copyright[] =
|
|
118
118
|
" unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
|
|
119
119
|
|
|
120
|
-
/*
|
|
120
|
+
/* unz_file_info64_internal contain internal info about a file in zipfile*/
|
|
121
121
|
typedef struct unz_file_info64_internal_s
|
|
122
122
|
{
|
|
123
123
|
ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */
|
|
@@ -450,7 +450,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
|
|
450
450
|
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
|
|
451
451
|
return CENTRALDIRINVALID;
|
|
452
452
|
|
|
453
|
-
/* number of the disk with the start of the zip64 end of
|
|
453
|
+
/* number of the disk with the start of the zip64 end of central directory */
|
|
454
454
|
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
|
|
455
455
|
return CENTRALDIRINVALID;
|
|
456
456
|
if (uL != 0)
|
|
@@ -497,9 +497,9 @@ local unzFile unzOpenInternal(const void *path,
|
|
|
497
497
|
ZPOS64_T central_pos;
|
|
498
498
|
uLong uL;
|
|
499
499
|
|
|
500
|
-
uLong number_disk; /* number of the current
|
|
500
|
+
uLong number_disk; /* number of the current disk, used for
|
|
501
501
|
spanning ZIP, unsupported, always 0*/
|
|
502
|
-
uLong number_disk_with_CD; /* number the
|
|
502
|
+
uLong number_disk_with_CD; /* number the disk with central dir, used
|
|
503
503
|
for spanning ZIP, unsupported, always 0*/
|
|
504
504
|
ZPOS64_T number_entry_CD; /* total number of entries in
|
|
505
505
|
the central dir
|
|
@@ -306,7 +306,7 @@ extern int ZEXPORT unzGetCurrentFileInfo(unzFile file,
|
|
|
306
306
|
Get Info about the current file
|
|
307
307
|
if pfile_info!=NULL, the *pfile_info structure will contain some info about
|
|
308
308
|
the current file
|
|
309
|
-
if szFileName!=NULL, the
|
|
309
|
+
if szFileName!=NULL, the filename string will be copied in szFileName
|
|
310
310
|
(fileNameBufferSize is the size of the buffer)
|
|
311
311
|
if extraField!=NULL, the extra field information will be copied in extraField
|
|
312
312
|
(extraFieldBufferSize is the size of the buffer).
|
|
@@ -575,7 +575,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
|
|
575
575
|
if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
|
|
576
576
|
return 0;
|
|
577
577
|
|
|
578
|
-
/* number of the disk with the start of the zip64 end of
|
|
578
|
+
/* number of the disk with the start of the zip64 end of central directory */
|
|
579
579
|
if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
|
|
580
580
|
return 0;
|
|
581
581
|
if (uL != 0)
|
|
@@ -614,9 +614,9 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) {
|
|
|
614
614
|
ZPOS64_T central_pos;
|
|
615
615
|
uLong uL;
|
|
616
616
|
|
|
617
|
-
uLong number_disk; /* number of the current
|
|
617
|
+
uLong number_disk; /* number of the current disk, used for
|
|
618
618
|
spanning ZIP, unsupported, always 0*/
|
|
619
|
-
uLong number_disk_with_CD; /* number
|
|
619
|
+
uLong number_disk_with_CD; /* number of the disk with central dir, used
|
|
620
620
|
for spanning ZIP, unsupported, always 0*/
|
|
621
621
|
ZPOS64_T number_entry;
|
|
622
622
|
ZPOS64_T number_entry_CD; /* total number of entries in
|
|
@@ -1608,7 +1608,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_si
|
|
|
1608
1608
|
|
|
1609
1609
|
if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree)
|
|
1610
1610
|
{
|
|
1611
|
-
// we
|
|
1611
|
+
// we cannot write more data to the buffer that we have room for.
|
|
1612
1612
|
return ZIP_BADZIPFILE;
|
|
1613
1613
|
}
|
|
1614
1614
|
|
|
@@ -1872,7 +1872,7 @@ extern int ZEXPORT zipClose(zipFile file, const char* global_comment) {
|
|
|
1872
1872
|
free_linkedlist(&(zi->central_dir));
|
|
1873
1873
|
|
|
1874
1874
|
pos = centraldir_pos_inzip - zi->add_position_when_writing_offset;
|
|
1875
|
-
if(pos >= 0xffffffff || zi->number_entry
|
|
1875
|
+
if(pos >= 0xffffffff || zi->number_entry >= 0xFFFF)
|
|
1876
1876
|
{
|
|
1877
1877
|
ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);
|
|
1878
1878
|
Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
extern "C" {
|
|
50
50
|
#endif
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
/* #define HAVE_BZIP2 */
|
|
53
53
|
|
|
54
54
|
#ifndef _ZLIB_H
|
|
55
55
|
#include "zlib.h"
|
|
@@ -190,9 +190,9 @@ extern int ZEXPORT zipOpenNewFileInZip64(zipFile file,
|
|
|
190
190
|
filename : the filename in zip (if NULL, '-' without quote will be used
|
|
191
191
|
*zipfi contain supplemental information
|
|
192
192
|
if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
|
|
193
|
-
contains the extrafield data
|
|
193
|
+
contains the extrafield data for the local header
|
|
194
194
|
if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
|
|
195
|
-
contains the extrafield data
|
|
195
|
+
contains the extrafield data for the global header
|
|
196
196
|
if comment != NULL, comment contain the comment string
|
|
197
197
|
method contain the compression method (0 for store, Z_DEFLATED for deflate)
|
|
198
198
|
level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
|
data/libxlsxwriter/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2026-10-19 01:47:16 +0400 db95245
|
data/test/validations_test.rb
CHANGED
|
@@ -13,7 +13,7 @@ describe "FastExcel validations" do
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
assert_equal(ArgumentError, error.class)
|
|
16
|
-
assert_equal("Invalid worksheet name 'Payments Report': (
|
|
16
|
+
assert_equal("Invalid worksheet name 'Payments Report': (19 - error_sheetname_already_used) Worksheet name is already in use.", error.message)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "should not raise error when worksheet name is null" do
|
|
@@ -31,7 +31,7 @@ describe "FastExcel validations" do
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
assert_equal(ArgumentError, error.class)
|
|
34
|
-
assert_equal("Invalid worksheet name 'ABCDEFGHIJKLMNOPQRSTUVWXYZ012345': (
|
|
34
|
+
assert_equal("Invalid worksheet name 'ABCDEFGHIJKLMNOPQRSTUVWXYZ012345': (16 - error_sheetname_length_exceeded) Worksheet name exceeds Excel's limit of 31 characters.", error.message)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
it "should not raise error when the sheet name is at maximum length" do
|
|
@@ -48,7 +48,7 @@ describe "FastExcel validations" do
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
assert_equal(ArgumentError, error.class)
|
|
51
|
-
assert_equal("Invalid worksheet name 'a?': (
|
|
51
|
+
assert_equal("Invalid worksheet name 'a?': (17 - error_invalid_sheetname_character) Worksheet name cannot contain invalid characters: '[ ] : * ? / \\'", error.message)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
it "should raise error when reopening workbook" do
|
data/test/worksheet_test.rb
CHANGED
|
@@ -87,10 +87,18 @@ describe "FastExcel::WorksheetExt append_row" do
|
|
|
87
87
|
it "should set name correctly" do
|
|
88
88
|
workbook = FastExcel.open(constant_memory: true)
|
|
89
89
|
ws1 = workbook.add_worksheet("foo")
|
|
90
|
-
ws2 = workbook.add_worksheet
|
|
90
|
+
ws2 = workbook.add_worksheet
|
|
91
91
|
|
|
92
92
|
assert_equal("foo", ws1[:name])
|
|
93
|
-
assert_equal("", ws2[:name])
|
|
93
|
+
assert_equal("Sheet2", ws2[:name])
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
it "should raise error when sheet name is empty string" do
|
|
97
|
+
workbook = FastExcel.open(constant_memory: true)
|
|
98
|
+
error = assert_raises(ArgumentError) do
|
|
99
|
+
workbook.add_worksheet("")
|
|
100
|
+
end
|
|
101
|
+
assert_match(/error_parameter_is_empty/, error.message)
|
|
94
102
|
end
|
|
95
103
|
|
|
96
104
|
it "should map fields correctly" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fast_excel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Evstigneev
|
|
@@ -99,12 +99,14 @@ files:
|
|
|
99
99
|
- lib/fast_excel/binding/format.rb
|
|
100
100
|
- lib/fast_excel/binding/workbook.rb
|
|
101
101
|
- lib/fast_excel/binding/worksheet.rb
|
|
102
|
+
- libxlsxwriter/.cirrus.yml
|
|
102
103
|
- libxlsxwriter/.github/FUNDING.yml
|
|
103
104
|
- libxlsxwriter/.github/ISSUE_TEMPLATE.md
|
|
104
105
|
- libxlsxwriter/.github/PULL_REQUEST_TEMPLATE.md
|
|
105
106
|
- libxlsxwriter/.github/workflows/cmake_actions.yml
|
|
106
107
|
- libxlsxwriter/.github/workflows/code_style.yml
|
|
107
108
|
- libxlsxwriter/.github/workflows/coverity.yml
|
|
109
|
+
- libxlsxwriter/.github/workflows/make_32_actions.yml
|
|
108
110
|
- libxlsxwriter/.github/workflows/make_actions.yml
|
|
109
111
|
- libxlsxwriter/.github/workflows/valgrind.yml
|
|
110
112
|
- libxlsxwriter/.github/workflows/windows_build.yml
|
|
@@ -120,9 +122,6 @@ files:
|
|
|
120
122
|
- libxlsxwriter/Readme.md
|
|
121
123
|
- libxlsxwriter/build.zig
|
|
122
124
|
- libxlsxwriter/build.zig.zon
|
|
123
|
-
- libxlsxwriter/cmake/FindMINIZIP.cmake
|
|
124
|
-
- libxlsxwriter/cmake/FindPackage.cmake
|
|
125
|
-
- libxlsxwriter/cmake/i686-toolchain.cmake
|
|
126
125
|
- libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h
|
|
127
126
|
- libxlsxwriter/cocoapods/libxlsxwriter.modulemap
|
|
128
127
|
- libxlsxwriter/include/xlsxwriter.h
|
|
@@ -140,6 +139,10 @@ files:
|
|
|
140
139
|
- libxlsxwriter/include/xlsxwriter/metadata.h
|
|
141
140
|
- libxlsxwriter/include/xlsxwriter/packager.h
|
|
142
141
|
- libxlsxwriter/include/xlsxwriter/relationships.h
|
|
142
|
+
- libxlsxwriter/include/xlsxwriter/rich_value.h
|
|
143
|
+
- libxlsxwriter/include/xlsxwriter/rich_value_rel.h
|
|
144
|
+
- libxlsxwriter/include/xlsxwriter/rich_value_structure.h
|
|
145
|
+
- libxlsxwriter/include/xlsxwriter/rich_value_types.h
|
|
143
146
|
- libxlsxwriter/include/xlsxwriter/shared_strings.h
|
|
144
147
|
- libxlsxwriter/include/xlsxwriter/styles.h
|
|
145
148
|
- libxlsxwriter/include/xlsxwriter/table.h
|
|
@@ -172,6 +175,10 @@ files:
|
|
|
172
175
|
- libxlsxwriter/src/metadata.c
|
|
173
176
|
- libxlsxwriter/src/packager.c
|
|
174
177
|
- libxlsxwriter/src/relationships.c
|
|
178
|
+
- libxlsxwriter/src/rich_value.c
|
|
179
|
+
- libxlsxwriter/src/rich_value_rel.c
|
|
180
|
+
- libxlsxwriter/src/rich_value_structure.c
|
|
181
|
+
- libxlsxwriter/src/rich_value_types.c
|
|
175
182
|
- libxlsxwriter/src/shared_strings.c
|
|
176
183
|
- libxlsxwriter/src/styles.c
|
|
177
184
|
- libxlsxwriter/src/table.c
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# :copyright: (c) 2017 Alex Huszagh.
|
|
2
|
-
# :license: FreeBSD, see LICENSE.txt for more details.
|
|
3
|
-
|
|
4
|
-
# FindMINIZIP
|
|
5
|
-
# -----------
|
|
6
|
-
#
|
|
7
|
-
# Find MINIZIP include dirs and libraries
|
|
8
|
-
#
|
|
9
|
-
# Use this module by invoking find_package with the form::
|
|
10
|
-
#
|
|
11
|
-
# find_package(MINIZIP
|
|
12
|
-
# [version] [EXACT] # Minimum or EXACT version e.g. 1.0.6
|
|
13
|
-
# [REQUIRED] # Fail with error if MINIZIP is not found
|
|
14
|
-
# )
|
|
15
|
-
#
|
|
16
|
-
# You may also set `MINIZIP_USE_STATIC_LIBS` to prefer static libraries
|
|
17
|
-
# to shared ones.
|
|
18
|
-
#
|
|
19
|
-
# If found, `MINIZIP_FOUND` will be set to true, and `MINIZIP_LIBRARIES`
|
|
20
|
-
# and `MINIZIP_INCLUDE_DIRS` will both be set.
|
|
21
|
-
#
|
|
22
|
-
# You may optionally set `MINIZIP_ROOT` to specify a custom root directory
|
|
23
|
-
# for the MINIZIP installation.
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
include(CheckCXXSourceCompiles)
|
|
27
|
-
include(FindPackage)
|
|
28
|
-
|
|
29
|
-
# PATHS
|
|
30
|
-
# -----
|
|
31
|
-
|
|
32
|
-
set(MINIZIP_SEARCH_PATHS)
|
|
33
|
-
|
|
34
|
-
if(MINIZIP_ROOT)
|
|
35
|
-
list(APPEND MINIZIP_SEARCH_PATHS ${MINIZIP_ROOT})
|
|
36
|
-
endif()
|
|
37
|
-
|
|
38
|
-
if(WIN32)
|
|
39
|
-
list(APPEND ZLIB_SEARCH_PATHS
|
|
40
|
-
"$ENV{PROGRAMFILES}/minizip"
|
|
41
|
-
)
|
|
42
|
-
endif()
|
|
43
|
-
|
|
44
|
-
unset(MINIZIP_SYSTEM_ROOT)
|
|
45
|
-
unset(MINIZIP_CUSTOM_ROOT)
|
|
46
|
-
unset(MINIZIP_SEARCH_HKEY)
|
|
47
|
-
|
|
48
|
-
# FIND
|
|
49
|
-
# ----
|
|
50
|
-
|
|
51
|
-
# INCLUDE DIRECTORY
|
|
52
|
-
SetSuffixes(MINIZIP)
|
|
53
|
-
foreach(search ${MINIZIP_SEARCH_PATHS})
|
|
54
|
-
FIND_PATH(MINIZIP_INCLUDE_DIR
|
|
55
|
-
NAMES minizip/zip.h
|
|
56
|
-
PATHS ${search}
|
|
57
|
-
PATH_SUFFIXES include
|
|
58
|
-
)
|
|
59
|
-
endforeach(search)
|
|
60
|
-
|
|
61
|
-
if(NOT MINIZIP_INCLUDE_DIR)
|
|
62
|
-
FIND_PATH(MINIZIP_INCLUDE_DIR minizip/zip.h PATH_SUFFIXES include)
|
|
63
|
-
endif()
|
|
64
|
-
|
|
65
|
-
# LIBRARY PATHS
|
|
66
|
-
set(MINIZIP_LIBRARY_NAMES minizip)
|
|
67
|
-
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
68
|
-
list(APPEND MINIZIP_LIBRARY_NAMES minizipd)
|
|
69
|
-
endif()
|
|
70
|
-
|
|
71
|
-
foreach(search ${MINIZIP_SEARCH_PATHS})
|
|
72
|
-
FIND_LIBRARY(MINIZIP_LIBRARY
|
|
73
|
-
NAMES ${MINIZIP_LIBRARY_NAMES}
|
|
74
|
-
PATHS ${search}
|
|
75
|
-
PATH_SUFFIXES lib
|
|
76
|
-
)
|
|
77
|
-
endforeach(search)
|
|
78
|
-
|
|
79
|
-
if(NOT MINIZIP_LIBRARY)
|
|
80
|
-
FIND_LIBRARY(MINIZIP_LIBRARY NAMES ${MINIZIP_LIBRARY_NAMES} PATH_SUFFIXES lib)
|
|
81
|
-
endif()
|
|
82
|
-
|
|
83
|
-
set(MINIZIP_INCLUDE_DIRS ${MINIZIP_INCLUDE_DIR})
|
|
84
|
-
set(MINIZIP_LIBRARIES ${MINIZIP_LIBRARY})
|
|
85
|
-
|
|
86
|
-
CheckFound(MINIZIP)
|
|
87
|
-
FindStaticLibs(MINIZIP)
|
|
88
|
-
|
|
89
|
-
# VERSION
|
|
90
|
-
# -------
|
|
91
|
-
|
|
92
|
-
if(MINIZIP_FOUND)
|
|
93
|
-
file(STRINGS "${MINIZIP_INCLUDE_DIRS}/zlib.h" MINIZIP_VERSION_CONTENTS REGEX "version [0-9]+\\.[0-9]+(\\.[0-9]+)?")
|
|
94
|
-
string(REGEX REPLACE ".*version ([0-9]+)\\.[0-9]+" "\\1" MINIZIP_VERSION_MAJOR "${MINIZIP_VERSION_CONTENTS}")
|
|
95
|
-
string(REGEX REPLACE ".*version [0-9]+\\.([0-9]+)" "\\1" MINIZIP_VERSION_MINOR "${MINIZIP_VERSION_CONTENTS}")
|
|
96
|
-
set(MINIZIP_VERSION_PATCH 0)
|
|
97
|
-
|
|
98
|
-
set(MINIZIP_VERSION_STRING "${MINIZIP_VERSION_MAJOR}.${MINIZIP_VERSION_MINOR}.${MINIZIP_VERSION_PATCH}")
|
|
99
|
-
set(MINIZIP_VERSION ${MINIZIP_VERSION_STRING})
|
|
100
|
-
|
|
101
|
-
MatchVersion(MINIZIP)
|
|
102
|
-
endif()
|
|
103
|
-
|
|
104
|
-
# COMPILATION
|
|
105
|
-
# -----------
|
|
106
|
-
|
|
107
|
-
set(MINIZIP_CODE "
|
|
108
|
-
#include <minizip/zip.h>
|
|
109
|
-
int main(void)
|
|
110
|
-
{
|
|
111
|
-
zip_fileinfo zipfile_info;
|
|
112
|
-
|
|
113
|
-
return 0;
|
|
114
|
-
}
|
|
115
|
-
"
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
if(MINIZIP_FOUND)
|
|
119
|
-
CheckCompiles(MINIZIP)
|
|
120
|
-
endif()
|
|
121
|
-
RequiredPackageFound(MINIZIP)
|