write_xlsx 1.08.1 → 1.09.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +10 -0
  3. data/Changes +17 -0
  4. data/README.md +1 -1
  5. data/examples/background.rb +19 -0
  6. data/examples/ignore_errors.rb +39 -0
  7. data/examples/keep_leading_zeros.rb +17 -0
  8. data/lib/write_xlsx/chart/axis.rb +3 -3
  9. data/lib/write_xlsx/chart/scatter.rb +0 -15
  10. data/lib/write_xlsx/chart/series.rb +1 -1
  11. data/lib/write_xlsx/chart.rb +28 -28
  12. data/lib/write_xlsx/chartsheet.rb +3 -3
  13. data/lib/write_xlsx/drawing.rb +39 -39
  14. data/lib/write_xlsx/format.rb +11 -179
  15. data/lib/write_xlsx/package/app.rb +2 -2
  16. data/lib/write_xlsx/package/button.rb +8 -8
  17. data/lib/write_xlsx/package/comments.rb +8 -8
  18. data/lib/write_xlsx/package/content_types.rb +18 -9
  19. data/lib/write_xlsx/package/core.rb +5 -5
  20. data/lib/write_xlsx/package/custom.rb +2 -2
  21. data/lib/write_xlsx/package/metadata.rb +159 -0
  22. data/lib/write_xlsx/package/packager.rb +21 -0
  23. data/lib/write_xlsx/package/shared_strings.rb +6 -6
  24. data/lib/write_xlsx/package/styles.rb +11 -11
  25. data/lib/write_xlsx/package/table.rb +23 -23
  26. data/lib/write_xlsx/package/theme.rb +1 -1
  27. data/lib/write_xlsx/package/vml.rb +43 -43
  28. data/lib/write_xlsx/shape.rb +17 -15
  29. data/lib/write_xlsx/sparkline.rb +340 -340
  30. data/lib/write_xlsx/utility.rb +4 -23
  31. data/lib/write_xlsx/version.rb +1 -1
  32. data/lib/write_xlsx/workbook.rb +171 -644
  33. data/lib/write_xlsx/worksheet/cell_data.rb +25 -3
  34. data/lib/write_xlsx/worksheet/data_validation.rb +20 -20
  35. data/lib/write_xlsx/worksheet/hyperlink.rb +4 -4
  36. data/lib/write_xlsx/worksheet/page_setup.rb +12 -12
  37. data/lib/write_xlsx/worksheet.rb +267 -4144
  38. data/test/perl_output/background.xlsx +0 -0
  39. data/test/perl_output/ignore_errors.xlsx +0 -0
  40. data/test/perl_output/keep_leading_zeros.xlsx +0 -0
  41. data/test/perl_output/multi_line.xlsx +0 -0
  42. data/test/regression/images/logo.gif +0 -0
  43. data/test/regression/images/logo.jpg +0 -0
  44. data/test/regression/images/red.gif +0 -0
  45. data/test/regression/test_background01.rb +23 -0
  46. data/test/regression/test_background02.rb +23 -0
  47. data/test/regression/test_background03.rb +24 -0
  48. data/test/regression/test_background04.rb +25 -0
  49. data/test/regression/test_background05.rb +25 -0
  50. data/test/regression/test_background06.rb +31 -0
  51. data/test/regression/test_background07.rb +37 -0
  52. data/test/regression/test_chart_axis47.rb +52 -0
  53. data/test/regression/test_chart_axis48.rb +53 -0
  54. data/test/regression/test_dynamic_array01.rb +25 -0
  55. data/test/regression/test_image56.rb +23 -0
  56. data/test/regression/test_image57.rb +23 -0
  57. data/test/regression/test_set_column10.rb +55 -0
  58. data/test/regression/test_set_column11.rb +48 -0
  59. data/test/regression/test_set_row01.rb +35 -0
  60. data/test/regression/test_set_row02.rb +35 -0
  61. data/test/regression/test_set_row03.rb +35 -0
  62. data/test/regression/test_set_row04.rb +35 -0
  63. data/test/regression/xlsx_files/background01.xlsx +0 -0
  64. data/test/regression/xlsx_files/background02.xlsx +0 -0
  65. data/test/regression/xlsx_files/background03.xlsx +0 -0
  66. data/test/regression/xlsx_files/background04.xlsx +0 -0
  67. data/test/regression/xlsx_files/background05.xlsx +0 -0
  68. data/test/regression/xlsx_files/background06.xlsx +0 -0
  69. data/test/regression/xlsx_files/background07.xlsx +0 -0
  70. data/test/regression/xlsx_files/chart_axis47.xlsx +0 -0
  71. data/test/regression/xlsx_files/chart_axis48.xlsx +0 -0
  72. data/test/regression/xlsx_files/dynamic_array01.xlsx +0 -0
  73. data/test/regression/xlsx_files/image56.xlsx +0 -0
  74. data/test/regression/xlsx_files/image57.xlsx +0 -0
  75. data/test/regression/xlsx_files/set_row01.xlsx +0 -0
  76. data/test/regression/xlsx_files/set_row03.xlsx +0 -0
  77. data/test/test_example_match.rb +73 -0
  78. data/test/worksheet/test_pixels_to_row_col.rb +46 -0
  79. metadata +86 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ab3f33d51239105a5d5c8e0765ada850496c199a370e713353c56d0e0764e4b
