fast_excel 0.2.3 → 0.2.5

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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.travis.yml +4 -0
  4. data/CHANGELOG.md +9 -0
  5. data/Gemfile.lock +16 -16
  6. data/README.md +1 -1
  7. data/Rakefile +1 -1
  8. data/fast_excel.gemspec +1 -1
  9. data/lib/fast_excel.rb +21 -5
  10. data/lib/fast_excel/binding/format.rb +3 -3
  11. data/libxlsxwriter/.drone.yml +27 -0
  12. data/libxlsxwriter/.indent.pro +3 -0
  13. data/libxlsxwriter/.travis.yml +12 -0
  14. data/libxlsxwriter/CMakeLists.txt +348 -0
  15. data/libxlsxwriter/Changes.txt +78 -0
  16. data/libxlsxwriter/LICENSE.txt +65 -4
  17. data/libxlsxwriter/Makefile +27 -7
  18. data/libxlsxwriter/Readme.md +2 -0
  19. data/libxlsxwriter/appveyor.yml +65 -0
  20. data/libxlsxwriter/cmake/FindMINIZIP.cmake +121 -0
  21. data/libxlsxwriter/cmake/FindPackage.cmake +183 -0
  22. data/libxlsxwriter/cmake/FindZLIB.cmake +123 -0
  23. data/libxlsxwriter/cmake/i686-toolchain.cmake +7 -0
  24. data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +1 -1
  25. data/libxlsxwriter/cocoapods/libxlsxwriter.modulemap +2 -2
  26. data/libxlsxwriter/include/xlsxwriter.h +2 -2
  27. data/libxlsxwriter/include/xlsxwriter/app.h +1 -1
  28. data/libxlsxwriter/include/xlsxwriter/chart.h +109 -8
  29. data/libxlsxwriter/include/xlsxwriter/common.h +10 -2
  30. data/libxlsxwriter/include/xlsxwriter/content_types.h +1 -1
  31. data/libxlsxwriter/include/xlsxwriter/core.h +1 -1
  32. data/libxlsxwriter/include/xlsxwriter/custom.h +1 -1
  33. data/libxlsxwriter/include/xlsxwriter/drawing.h +1 -1
  34. data/libxlsxwriter/include/xlsxwriter/format.h +6 -6
  35. data/libxlsxwriter/include/xlsxwriter/hash_table.h +1 -1
  36. data/libxlsxwriter/include/xlsxwriter/packager.h +6 -1
  37. data/libxlsxwriter/include/xlsxwriter/relationships.h +1 -1
  38. data/libxlsxwriter/include/xlsxwriter/shared_strings.h +1 -1
  39. data/libxlsxwriter/include/xlsxwriter/styles.h +2 -2
  40. data/libxlsxwriter/include/xlsxwriter/theme.h +1 -1
  41. data/libxlsxwriter/include/xlsxwriter/utility.h +11 -5
  42. data/libxlsxwriter/include/xlsxwriter/workbook.h +3 -3
  43. data/libxlsxwriter/include/xlsxwriter/worksheet.h +517 -39
  44. data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +2 -2
  45. data/libxlsxwriter/libxlsxwriter.podspec +4 -2
  46. data/libxlsxwriter/src/Makefile +30 -5
  47. data/libxlsxwriter/src/app.c +1 -1
  48. data/libxlsxwriter/src/chart.c +76 -19
  49. data/libxlsxwriter/src/content_types.c +1 -1
  50. data/libxlsxwriter/src/core.c +10 -10
  51. data/libxlsxwriter/src/custom.c +2 -2
  52. data/libxlsxwriter/src/drawing.c +1 -1
  53. data/libxlsxwriter/src/format.c +3 -3
  54. data/libxlsxwriter/src/hash_table.c +1 -1
  55. data/libxlsxwriter/src/packager.c +20 -7
  56. data/libxlsxwriter/src/relationships.c +1 -1
  57. data/libxlsxwriter/src/shared_strings.c +1 -1
  58. data/libxlsxwriter/src/styles.c +4 -4
  59. data/libxlsxwriter/src/theme.c +1 -1
  60. data/libxlsxwriter/src/utility.c +41 -1
  61. data/libxlsxwriter/src/workbook.c +8 -6
  62. data/libxlsxwriter/src/worksheet.c +748 -31
  63. data/libxlsxwriter/src/xmlwriter.c +2 -2
  64. data/libxlsxwriter/third_party/minizip/Makefile +6 -1
  65. data/libxlsxwriter/version.txt +1 -1
  66. data/test/reopen_test.rb +22 -0
  67. data/test/test_helper.rb +8 -5
  68. data/test/validations_test.rb +27 -0
  69. metadata +11 -2
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * libxlsxwriter
3
3
  *
