xlsxwriter 0.2.1.pre → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -3
- data/ext/xlsxwriter/chart.c +88 -80
- data/ext/xlsxwriter/chart.h +2 -2
- data/ext/xlsxwriter/chartsheet.c +307 -0
- data/ext/xlsxwriter/chartsheet.h +15 -0
- data/ext/xlsxwriter/common.h +104 -0
- data/ext/xlsxwriter/extconf.rb +8 -8
- data/ext/xlsxwriter/libxlsxwriter/License.txt +24 -2
- data/ext/xlsxwriter/libxlsxwriter/Makefile +46 -12
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/app.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/chart.h +196 -30
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/chartsheet.h +3 -3
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/comment.h +76 -0
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/common.h +24 -5
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/content_types.h +5 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/core.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/custom.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/drawing.h +6 -17
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/format.h +20 -6
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/hash_table.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/packager.h +3 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/shared_strings.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/styles.h +11 -5
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/theme.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/third_party/md5.h +43 -0
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/utility.h +42 -3
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/vml.h +55 -0
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/workbook.h +83 -18
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/worksheet.h +1519 -109
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/xmlwriter.h +4 -2
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter.h +3 -2
- data/ext/xlsxwriter/libxlsxwriter/src/Makefile +25 -7
- data/ext/xlsxwriter/libxlsxwriter/src/app.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/chart.c +332 -48
- data/ext/xlsxwriter/libxlsxwriter/src/chartsheet.c +20 -19
- data/ext/xlsxwriter/libxlsxwriter/src/comment.c +443 -0
- data/ext/xlsxwriter/libxlsxwriter/src/content_types.c +20 -1
- data/ext/xlsxwriter/libxlsxwriter/src/core.c +2 -2
- data/ext/xlsxwriter/libxlsxwriter/src/custom.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/drawing.c +58 -20
- data/ext/xlsxwriter/libxlsxwriter/src/format.c +98 -25
- data/ext/xlsxwriter/libxlsxwriter/src/hash_table.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/packager.c +269 -12
- data/ext/xlsxwriter/libxlsxwriter/src/relationships.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/shared_strings.c +2 -4
- data/ext/xlsxwriter/libxlsxwriter/src/styles.c +334 -48
- data/ext/xlsxwriter/libxlsxwriter/src/theme.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/utility.c +71 -8
- data/ext/xlsxwriter/libxlsxwriter/src/vml.c +1032 -0
- data/ext/xlsxwriter/libxlsxwriter/src/workbook.c +343 -27
- data/ext/xlsxwriter/libxlsxwriter/src/worksheet.c +3759 -478
- data/ext/xlsxwriter/libxlsxwriter/src/xmlwriter.c +81 -2
- data/ext/xlsxwriter/libxlsxwriter/third_party/md5/Makefile +42 -0
- data/ext/xlsxwriter/libxlsxwriter/third_party/md5/md5.c +291 -0
- data/ext/xlsxwriter/libxlsxwriter/third_party/md5/md5.h +43 -0
- data/ext/xlsxwriter/shared_strings.c +65 -0
- data/ext/xlsxwriter/shared_strings.h +15 -0
- data/ext/xlsxwriter/workbook.c +96 -20
- data/ext/xlsxwriter/worksheet.c +125 -235
- data/ext/xlsxwriter/worksheet.h +2 -1
- data/ext/xlsxwriter/xlsxwriter.c +4 -0
- data/lib/xlsxwriter/rich_string.rb +0 -2
- data/lib/xlsxwriter/version.rb +1 -1
- data/lib/xlsxwriter/worksheet.rb +2 -2
- data/test/{run-test.rb → run_test.rb} +3 -3
- data/test/support/chart_test.rb +3 -3
- data/test/support/with_xlsx_file.rb +4 -2
- data/test/support/xlsx_comparable.rb +40 -26
- data/test/test_array_formula.rb +42 -0
- data/test/test_autofilter.rb +72 -0
- data/test/{test-chart-area.rb → test_chart_area.rb} +2 -2
- data/test/{test-chart-axis.rb → test_chart_axis.rb} +16 -16
- data/test/test_chart_bar.rb +382 -0
- data/test/test_chart_blank.rb +27 -0
- data/test/{test-chart-column.rb → test_chart_column.rb} +2 -2
- data/test/{test-chart-doughnut.rb → test_chart_doughnut.rb} +2 -2
- data/test/{test-chart-legend.rb → test_chart_legend.rb} +2 -2
- data/test/{test-chart-pie.rb → test_chart_pie.rb} +2 -2
- data/test/{test-chart-scatter.rb → test_chart_scatter.rb} +3 -4
- data/test/{test-chart-size.rb → test_chart_size.rb} +2 -2
- data/test/{test-chart-title.rb → test_chart_title.rb} +3 -3
- data/test/test_chartsheet.rb +201 -0
- data/test/{test-data.rb → test_data.rb} +1 -1
- data/test/{test-data-validation.rb → test_data_validation.rb} +23 -24
- data/test/{test-default-row.rb → test_default_row.rb} +1 -1
- data/test/{test-defined-name.rb → test_defined_name.rb} +12 -12
- data/test/{test-escapes.rb → test_escapes.rb} +5 -2
- data/test/{test-fit-to-pages.rb → test_fit_to_pages.rb} +6 -6
- data/test/{test-formatting.rb → test_formatting.rb} +10 -10
- data/test/{test-gridlines.rb → test_gridlines.rb} +3 -3
- data/test/{test-hyperlink.rb → test_hyperlink.rb} +22 -11
- data/test/{test-image.rb → test_image.rb} +6 -4
- data/test/{test-macro.rb → test_macro.rb} +1 -1
- data/test/{test-merge-range.rb → test_merge_range.rb} +1 -1
- data/test/{test-misc.rb → test_misc.rb} +2 -2
- data/test/{test-optimize.rb → test_optimize.rb} +2 -4
- data/test/{test-outline.rb → test_outline.rb} +14 -14
- data/test/{test-page-breaks.rb → test_page_breaks.rb} +2 -2
- data/test/{test-page-setup.rb → test_page_setup.rb} +2 -2
- data/test/{test-panes.rb → test_panes.rb} +1 -1
- data/test/{test-print-area.rb → test_print_area.rb} +3 -3
- data/test/{test-print-options.rb → test_print_options.rb} +7 -7
- data/test/{test-print-scale.rb → test_print_scale.rb} +2 -2
- data/test/{test-properties.rb → test_properties.rb} +2 -2
- data/test/{test-protect.rb → test_protect.rb} +3 -3
- data/test/{test-repeat.rb → test_repeat.rb} +3 -3
- data/test/{test-rich-string.rb → test_rich_string.rb} +5 -9
- data/test/{test-row-col-format.rb → test_row_col_format.rb} +1 -1
- data/test/{test-ruby-worksheet.rb → test_ruby_worksheet.rb} +2 -2
- data/test/{test-set-selection.rb → test_set_selection.rb} +2 -2
- data/test/{test-set-start-page.rb → test_set_start_page.rb} +2 -2
- data/test/{test-simple.rb → test_simple.rb} +10 -10
- data/test/{test-types.rb → test_types.rb} +1 -1
- data/test/{xlsx-func-testcase.rb → xlsx_func_testcase.rb} +1 -0
- metadata +135 -104
- data/test/test-array-formula.rb +0 -35
- data/test/test-autofilter.rb +0 -72
- data/test/test-chart-bar.rb +0 -74
- /data/test/{test-errors.rb → test_errors.rb} +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* libxlsxwriter
|
3
3
|
*
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2020, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
|
5
5
|
*
|
6
6
|
* xmlwriter - A libxlsxwriter library for creating Excel XLSX
|
7
7
|
* XML files.
|
@@ -24,7 +24,7 @@
|
|
24
24
|
#include <stdint.h>
|
25
25
|
#include "utility.h"
|
26
26
|
|
27
|
-
#define LXW_MAX_ATTRIBUTE_LENGTH
|
27
|
+
#define LXW_MAX_ATTRIBUTE_LENGTH 2080 /* Max URL length. */
|
28
28
|
#define LXW_ATTR_32 32
|
29
29
|
|
30
30
|
#define LXW_ATTRIBUTE_COPY(dst, src) \
|
@@ -167,7 +167,9 @@ void lxw_xml_data_element(FILE * xmlfile,
|
|
167
167
|
|
168
168
|
void lxw_xml_rich_si_element(FILE * xmlfile, const char *string);
|
169
169
|
|
170
|
+
uint8_t lxw_has_control_characters(const char *string);
|
170
171
|
char *lxw_escape_control_characters(const char *string);
|
172
|
+
char *lxw_escape_url_characters(const char *string, uint8_t escape_hash);
|
171
173
|
|
172
174
|
char *lxw_escape_data(const char *data);
|
173
175
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* libxlsxwriter
|
3
3
|
*
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2020, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
|
5
5
|
*/
|
6
6
|
|
7
7
|
/**
|
@@ -18,6 +18,7 @@
|
|
18
18
|
#include "xlsxwriter/format.h"
|
19
19
|
#include "xlsxwriter/utility.h"
|
20
20
|
|
21
|
-
#define LXW_VERSION "0.
|
21
|
+
#define LXW_VERSION "1.0.0"
|
22
|
+
#define LXW_VERSION_ID 100
|
22
23
|
|
23
24
|
#endif /* __LXW_XLSXWRITER_H__ */
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# Makefile for libxlsxwriter library.
|
4
4
|
#
|
5
|
-
# Copyright 2014-
|
5
|
+
# Copyright 2014-2020, John McNamara, jmcnamara@cpan.org
|
6
6
|
#
|
7
7
|
|
8
8
|
# Keep the output quiet by default.
|
@@ -11,6 +11,10 @@ ifdef V
|
|
11
11
|
Q=
|
12
12
|
endif
|
13
13
|
|
14
|
+
DESTDIR ?=
|
15
|
+
PREFIX ?= /usr/local
|
16
|
+
OPT_LEVEL ?= -O3
|
17
|
+
|
14
18
|
# Directory variables.
|
15
19
|
OBJS_DIR = .
|
16
20
|
INC_DIR = ../include
|
@@ -27,7 +31,6 @@ MINIZIP_OBJ = $(MINIZIP_DIR)/ioapi.o $(MINIZIP_DIR)/zip.o
|
|
27
31
|
MINIZIP_SO = $(MINIZIP_DIR)/ioapi.so $(MINIZIP_DIR)/zip.so
|
28
32
|
endif
|
29
33
|
|
30
|
-
|
31
34
|
ifdef USE_STANDARD_TMPFILE
|
32
35
|
# Use standard/C tmpfile().
|
33
36
|
CFLAGS += -DUSE_STANDARD_TMPFILE
|
@@ -38,6 +41,16 @@ TMPFILEPLUS_OBJ = $(TMPFILEPLUS_DIR)/tmpfileplus.o
|
|
38
41
|
TMPFILEPLUS_SO = $(TMPFILEPLUS_DIR)/tmpfileplus.so
|
39
42
|
endif
|
40
43
|
|
44
|
+
ifdef USE_NO_MD5
|
45
|
+
# Don't use MD5 to avoid duplicate image files.
|
46
|
+
CFLAGS += -DUSE_NO_MD5
|
47
|
+
else
|
48
|
+
# Use md5 (the default).
|
49
|
+
MD5_DIR = ../third_party/md5
|
50
|
+
MD5_OBJ = $(MD5_DIR)/md5.o
|
51
|
+
MD5_SO = $(MD5_DIR)/md5.so
|
52
|
+
endif
|
53
|
+
|
41
54
|
# Set flag for big endian architecture.
|
42
55
|
ifdef USE_BIG_ENDIAN
|
43
56
|
CFLAGS += -DLXW_BIG_ENDIAN
|
@@ -48,8 +61,13 @@ ifdef USE_DOUBLE_FUNCTION
|
|
48
61
|
CFLAGS += -DUSE_DOUBLE_FUNCTION
|
49
62
|
endif
|
50
63
|
|
64
|
+
# Use fmemopen() to avoid creating certain temporary files
|
65
|
+
ifdef USE_FMEMOPEN
|
66
|
+
CFLAGS += -DUSE_FMEMOPEN
|
67
|
+
endif
|
68
|
+
|
51
69
|
# Flags passed to compiler.
|
52
|
-
CFLAGS += -g
|
70
|
+
CFLAGS += -g $(OPT_LEVEL) -Wall -Wextra -Wstrict-prototypes -pedantic -ansi
|
53
71
|
|
54
72
|
|
55
73
|
# Ignore icc remarks about inlining limits.
|
@@ -77,7 +95,7 @@ UNAME := $(shell uname)
|
|
77
95
|
# Change make options on OS X.
|
78
96
|
ifeq ($(UNAME), Darwin)
|
79
97
|
LIBXLSXWRITER_SO = libxlsxwriter.dylib
|
80
|
-
SOFLAGS = -dynamiclib $(FPIC) -install_name /
|
98
|
+
SOFLAGS = -dynamiclib $(FPIC) -install_name $(PREFIX)/lib/$(LIBXLSXWRITER_SO)
|
81
99
|
endif
|
82
100
|
|
83
101
|
# Check for MinGW/MinGW64/Cygwin environments.
|
@@ -117,7 +135,7 @@ test_lib : libxlsxwriter_test.a
|
|
117
135
|
|
118
136
|
# The static library.
|
119
137
|
$(LIBXLSXWRITER_A) : $(OBJS)
|
120
|
-
$(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_OBJ) $(TMPFILEPLUS_OBJ) $^
|
138
|
+
$(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_OBJ) $(TMPFILEPLUS_OBJ) $(MD5_OBJ) $^
|
121
139
|
|
122
140
|
# The dynamic library.
|
123
141
|
ifeq ($(findstring m32,$(CFLAGS)),m32)
|
@@ -125,11 +143,11 @@ ARCH = -m32
|
|
125
143
|
endif
|
126
144
|
|
127
145
|
$(LIBXLSXWRITER_SO) : $(SOBJS)
|
128
|
-
$(Q)$(CC) $(LDFLAGS) $(SOFLAGS) $(ARCH) -o $@ $(MINIZIP_SO) $(TMPFILEPLUS_SO) $^ $(LIBS)
|
146
|
+
$(Q)$(CC) $(LDFLAGS) $(SOFLAGS) $(ARCH) -o $@ $(MINIZIP_SO) $(TMPFILEPLUS_SO) $(MD5_SO) $^ $(LIBS)
|
129
147
|
|
130
148
|
# The test library.
|
131
149
|
$(LIBXLSXWRITER_TO) : $(TOBJS)
|
132
|
-
$(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_OBJ) $(TMPFILEPLUS_OBJ) $^
|
150
|
+
$(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_OBJ) $(TMPFILEPLUS_OBJ) $(MD5_OBJ) $^
|
133
151
|
|
134
152
|
# Minimal target for quick compile without creating the libs.
|
135
153
|
test_compile : $(OBJS)
|