4
- data.tar.gz: 4b379953050d7a9a5c4151742825c7672c66e60b7c37146531f8d0075d32b634
3
+ metadata.gz: c78b5986850521951ec007fd9a9e79f66ba5dc44e04a29f806e8d013733c8f30
4
+ data.tar.gz: 329091c1ce7407bb69f9436a0eb232ea3b9fb88775084358d8f8c53af2e9ce36
5
5
  SHA512:
6
- metadata.gz: 128e52ae31ef667b30e8c6649c1747abf75750e48bd1a7a9a95cedd69ab3699f55755c9ef2686da4252642c662ed871b41ebb90cabe6d23e56f319b958db89b9
7
- data.tar.gz: 31b68e29186266b216aaf8dc2035619292999146e79a9388c1d46dcbdd4704d17688586733dc8bb2b6284865340a68d62c7de6cd738a1ed9f6e68c83f388e94e
6
+ metadata.gz: b3897acdb3794718c0149862132773db326bc3d62397affc6623dfa49404462ef9cec421174c232d252acdc3f28804b46671307b48768720f0aa3f05d6b6458d
7
+ data.tar.gz: 77124e32563e0f17f7e322d3196537cd347926427682fb184732d270077537f1eb81de30425e059a126cbe413aadbc0615f79347d058ed53cc209c0a995c9b8f
data/.travis.yml CHANGED
@@ -1,9 +1,18 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 3.0.3
4
+ - 3.0.2
5
+ - 3.0.1
3
6
  - 3.0.0
7
+ - 2.7.5
8
+ - 2.7.4
9
+ - 2.7.3
4
10
  - 2.7.2
5
11
  - 2.7.1
6
12
  - 2.7.0
13
+ - 2.6.9
14
+ - 2.6.8
15
+ - 2.6.7
7
16
  - 2.6.6
8
17
  - 2.6.5
9
18
  - 2.6.4
@@ -11,6 +20,7 @@ rvm:
11
20
  - 2.6.2
12
21
  - 2.6.1
13
22
  - 2.6.0
23
+ - 2.5.9
14
24
  - 2.5.8
15
25
  - 2.5.7
16
26
  - 2.5.6
data/Changes CHANGED
@@ -1,5 +1,22 @@
1
1
  Change history of write_xlsx rubygem.
2
2
 
3
+ 2022-02-14 v1.09.2
4
+ Fixed issue #79. Worksheet#write calls the write_number
5
+ when multi-line string has a line with only numbers.
6
+
7
+ 2021-11-27 v1.09.1
8
+ Added Worksheet#keep_leading_zeros method to handle '001' as string in
9
+ Worksheet#write, write_row, and write_col method.
10
+
11
+ 2021-11-26 v1.09.0
12
+
13
+ Added support for background images in worksheets. See set_background().
14
+
15
+ Added support for GIF image files (and in Excel 365, animated GIF files).
16
+
17
+ Added support for pixel sizing in set_row() and set_column() via new
18
+ functions called set_row_pixels() and set_column_pixels().
19
+
3
20
  2021-11-19 v1.08.0