4
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
4
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
5
5
  *
6
6
  * xmlwriter - A libxlsxwriter library for creating Excel XLSX
7
7
  * XML files.
@@ -22,7 +22,7 @@
22
22
  #include <stdio.h>
23
23
  #include <stdlib.h>
24
24
  #include <stdint.h>
25
- #include "common.h"
25
+ #include "utility.h"
26
26
 
27
27
  #define LXW_MAX_ATTRIBUTE_LENGTH 256
28
28
  #define LXW_ATTR_32 32
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = "libxlsxwriter"
3
- s.version = "0.6.9"
3
+ s.version = "0.7.7"
4
4
  s.summary = "Libxlsxwriter: A C library for creating Excel XLSX files."
5
5
  s.ios.deployment_target = "6.0"
6
6
  s.osx.deployment_target = "10.8"
@@ -16,6 +16,7 @@ Pod::Spec.new do |s|
16
16
  * Defined names.
17
17
  * Autofilters.
18
18
  * Charts.
19
+ * Data validation and drop down lists.
19
20
  * Worksheet PNG/JPEG images.
20
21
  * Memory optimisation mode for writing large files.
21
22
  * Source code available on [GitHub](https://github.com/jmcnamara/libxlsxwriter).
@@ -24,6 +25,7 @@ Pod::Spec.new do |s|
24
25
  * Works with GCC, Clang, Xcode, MSVC 2015, ICC, TCC, MinGW, MingGW-w64/32.
25
26
  * Works on Linux, FreeBSD, OpenBSD, OS X, iOS and Windows. Also works on MSYS/MSYS2 and Cygwin.
26
27
  * Compiles for 32 and 64 bit.
28
+ * Compiles and works on big and little endian systems.
27
29
  * The only dependency is on `zlib`.
28
30
  DESC
29
31
 
@@ -36,7 +38,7 @@ Pod::Spec.new do |s|
36
38
  s.source_files = "src/**/*.c", "third_party/**/{zip.c,ioapi.c,tmpfileplus.c}", "include/**/*.h"
37
39
 
38
40
  s.header_dir = "xlsxwriter"
39
- s.header_mappings_dir = "include/xlsxwriter"
41
+ s.header_mappings_dir = "include"
40
42
  s.library = "z"
41
43
  s.compiler_flags = "-DNOCRYPT=1", "-DNOUNCRYPT=1"
42
44
  s.pod_target_xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '${PODS_ROOT}/libxlsxwriter/include' }
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # Makefile for libxlsxwriter library.
4
4
  #
5
- # Copyright 2014-2017, John McNamara, jmcnamara@cpan.org
5
+ # Copyright 2014-2018, John McNamara, jmcnamara@cpan.org
6
6
  #
7
7
 
8
8
  # Keep the output quiet by default.
@@ -15,8 +15,17 @@ endif
15
15
  OBJS_DIR = .
16
16
  INC_DIR = ../include
17
17
 
18
- # The minizip directory.
18
+ LIBS = -lz
19
+
20
+ ifdef USE_SYSTEM_MINIZIP
21
+ LIBS += -lminizip
22
+ CFLAGS += -DUSE_SYSTEM_MINIZIP
23
+ else
24
+ # Use the local copy of minizip.
19
25
  MINIZIP_DIR = ../third_party/minizip
26
+ MINIZIP_OBJ = $(MINIZIP_DIR)/ioapi.o $(MINIZIP_DIR)/zip.o
27
+ MINIZIP_SO = $(MINIZIP_DIR)/ioapi.so $(MINIZIP_DIR)/zip.so
28
+ endif
20
29
 
21
30
 
22
31
  ifdef USE_STANDARD_TMPFILE
@@ -29,9 +38,25 @@ TMPFILEPLUS_OBJ = $(TMPFILEPLUS_DIR)/tmpfileplus.o
29
38
  TMPFILEPLUS_SO = $(TMPFILEPLUS_DIR)/tmpfileplus.so
30
39
  endif