4
21
 
5
22
  Added ability to add accessibility options "description" and
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  gem to create a new file in the Excel 2007+ XLSX format, and you can use the
7
7
  same interface as writeexcel gem. write_xlsx is converted from Perl's module
8
- [Excel::Writer::XLSX-1.08](https://github.com/jmcnamara/excel-writer-xlsx/tree/CPAN_1.08)
8
+ [Excel::Writer::XLSX-1.09](https://github.com/jmcnamara/excel-writer-xlsx/tree/CPAN_1.09)
9
9
 
10
10
  ## Description
11
11
 
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
3
+
4
+ #######################################################################
5
+ #
6
+ # An example of setting a worksheet background image with Excel::Writer::XLSX.
7
+ #
8
+ # Copyright 2000-2021, John McNamara, jmcnamara@cpan.org
9
+ # convert to ruby by Hideo NAKAMURA, nakamura.hideo@gmail.com
10
+ #
11
+
12
+ require 'write_xlsx'
13
+
14
+ workbook = WriteXLSX.new('background.xlsx')
15
+ worksheet = workbook.add_worksheet
16
+
17
+ worksheet.set_background('republic.png')
18
+
19
+ workbook.close
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
3
+
4
+ ##############################################################################
5
+ #
6
+ # An example of turning off worksheet cells errors/warnings using the
7
+ # Excel::Writer::XLSX module.
8
+ #
9
+ # Copyright 2000-2021, John McNamara, jmcnamara@cpan.org
10
+ # convert to ruby by Hideo NAKAMURA, nakamura.hideo@gmail.com
11
+ #
12
+
13
+ require 'write_xlsx'
14
+
15
+ workbook = WriteXLSX.new('ignore_errors.xlsx')
16
+ worksheet = workbook.add_worksheet
17
+
18
+ # Write strings that looks like numbers. This will cause an Excel warning.
19
+ worksheet.write_string('C2', '123')
20
+ worksheet.write_string('C3', '123')
21
+
22
+ # Write a divide by zero formula. This will also cause an Excel warning.
23
+ worksheet.write_formula('C5', '=1/0')
24
+ worksheet.write_formula('C6', '=1/0')
25
+
26
+ # Turn off some of the warnings:
27
+ worksheet.ignore_errors(
28
+ :number_stored_as_text => 'C3',
29
+ :eval_error => 'C6'
30
+ )
31
+
32
+ # Write some descriptions for the cells and make the column wider for clarity.
33
+ worksheet.set_column('B:B', 16)
34
+ worksheet.write('B2', 'Warning:')
35
+ worksheet.write('B3', 'Warning turned off:')
36
+ worksheet.write('B5', 'Warning:')
37
+ worksheet.write('B6', 'Warning turned off:')
38
+
39
+ workbook.close
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
3
+
4
+ require 'write_xlsx'
5
+
6
+ workbook = WriteXLSX.new('keep_leading_zeros.xlsx')
7
+ worksheet = workbook.add_worksheet
8
+
9
+ worksheet.keep_leading_zeros(true)
10
+ worksheet.write('A1', '001')
11
+ worksheet.write('B1', 'written as string.')
12
+ worksheet.write('A2', '012')
13
+ worksheet.write('B2', 'written as string.')
14
+ worksheet.write('A3', '123')
15
+ worksheet.write('B3', 'written as number.')
16
+
17
+ workbook.close
@@ -87,8 +87,8 @@ module Writexlsx
87
87
 
88
88
  def num_fmt_attributes
89
89
  [
90
- ['formatCode', @num_format],
91
- ['sourceLinked', source_linked]
90
+ ['formatCode', @num_format],
91
+ ['sourceLinked', source_linked]
92
92
  ]
93
93
  end
94
94
 
@@ -175,7 +175,7 @@ module Writexlsx
175
175
  if @position_axis == 'on_tick'
176
176
  @position_axis = 'midCat'
177
177
  elsif @position_axis == 'between'
178
- # Doesn't neet to be modified.
178
+ # Doesn't neet to be modified.
179
179
  else
180
180
  # Otherwise use the default value.
181
181
  @position_axis = nil
@@ -17,21 +17,6 @@ require 'write_xlsx/utility'
17
17
 
18
18
  module Writexlsx
19
19
  class Chart
20
- # The Scatter chart module also supports the following sub-types:
21
- #
22
- # markers_only (the default)
23
- # straight_with_markers
24
- # straight
25
- # smooth_with_markers
26
- # smooth
27
- # These can be specified at creation time via the add_chart() Worksheet
28
- # method:
29
- #
30
- # chart = workbook.add_chart(
31
- # :type => 'scatter',
32
- # :subtype => 'straight_with_markers'
33
- # )
34
- #
35
20
  class Scatter < self
36
21
  include Writexlsx::Utility
37
22
  include Writexlsx::WriteDPtPoint
@@ -192,7 +192,7 @@ module Writexlsx
192
192
  @values = aref_to_formula(params[:values])
193
193
  @categories = aref_to_formula(params[:categories])
194
194
  @name, @name_formula =
195
- chart.process_names(params[:name], params[:name_formula])
195
+ chart.process_names(params[:name], params[:name_formula])
196
196
 
197
197
  set_data_ids(params)
198
198
 
@@ -165,16 +165,16 @@ module Writexlsx
165
165
  include Writexlsx::Utility
166
166
  include Writexlsx::Gradient
167
167
 
168
- attr_accessor :id, :name # :nodoc:
169
- attr_writer :index, :palette, :protection # :nodoc:
170
- attr_reader :embedded, :formula_ids, :formula_data # :nodoc:
171
- attr_reader :x_scale, :y_scale, :x_offset, :y_offset # :nodoc:
172
- attr_reader :width, :height # :nodoc:
168
+ attr_accessor :id, :name # :nodoc:
169
+ attr_writer :index, :palette, :protection # :nodoc:
170
+ attr_reader :embedded, :formula_ids, :formula_data # :nodoc:
171
+ attr_reader :x_scale, :y_scale, :x_offset, :y_offset # :nodoc:
172
+ attr_reader :width, :height # :nodoc:
173
173
  attr_reader :label_positions, :label_position_default, :combined # :nodoc:
174
- attr_writer :date_category, :already_inserted
175
- attr_writer :series_index
176
- attr_writer :writer
177
- attr_reader :x2_axis, :y2_axis, :axis2_ids
174
+ attr_writer :date_category, :already_inserted # :nodoc:
175
+ attr_writer :series_index # :nodoc:
176
+ attr_writer :writer # :nodoc:
177
+ attr_reader :x2_axis, :y2_axis, :axis2_ids # :nodoc:
178
178
 
179
179
  #
180
180
  # Factory method for returning chart objects based on their class type.
@@ -1057,7 +1057,7 @@ module Writexlsx
1057
1057
  end
1058
1058
 
1059
1059
  def write_val_base(formula, data_id, tag) # :nodoc:
1060
- data = @formula_data[data_id]
1060
+ data = @formula_data[data_id]
1061
1061
 
1062
1062
  @writer.tag_elements(tag) do
1063
1063
  # Unlike Cat axes data should only be numeric.
@@ -1408,11 +1408,11 @@ module Writexlsx
1408
1408
 
1409
1409
  def write_scaling_with_param(param)
1410
1410
  write_scaling(
1411
- param.reverse,
1412
- param.min,
1413
- param.max,
1414
- param.log_base
1415
- )
1411
+ param.reverse,
1412
+ param.min,
1413
+ param.max,
1414
+ param.log_base
1415
+ )
1416
1416
  end
1417
1417
  #
1418
1418
  # Write the <c:scaling> element.
@@ -1443,7 +1443,7 @@ module Writexlsx
1443
1443
  # Write the <c:orientation> element.
1444
1444
  #
1445
1445
  def write_orientation(reverse = nil) # :nodoc:
1446
- val = ptrue?(reverse) ? 'maxMin' : 'minMax'
1446
+ val = ptrue?(reverse) ? 'maxMin' : 'minMax'
1447
1447
 
1448
1448
  @writer.empty_tag('c:orientation', [ ['val', val] ])
1449
1449
  end
@@ -1499,9 +1499,9 @@ module Writexlsx
1499
1499
  source_linked = 0
1500
1500
 
1501
1501
  attributes = [
1502
- ['formatCode', format_code],
1503
- ['sourceLinked', source_linked]
1504
- ]
1502
+ ['formatCode', format_code],
1503
+ ['sourceLinked', source_linked]
1504
+ ]
1505
1505
 
1506
1506
  @writer.empty_tag('c:numFmt', attributes)
1507
1507
  end
@@ -1778,13 +1778,13 @@ module Writexlsx
1778
1778
  footer = 0.3
1779
1779
 
1780
1780
  attributes = [
1781
- ['b', b],
1782
- ['l', l],
1783
- ['r', r],
1784
- ['t', t],
1785
- ['header', header],
1786
- ['footer', footer]
1787
- ]
1781
+ ['b', b],
1782
+ ['l', l],
1783
+ ['r', r],
1784
+ ['t', t],
1785
+ ['header', header],
1786
+ ['footer', footer]
1787
+ ]
1788
1788
 
1789
1789
  @writer.empty_tag('c:pageMargins', attributes)
1790
1790
  end
@@ -2272,7 +2272,7 @@ module Writexlsx
2272
2272
  data.each_with_index do |token, i|
2273
2273
  # Write non-numeric data as 0.
2274
2274
  if token &&
2275
- !(token.to_s =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/)
2275
+ !(token.to_s =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/)
2276
2276
  token = 0
2277
2277
  end
2278
2278
 
@@ -2703,7 +2703,7 @@ module Writexlsx
2703
2703
  end
2704
2704
 
2705
2705
  def write_num_ref_or_lit(values, data)