31
40
 
41
+ # Set flag for big endian architecture.
42
+ ifdef USE_BIG_ENDIAN
43
+ CFLAGS += -DLXW_BIG_ENDIAN
44
+ endif
45
+
46
+ # Use a user-defined double number formatting function.
47
+ ifdef USE_DOUBLE_FUNCTION
48
+ CFLAGS += -DUSE_DOUBLE_FUNCTION
49
+ endif
50
+
32
51
  # Flags passed to compiler.
33
52
  CFLAGS += -g -O3 -Wall -Wextra -pedantic -ansi
34
53
 
54
+ # Fix for modified zconf.h on Gentoo.
55
+ ifneq (,$(findstring gentoo, $(shell uname -sr)))
56
+ CFLAGS += -DOF=_Z_OF
57
+ endif
58
+
59
+
35
60
  # Ignore icc remarks about inlining limits.
36
61
  ifeq ($(CC),icc)
37
62
  CFLAGS +=-diag-disable=11074,11076
@@ -97,7 +122,7 @@ test_lib : libxlsxwriter_test.a
97
122
 
98
123
  # The static library.
99
124
  $(LIBXLSXWRITER_A) : $(OBJS)
100
- $(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_DIR)/ioapi.o $(MINIZIP_DIR)/zip.o $(TMPFILEPLUS_OBJ) $^
125
+ $(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_OBJ) $(TMPFILEPLUS_OBJ) $^
101
126
 
102
127
  # The dynamic library.
103
128
  ifeq ($(findstring m32,$(CFLAGS)),m32)
@@ -105,11 +130,11 @@ ARCH = -m32
105
130
  endif
106
131
 
107
132
  $(LIBXLSXWRITER_SO) : $(SOBJS)
108
- $(Q)$(CC) $(SOFLAGS) $(ARCH) -o $@ $(MINIZIP_DIR)/ioapi.so $(MINIZIP_DIR)/zip.so $(TMPFILEPLUS_SO) $^ -lz
133
+ $(Q)$(CC) $(SOFLAGS) $(ARCH) -o $@ $(MINIZIP_SO) $(TMPFILEPLUS_SO) $^ $(LIBS)
109
134
 
110
135
  # The test library.
111
136
  $(LIBXLSXWRITER_TO) : $(TOBJS)
112
- $(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_DIR)/ioapi.o $(MINIZIP_DIR)/zip.o $(TMPFILEPLUS_OBJ) $^
137
+ $(Q)$(AR) $(ARFLAGS) $@ $(MINIZIP_OBJ) $(TMPFILEPLUS_OBJ) $^
113
138
 
114
139
  # Minimal target for quick compile without creating the libs.
115
140
  test_compile : $(OBJS)
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Used in conjunction with the libxlsxwriter library.
5
5
  *
6
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
6
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
7
7
  *
8
8
  */
9
9
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Used in conjunction with the libxlsxwriter library.
5
5
  *
6
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
6
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
7
7
  *
8
8
  */
9
9
 
@@ -311,13 +311,21 @@ _chart_convert_font_args(lxw_chart_font *user_font)
311
311
  font = calloc(1, sizeof(struct lxw_chart_font));
312
312
  RETURN_ON_MEM_ERROR(font, NULL);
313
313
 
314
- memcpy(font, user_font, sizeof(lxw_chart_font));
315
-
314
+ /* Copy the user supplied properties. */
316
315
  font->name = lxw_strdup(user_font->name);
316
+ font->size = user_font->size;
317
+ font->bold = user_font->bold;
318
+ font->italic = user_font->italic;
319
+ font->underline = user_font->underline;
320
+ font->rotation = user_font->rotation;
321
+ font->color = user_font->color;
322
+ font->pitch_family = user_font->pitch_family;
323
+ font->charset = user_font->charset;
324
+ font->baseline = user_font->baseline;
317
325
 
318
326
  /* Convert font size units. */
319
- if (font->size)
320
- font->size = font->size * 100;
327
+ if (font->size > 0.0)
328
+ font->size = font->size * 100.0;
321
329
 
322
330
  /* Convert rotation into 60,000ths of a degree. */
323
331
  if (font->rotation)
@@ -345,7 +353,12 @@ _chart_convert_line_args(lxw_chart_line *user_line)
345
353
  line = calloc(1, sizeof(struct lxw_chart_line));