2706
- if values.to_s =~ /^=/ # '=Sheet1!$A$1:$A$5'
2706
+ if values.to_s =~ /^=/ # '=Sheet1!$A$1:$A$5'
2707
2707
  write_num_ref(values, data, 'num')
2708
2708
  else # [1, 2, 3]
2709
2709
  write_num_lit(values)
@@ -204,9 +204,9 @@ module Writexlsx
204
204
  mc_preserve_attributes = 'mv:*'
205
205
 
206
206
  attributes = [
207
- ['xmlns', xmlns],
208
- ['xmlns:r', xmlns_r]
209
- ]
207
+ ['xmlns', xmlns],
208
+ ['xmlns:r', xmlns_r]
209
+ ]
210
210
 
211
211
  @writer.tag_elements('chartsheet', attributes) do
212
212
  yield
@@ -9,7 +9,7 @@ module Writexlsx
9
9
 
10
10
  def initialize(type, dimensions, width, height, description, shape, anchor, rel_index = nil, url_rel_index = nil, tip = nil, decorative = nil)
11
11
  @type, @dimensions, @width, @height, @description, @shape, @anchor, @rel_index, @url_rel_index, @tip, @decorative =
12
- type, dimensions, width, height, description, shape, anchor, rel_index, url_rel_index, tip, decorative
12
+ type, dimensions, width, height, description, shape, anchor, rel_index, url_rel_index, tip, decorative
13
13
  end
14
14
  end
15
15
 
@@ -70,8 +70,8 @@ module Writexlsx
70
70
  def write_drawing_workspace
71
71
  schema = 'http://schemas.openxmlformats.org/drawingml/'
72
72
  attributes = [
73
- ['xmlns:xdr', "#{schema}2006/spreadsheetDrawing"],
74
- ['xmlns:a', "#{schema}2006/main"]
73
+ ['xmlns:xdr', "#{schema}2006/spreadsheetDrawing"],
74
+ ['xmlns:a', "#{schema}2006/main"]
75
75
  ]
76
76
 
77
77
  @writer.tag_elements('xdr:wsDr', attributes) { yield }
@@ -166,7 +166,7 @@ module Writexlsx
166
166
  end
167
167
  end
168
168
 
169
- #
169
+ #
170
170
  # Write the <xdr:from> element.
171
171
  #
172
172
  def write_from(col, row, col_offset, row_offset)
@@ -487,9 +487,9 @@ module Writexlsx
487
487
 
488
488
 
489
489
  attributes = [
490
- ['xmlns:c', xmlns_c],
491
- ['xmlns:r', xmlns_r]
492
- ]
490
+ ['xmlns:c', xmlns_c],
491
+ ['xmlns:r', xmlns_r]
492
+ ]
493
493
  attributes << r_id_attributes(id)