346
354
  RETURN_ON_MEM_ERROR(line, NULL);
347
355
 
348
- memcpy(line, user_line, sizeof(lxw_chart_line));
356
+ /* Copy the user supplied properties. */
357
+ line->color = user_line->color;
358
+ line->none = user_line->none;
359
+ line->width = user_line->width;
360
+ line->dash_type = user_line->dash_type;
361
+ line->transparency = user_line->transparency;
349
362
 
350
363
  if (line->color) {
351
364
  line->color = lxw_format_check_color(line->color);
@@ -372,7 +385,10 @@ _chart_convert_fill_args(lxw_chart_fill *user_fill)
372
385
  fill = calloc(1, sizeof(struct lxw_chart_fill));
373
386
  RETURN_ON_MEM_ERROR(fill, NULL);
374
387
 
375
- memcpy(fill, user_fill, sizeof(lxw_chart_fill));
388
+ /* Copy the user supplied properties. */
389
+ fill->color = user_fill->color;
390
+ fill->none = user_fill->none;
391
+ fill->transparency = user_fill->transparency;
376
392
 
377
393
  if (fill->color) {
378
394
  fill->color = lxw_format_check_color(fill->color);
@@ -409,7 +425,10 @@ _chart_convert_pattern_args(lxw_chart_pattern *user_pattern)
409
425
  pattern = calloc(1, sizeof(struct lxw_chart_pattern));
410
426
  RETURN_ON_MEM_ERROR(pattern, NULL);
411
427
 
412
- memcpy(pattern, user_pattern, sizeof(lxw_chart_pattern));
428
+ /* Copy the user supplied properties. */
429
+ pattern->fg_color = user_pattern->fg_color;
430
+ pattern->bg_color = user_pattern->bg_color;
431
+ pattern->type = user_pattern->type;
413
432
 
414
433
  pattern->fg_color = lxw_format_check_color(pattern->fg_color);
415
434
  pattern->has_fg_color = LXW_TRUE;
@@ -424,8 +443,6 @@ _chart_convert_pattern_args(lxw_chart_pattern *user_pattern)
424
443
  pattern->has_bg_color = LXW_TRUE;
425
444
  }
426
445
 
427
- pattern->type = user_pattern->type;
428
-
429
446
  return pattern;
430
447
  }
431
448
 
@@ -836,8 +853,8 @@ _chart_write_a_def_rpr(lxw_chart *self, lxw_chart_font *font)
836
853
  use_font_default = !(has_color || has_latin || font->baseline == -1);
837
854
 
838
855
  /* Set the font attributes. */
839
- if (font->size)
840
- LXW_PUSH_ATTRIBUTES_INT("sz", font->size);
856
+ if (font->size > 0.0)
857
+ LXW_PUSH_ATTRIBUTES_DBL("sz", font->size);
841
858
 
842
859
  if (use_font_default || font->bold)
843
860
  LXW_PUSH_ATTRIBUTES_INT("b", font->bold & 0x1);
@@ -908,8 +925,8 @@ _chart_write_a_r_pr(lxw_chart *self, lxw_chart_font *font)
908
925
  use_font_default = !(has_color || has_latin || font->baseline == -1);
909
926
 
910
927
  /* Set the font attributes. */
911
- if (font->size)
912
- LXW_PUSH_ATTRIBUTES_INT("sz", font->size);
928
+ if (font->size > 0.0)
929
+ LXW_PUSH_ATTRIBUTES_DBL("sz", font->size);
913
930
 
914
931
  if (use_font_default || font->bold)
915
932
  LXW_PUSH_ATTRIBUTES_INT("b", font->bold & 0x1);
@@ -1137,7 +1154,7 @@ _chart_write_v_num(lxw_chart *self, double number)
1137
1154
  {
1138
1155
  char data[LXW_ATTR_32];
1139
1156
 
1140
- lxw_snprintf(data, LXW_ATTR_32, "%.16g", number);
1157
+ lxw_sprintf_dbl(data, number);
1141
1158
 
1142
1159
  lxw_xml_data_element(self->file, "c:v", data, NULL);
1143
1160
  }
@@ -4565,6 +4582,10 @@ _chart_write_pie_plot_area(lxw_chart *self)
4565
4582
  /* Write subclass chart type elements for primary and secondary axes. */
4566
4583
  self->write_chart_type(self);
4567
4584
 
4585
+ /* Write the c:spPr element for the plotarea formatting. */
4586
+ _chart_write_sp_pr(self, self->plotarea_line, self->plotarea_fill,
4587
+ self->plotarea_pattern);
4588
+
4568
4589
  lxw_xml_end_tag(self->file, "c:plotArea");
4569
4590
  }
4570
4591
 
@@ -5384,7 +5405,8 @@ chart_series_set_labels_percentage(lxw_chart_series *series)
5384
5405
  * Set an data labels number format.
5385
5406
  */
5386
5407
  void
5387
- chart_series_set_labels_num_format(lxw_chart_series *series, char *num_format)
5408
+ chart_series_set_labels_num_format(lxw_chart_series *series,
5409
+ const char *num_format)
5388
5410
  {
5389
5411
  if (!num_format)
5390
5412
  return;
@@ -5531,7 +5553,7 @@ chart_series_set_trendline_intercept(lxw_chart_series *series,
5531
5553
  * Set a line type for a series trendline.
5532
5554
  */
5533
5555
  void
5534
- chart_series_set_trendline_name(lxw_chart_series *series, char *name)
5556
+ chart_series_set_trendline_name(lxw_chart_series *series, const char *name)
5535
5557
  {
5536
5558
  if (!name)
5537
5559
  return;
@@ -5558,6 +5580,24 @@ chart_series_set_trendline_line(lxw_chart_series *series,
5558
5580
  series->trendline_line = _chart_convert_line_args(line);
5559
5581
  }
5560
5582
 
5583
+ /*
5584
+ * Set the X or Y error bars from a chart series.
5585
+ */
5586
+ lxw_series_error_bars *
5587
+ chart_series_get_error_bars(lxw_chart_series *series,
5588
+ lxw_chart_error_bar_axis axis_type)
5589
+ {
5590
+ if (!series)
5591
+ return NULL;
5592
+
5593
+ if (axis_type == LXW_CHART_ERROR_BAR_AXIS_X)
5594
+ return series->x_error_bars;
5595
+ else if (axis_type == LXW_CHART_ERROR_BAR_AXIS_Y)
5596
+ return series->y_error_bars;
5597
+ else
5598
+ return NULL;
5599
+ }
5600
+
5561
5601
  /*
5562
5602
  * Set the error bars and type for a chart series.
5563
5603
  */
@@ -5622,6 +5662,23 @@ chart_series_set_error_bars_line(lxw_series_error_bars *error_bars,
5622
5662
  error_bars->line = _chart_convert_line_args(line);
5623
5663
  }
5624
5664
 
5665
+ /*
5666
+ * Get an axis pointer from a chart.
5667
+ */
5668
+ lxw_chart_axis *
5669
+ chart_axis_get(lxw_chart *self, lxw_chart_axis_type axis_type)
5670
+ {
5671
+ if (!self)
5672
+ return NULL;
5673
+
5674
+ if (axis_type == LXW_CHART_AXIS_TYPE_X)
5675
+ return self->x_axis;
5676
+ else if (axis_type == LXW_CHART_AXIS_TYPE_Y)
5677
+ return self->y_axis;
5678
+ else
5679
+ return NULL;
5680
+ }
5681
+
5625
5682
  /*
5626
5683
  * Set an axis caption.
5627
5684
  */
@@ -5638,7 +5695,7 @@ chart_axis_set_name(lxw_chart_axis *axis, const char *name)
5638
5695
  }
5639
5696
 
5640
5697
  /*
5641
- * Set an axis caption, with a range instead or a formula..
5698
+ * Set an axis caption, with a range instead or a formula.
5642
5699
  */
5643
5700
  void
5644
5701
  chart_axis_set_name_range(lxw_chart_axis *axis, const char *sheetname,
@@ -5687,7 +5744,7 @@ chart_axis_set_num_font(lxw_chart_axis *axis, lxw_chart_font *font)
5687
5744
  * Set an axis number format.
5688
5745
  */
5689
5746
  void
5690
- chart_axis_set_num_format(lxw_chart_axis *axis, char *num_format)
5747
+ chart_axis_set_num_format(lxw_chart_axis *axis, const char *num_format)
5691
5748
  {
5692
5749
  if (!num_format)
5693
5750
  return;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Used in conjunction with the libxlsxwriter library.
5
5
  *
6
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
6
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
7
7
  *
8
8
  */
9
9
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Used in conjunction with the libxlsxwriter library.
5
5
  *
6
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
6
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
7
7
  *
8
8
  */
9
9
 
@@ -53,17 +53,17 @@ lxw_core_free(lxw_core *core)
53
53
  * Convert a time_t struct to a ISO 8601 style "2010-01-01T00:00:00Z" date.
54
54
  */
55
55
  static void
56
- _localtime_to_iso8601_date(time_t *timer, char *str, size_t size)
56
+ _datetime_to_iso8601_date(time_t *timer, char *str, size_t size)
57
57
  {
58
- struct tm *tmp_localtime;
58
+ struct tm *tmp_datetime;
59
59
  time_t current_time = time(NULL);
60
60
 
61
61
  if (*timer)
62
- tmp_localtime = localtime(timer);
62
+ tmp_datetime = gmtime(timer);
63
63
  else
64
- tmp_localtime = localtime(&current_time);
64
+ tmp_datetime = gmtime(&current_time);
65
65
 
66
- strftime(str, size - 1, "%Y-%m-%dT%H:%M:%SZ", tmp_localtime);
66
+ strftime(str, size - 1, "%Y-%m-%dT%H:%M:%SZ", tmp_datetime);
67
67
  }
68
68
 
69
69
  /*****************************************************************************
@@ -144,8 +144,8 @@ _write_dcterms_created(lxw_core *self)
144
144
  struct xml_attribute *attribute;
145
145
  char datetime[LXW_ATTR_32];
146
146
 
147
- _localtime_to_iso8601_date(&self->properties->created, datetime,
148
- LXW_ATTR_32);
147
+ _datetime_to_iso8601_date(&self->properties->created, datetime,
148
+ LXW_ATTR_32);
149
149
 
150
150
  LXW_INIT_ATTRIBUTES();
151
151
  LXW_PUSH_ATTRIBUTES_STR("xsi:type", "dcterms:W3CDTF");
@@ -166,8 +166,8 @@ _write_dcterms_modified(lxw_core *self)
166
166
  struct xml_attribute *attribute;
167
167
  char datetime[LXW_ATTR_32];
168
168
 
169
- _localtime_to_iso8601_date(&self->properties->created, datetime,
170
- LXW_ATTR_32);
169
+ _datetime_to_iso8601_date(&self->properties->created, datetime,
170
+ LXW_ATTR_32);
171
171
 
172
172
  LXW_INIT_ATTRIBUTES();
173
173
  LXW_PUSH_ATTRIBUTES_STR("xsi:type", "dcterms:W3CDTF");
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Used in conjunction with the libxlsxwriter library.
5
5
  *
6
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
6
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
7
7
  *
8
8
  */
9
9
 
@@ -81,7 +81,7 @@ _chart_write_vt_r_8(lxw_custom *self, double value)
81
81
  {
82
82
  char data[LXW_ATTR_32];
83
83
 
84
- lxw_snprintf(data, LXW_ATTR_32, "%.16g", value);
84
+ lxw_sprintf_dbl(data, value);
85
85
 
86
86
  lxw_xml_data_element(self->file, "vt:r8", data, NULL);
87
87
  }
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Used in conjunction with the libxlsxwriter library.
5
5
  *
6
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
6
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
7
7
  *
8
8
  */
9
9
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Used in conjunction with the libxlsxwriter library.
5
5
  *
6
- * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
6
+ * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
7
7
  *
8
8
  */
9
9
 
@@ -38,7 +38,7 @@ lxw_format_new()
38
38
  format->font_index = 0;
39
39
  format->has_font = LXW_FALSE;
40
40
  format->has_dxf_font = LXW_FALSE;
41
- format->font_size = 11;
41
+ format->font_size = 11.0;
42
42
  format->bold = LXW_FALSE;
43
43
  format->italic = LXW_FALSE;
44
44
  format->font_color = LXW_COLOR_UNSET;
@@ -309,7 +309,7 @@ format_set_font_name(lxw_format *self, const char *font_name)
309
309
  * Set the font_size property.
310
310
  */
311
311
  void
312
- format_set_font_size(lxw_format *self, uint16_t size)
312
+ format_set_font_size(lxw_format *self, double size)
313
313
  {
314
314
 
315
315
  if (size >= LXW_MIN_FONT_SIZE && size <= LXW_MAX_FONT_SIZE)