494
494
 
495
495
  @writer.empty_tag('c:chart', attributes)
@@ -519,9 +519,9 @@ module Writexlsx
519
519
  else
520
520
  # Add attribute for shapes.
521
521
  attributes = [
522
- [:macro, ''],
523
- [:textlink, '']
524
- ]
522
+ [:macro, ''],
523
+ [:textlink, '']
524
+ ]
525
525
  @writer.tag_elements('xdr:sp', attributes) do
526
526
 
527
527
  # Write the xdr:nvSpPr element.
@@ -554,17 +554,17 @@ module Writexlsx
554
554
 
555
555
  if shape.start
556
556
  attributes = [
557
- ['id', shape.start],
558
- ['idx', shape.start_index]
559
- ]
557
+ ['id', shape.start],
558
+ ['idx', shape.start_index]
559
+ ]
560
560
  @writer.empty_tag('a:stCxn', attributes)
561
561
  end
562
562
 
563
563
  if shape.end
564
564
  attributes = [
565
- ['id', shape.end],
566
- ['idx', shape.end_index]
567
- ]
565
+ ['id', shape.end],
566
+ ['idx', shape.end_index]
567
+ ]
568
568
  @writer.empty_tag('a:endCxn', attributes)
569
569
  end
570
570
  end
@@ -808,9 +808,9 @@ module Writexlsx
808
808
  adj_int = (adj * 1000).to_i
809
809
 
810
810
  attributes = [
811
- [:name, "adj#{suffix}"],
812
- [:fmla, "val #{adj_int}"]
813
- ]
811
+ [:name, "adj#{suffix}"],
812
+ [:fmla, "val #{adj_int}"]
813
+ ]
814
814
  @writer.empty_tag('a:gd', attributes)
815
815
  end
816
816
  end
@@ -867,15 +867,15 @@ module Writexlsx
867
867
  #
868
868
  def write_tx_body(shape)
869
869
  attributes = [
870
- [:vertOverflow, "clip"],
871
- [:wrap, "square"],
872
- [:lIns, "27432"],
873
- [:tIns, "22860"],
874
- [:rIns, "27432"],
875
- [:bIns, "22860"],
876
- [:anchor, shape.valign],
877
- [:upright, "1"]
878
- ]
870
+ [:vertOverflow, "clip"],
871
+ [:wrap, "square"],
872
+ [:lIns, "27432"],
873
+ [:tIns, "22860"],
874
+ [:rIns, "27432"],
875
+ [:bIns, "22860"],
876
+ [:anchor, shape.valign],
877
+ [:upright, "1"]
878
+ ]
879
879
  @writer.tag_elements('xdr:txBody') do
880
880
  @writer.empty_tag('a:bodyPr', attributes)
881
881
  @writer.empty_tag('a:lstStyle')
@@ -885,9 +885,9 @@ module Writexlsx
885
885
  rotation *= 60000
886
886
 
887
887
  attributes = [
888
- [:algn, shape.align],
889
- [:rtl, rotation]
890
- ]
888
+ [:algn, shape.align],
889
+ [:rtl, rotation]
890
+ ]
891
891
  @writer.tag_elements('a:pPr', attributes) do
892
892
  attributes = [ [:sz, "1000"] ]
893
893
  @writer.empty_tag('a:defRPr', attributes)
@@ -903,14 +903,14 @@ module Writexlsx
903
903
  strike = ptrue?(shape.format[:font_strikeout]) ? 'Strike' : 'noStrike'
904
904
 
905
905
  attributes = [
906
- [:lang, "en-US"],
907
- [:sz, size],
908
- [:b, bold],
909
- [:i, italic],
910
- [:u, underline],
911
- [:strike, strike],
912
- [:baseline, 0]
913
- ]
906
+ [:lang, "en-US"],
907
+ [:sz, size],
908
+ [:b, bold],
909
+ [:i, italic],
910
+ [:u, underline],
911
+ [:strike, strike],
912
+ [:baseline, 0]
913
+ ]
914
914
  @writer.tag_elements('a:rPr', attributes) do
915
915
  color = shape.format[:color]
916
916
  if color