writeexcel 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. data/.document +0 -0
  2. data/.gitattributes +0 -0
  3. data/README.rdoc +9 -35
  4. data/Rakefile +0 -0
  5. data/VERSION +1 -1
  6. data/charts/chartex.rb +0 -0
  7. data/charts/demo1.rb +0 -0
  8. data/charts/demo101.bin +0 -0
  9. data/charts/demo2.rb +0 -0
  10. data/charts/demo201.bin +0 -0
  11. data/charts/demo3.rb +0 -0
  12. data/charts/demo301.bin +0 -0
  13. data/charts/demo4.rb +0 -0
  14. data/charts/demo401.bin +0 -0
  15. data/charts/demo5.rb +0 -0
  16. data/charts/demo501.bin +0 -0
  17. data/examples/a_simple.rb +0 -0
  18. data/examples/autofilter.rb +0 -0
  19. data/examples/bigfile.rb +0 -0
  20. data/examples/chart_area.rb +0 -0
  21. data/examples/chart_bar.rb +0 -0
  22. data/examples/chart_column.rb +0 -0
  23. data/examples/chart_line.rb +0 -0
  24. data/examples/chart_pie.rb +0 -0
  25. data/examples/chart_scatter.rb +0 -0
  26. data/examples/chart_stock.rb +0 -0
  27. data/examples/chess.rb +0 -0
  28. data/examples/colors.rb +0 -0
  29. data/examples/comments1.rb +0 -0
  30. data/examples/comments2.rb +0 -0
  31. data/examples/copyformat.rb +0 -0
  32. data/examples/data_validate.rb +0 -0
  33. data/examples/date_time.rb +0 -0
  34. data/examples/defined_name.rb +0 -0
  35. data/examples/demo.rb +0 -0
  36. data/examples/diag_border.rb +0 -0
  37. data/examples/formats.rb +0 -0
  38. data/examples/formula_result.rb +0 -0
  39. data/examples/header.rb +0 -0
  40. data/examples/hide_sheet.rb +0 -0
  41. data/examples/hyperlink.rb +0 -0
  42. data/examples/images.rb +0 -0
  43. data/examples/indent.rb +0 -0
  44. data/examples/merge1.rb +0 -0
  45. data/examples/merge2.rb +0 -0
  46. data/examples/merge3.rb +0 -0
  47. data/examples/merge4.rb +0 -0
  48. data/examples/merge5.rb +0 -0
  49. data/examples/merge6.rb +0 -0
  50. data/examples/outline.rb +0 -0
  51. data/examples/outline_collapsed.rb +0 -0
  52. data/examples/panes.rb +0 -0
  53. data/examples/properties.rb +0 -0
  54. data/examples/properties_jp.rb +0 -0
  55. data/examples/protection.rb +0 -0
  56. data/examples/regions.rb +0 -0
  57. data/examples/repeat.rb +0 -0
  58. data/examples/republic.png +0 -0
  59. data/examples/right_to_left.rb +0 -0
  60. data/examples/row_wrap.rb +0 -0
  61. data/examples/set_first_sheet.rb +14 -0
  62. data/examples/stats.rb +0 -0
  63. data/examples/stocks.rb +0 -0
  64. data/examples/tab_colors.rb +0 -0
  65. data/examples/utf8.rb +0 -0
  66. data/examples/write_arrays.rb +0 -0
  67. data/html/en/doc_en.html +5941 -0
  68. data/html/images/a_simple.jpg +0 -0
  69. data/html/images/area1.jpg +0 -0
  70. data/html/images/bar1.jpg +0 -0
  71. data/html/images/chart_area.xls +0 -0
  72. data/html/images/column1.jpg +0 -0
  73. data/html/images/data_validation.jpg +0 -0
  74. data/html/images/line1.jpg +0 -0
  75. data/html/images/pie1.jpg +0 -0
  76. data/html/images/regions.jpg +0 -0
  77. data/html/images/scatter1.jpg +0 -0
  78. data/html/images/stats.jpg +0 -0
  79. data/html/images/stock1.jpg +0 -0
  80. data/html/images/stocks.jpg +0 -0
  81. data/html/index.html +16 -0
  82. data/html/style.css +433 -0
  83. data/lib/writeexcel/biffwriter.rb +5 -0
  84. data/lib/writeexcel/caller_info.rb +0 -0
  85. data/lib/writeexcel/chart.rb +8 -219
  86. data/lib/writeexcel/charts/area.rb +0 -0
  87. data/lib/writeexcel/charts/bar.rb +0 -0
  88. data/lib/writeexcel/charts/column.rb +0 -0
  89. data/lib/writeexcel/charts/external.rb +0 -0
  90. data/lib/writeexcel/charts/line.rb +0 -0
  91. data/lib/writeexcel/charts/pie.rb +0 -0
  92. data/lib/writeexcel/charts/scatter.rb +0 -0
  93. data/lib/writeexcel/charts/stock.rb +0 -0
  94. data/lib/writeexcel/colors.rb +4 -0
  95. data/lib/writeexcel/compatibility.rb +0 -0
  96. data/lib/writeexcel/debug_info.rb +0 -0
  97. data/lib/writeexcel/excelformula.y +0 -0
  98. data/lib/writeexcel/excelformulaparser.rb +0 -0
  99. data/lib/writeexcel/format.rb +2 -28
  100. data/lib/writeexcel/formula.rb +4 -70
  101. data/lib/writeexcel/helper.rb +0 -0
  102. data/lib/writeexcel/image.rb +158 -0
  103. data/lib/writeexcel/olewriter.rb +0 -0
  104. data/lib/writeexcel/properties.rb +0 -0
  105. data/lib/writeexcel/storage_lite.rb +0 -0
  106. data/lib/writeexcel/workbook.rb +434 -824
  107. data/lib/writeexcel/worksheet.rb +4194 -4718
  108. data/lib/writeexcel/write_file.rb +0 -0
  109. data/lib/writeexcel.rb +0 -0
  110. data/test/excelfile/Chart1.xls +0 -0
  111. data/test/excelfile/Chart2.xls +0 -0
  112. data/test/excelfile/Chart3.xls +0 -0
  113. data/test/excelfile/Chart4.xls +0 -0
  114. data/test/excelfile/Chart5.xls +0 -0
  115. data/test/helper.rb +0 -0
  116. data/test/perl_output/Chart1.xls.data +0 -0
  117. data/test/perl_output/Chart2.xls.data +0 -0
  118. data/test/perl_output/Chart3.xls.data +0 -0
  119. data/test/perl_output/Chart4.xls.data +0 -0
  120. data/test/perl_output/Chart5.xls.data +0 -0
  121. data/test/perl_output/README +0 -0
  122. data/test/perl_output/a_simple.xls +0 -0
  123. data/test/perl_output/autofilter.xls +0 -0
  124. data/test/perl_output/biff_add_continue_testdata +0 -0
  125. data/test/perl_output/chart_area.xls +0 -0
  126. data/test/perl_output/chart_bar.xls +0 -0
  127. data/test/perl_output/chart_column.xls +0 -0
  128. data/test/perl_output/chart_line.xls +0 -0
  129. data/test/perl_output/chess.xls +0 -0
  130. data/test/perl_output/colors.xls +0 -0
  131. data/test/perl_output/comments1.xls +0 -0
  132. data/test/perl_output/comments2.xls +0 -0
  133. data/test/perl_output/data_validate.xls +0 -0
  134. data/test/perl_output/date_time.xls +0 -0
  135. data/test/perl_output/defined_name.xls +0 -0
  136. data/test/perl_output/demo.xls +0 -0
  137. data/test/perl_output/demo101.bin +0 -0
  138. data/test/perl_output/demo201.bin +0 -0
  139. data/test/perl_output/demo301.bin +0 -0
  140. data/test/perl_output/demo401.bin +0 -0
  141. data/test/perl_output/demo501.bin +0 -0
  142. data/test/perl_output/diag_border.xls +0 -0
  143. data/test/perl_output/f_font_biff +0 -0
  144. data/test/perl_output/f_font_key +0 -0
  145. data/test/perl_output/f_xf_biff +0 -0
  146. data/test/perl_output/file_font_biff +0 -0
  147. data/test/perl_output/file_font_key +0 -0
  148. data/test/perl_output/file_xf_biff +0 -0
  149. data/test/perl_output/formula_result.xls +0 -0
  150. data/test/perl_output/headers.xls +0 -0
  151. data/test/perl_output/hidden.xls +0 -0
  152. data/test/perl_output/hide_zero.xls +0 -0
  153. data/test/perl_output/hyperlink.xls +0 -0
  154. data/test/perl_output/images.xls +0 -0
  155. data/test/perl_output/indent.xls +0 -0
  156. data/test/perl_output/merge1.xls +0 -0
  157. data/test/perl_output/merge2.xls +0 -0
  158. data/test/perl_output/merge3.xls +0 -0
  159. data/test/perl_output/merge4.xls +0 -0
  160. data/test/perl_output/merge5.xls +0 -0
  161. data/test/perl_output/merge6.xls +0 -0
  162. data/test/perl_output/ole_write_header +0 -0
  163. data/test/perl_output/outline.xls +0 -0
  164. data/test/perl_output/outline_collapsed.xls +0 -0
  165. data/test/perl_output/panes.xls +0 -0
  166. data/test/perl_output/protection.xls +0 -0
  167. data/test/perl_output/regions.xls +0 -0
  168. data/test/perl_output/right_to_left.xls +0 -0
  169. data/test/perl_output/set_first_sheet.xls +0 -0
  170. data/test/perl_output/stats.xls +0 -0
  171. data/test/perl_output/stocks.xls +0 -0
  172. data/test/perl_output/tab_colors.xls +0 -0
  173. data/test/perl_output/unicode_cyrillic.xls +0 -0
  174. data/test/perl_output/utf8.xls +0 -0
  175. data/test/perl_output/workbook1.xls +0 -0
  176. data/test/perl_output/workbook2.xls +0 -0
  177. data/test/perl_output/ws_colinfo +0 -0
  178. data/test/perl_output/ws_store_colinfo +0 -0
  179. data/test/perl_output/ws_store_dimensions +0 -0
  180. data/test/perl_output/ws_store_filtermode +0 -0
  181. data/test/perl_output/ws_store_filtermode_off +0 -0
  182. data/test/perl_output/ws_store_filtermode_on +0 -0
  183. data/test/perl_output/ws_store_selection +0 -0
  184. data/test/perl_output/ws_store_window2 +0 -0
  185. data/test/republic.png +0 -0
  186. data/test/test_00_IEEE_double.rb +0 -0
  187. data/test/test_01_add_worksheet.rb +0 -0
  188. data/test/test_02_merge_formats.rb +0 -0
  189. data/test/test_04_dimensions.rb +27 -27
  190. data/test/test_05_rows.rb +0 -0
  191. data/test/test_06_extsst.rb +1 -1
  192. data/test/test_11_date_time.rb +3 -3
  193. data/test/test_12_date_only.rb +7 -14
  194. data/test/test_13_date_seconds.rb +5 -5
  195. data/test/test_21_escher.rb +138 -138
  196. data/test/test_22_mso_drawing_group.rb +0 -0
  197. data/test/test_23_note.rb +4 -4
  198. data/test/test_24_txo.rb +3 -3
  199. data/test/test_25_position_object.rb +1 -1
  200. data/test/test_26_autofilter.rb +3 -3
  201. data/test/test_27_autofilter.rb +1 -1
  202. data/test/test_28_autofilter.rb +2 -2
  203. data/test/test_29_process_jpg.rb +16 -29
  204. data/test/test_30_validation_dval.rb +3 -3
  205. data/test/test_31_validation_dv_strings.rb +6 -6
  206. data/test/test_32_validation_dv_formula.rb +12 -12
  207. data/test/test_40_property_types.rb +0 -0
  208. data/test/test_41_properties.rb +0 -0
  209. data/test/test_42_set_properties.rb +0 -0
  210. data/test/test_50_name_stored.rb +8 -8
  211. data/test/test_51_name_print_area.rb +18 -18
  212. data/test/test_52_name_print_titles.rb +27 -27
  213. data/test/test_53_autofilter.rb +6 -6
  214. data/test/test_60_chart_generic.rb +1 -1
  215. data/test/test_61_chart_subclasses.rb +7 -14
  216. data/test/test_62_chart_formats.rb +0 -0
  217. data/test/test_63_chart_area_formats.rb +0 -0
  218. data/test/test_biff.rb +0 -0
  219. data/test/test_compatibility.rb +0 -0
  220. data/test/test_example_match.rb +31 -0
  221. data/test/test_format.rb +0 -0
  222. data/test/test_formula.rb +0 -0
  223. data/test/test_ole.rb +0 -0
  224. data/test/test_storage_lite.rb +0 -0
  225. data/test/test_workbook.rb +6 -0
  226. data/test/test_worksheet.rb +5 -5
  227. data/utils/add_magic_comment.rb +0 -0
  228. data/writeexcel.gemspec +263 -243
  229. data/writeexcel.rdoc +3 -3
  230. metadata +42 -39
@@ -2,12 +2,6 @@
2
2
  ##########################################################################
3
3
  # test_29_process_jpg.rb
4
4
  #
5
- # all test is commented out because Workbook#process_jpg was set to private
6
- # method. Before that, all test passed.
7
- #
8
- #
9
- #
10
- #
11
5
  # Tests for the JPEG width and height processing.
12
6
  #
13
7
  # reverse('©'), September 2005, John McNamara, jmcnamara@cpan.org
@@ -22,13 +16,8 @@ require 'stringio'
22
16
  class TC_29_process_jpg < Test::Unit::TestCase
23
17
 
24
18
  def setup
25
- @test_file = StringIO.new
26
- @workbook = WriteExcel.new(@test_file)
27
- @type = 5 # Excel Blip type (MSOBLIPTYPE).
28
- end
29
-
30
- def teardown
31
- @workbook.close
19
+ @image = Writeexcel::Image.new(nil, nil, nil)
20
+ @type = 5 # Excel Blip type (MSOBLIPTYPE).
32
21
  end
33
22
 
34
23
  def test_valid_jpg_image_1
@@ -54,11 +43,10 @@ class TC_29_process_jpg < Test::Unit::TestCase
54
43
  00 00 00 00 00 00 00 00 00 00 00 FF DA 00 0C 03
55
44
  01 00 02 11 03 11 00 3F 00 9D 00 1C A4 5F FF D9
56
45
  )
57
- image = [data.join('')].pack('H*')
58
-
59
- expected = [@type, 3, 5]
60
- result = @workbook.process_jpg(image, 'test.jpg')
61
- assert_equal(expected, result, " \t" + testname)
46
+ @image.__send__("process_jpg", [data.join('')].pack('H*'))
47
+ assert_equal(@type, @image.type)
48
+ assert_equal(3, @image.width)
49
+ assert_equal(5, @image.height)
62
50
  end
63
51
 
64
52
  def test_valid_jpg_image_2
@@ -84,11 +72,11 @@ class TC_29_process_jpg < Test::Unit::TestCase
84
72
  00 00 00 00 00 00 00 00 00 00 00 FF DA 00 0C 03
85
73
  01 00 02 11 03 11 00 3F 00 9D 00 1C A4 5F FF D9
86
74
  )
87
- image = [data.join('')].pack('H*')
88
75
 
89
- expected = [@type, 5, 3]
90
- result = @workbook.process_jpg(image, 'test.jpg')
91
- assert_equal(expected, result, " \t" + testname)
76
+ @image.__send__("process_jpg", [data.join('')].pack('H*'))
77
+ assert_equal(@type, @image.type)
78
+ assert_equal(5, @image.width)
79
+ assert_equal(3, @image.height)
92
80
  end
93
81
 
94
82
  def test_valid_jpg_image_3_ffco_marker_missing
@@ -114,10 +102,9 @@ class TC_29_process_jpg < Test::Unit::TestCase
114
102
  00 00 00 00 00 00 00 00 00 00 00 FF DA 00 0C 03
115
103
  01 00 02 11 03 11 00 3F 00 9D 00 1C A4 5F FF D9
116
104
  )
117
- image = [data.join('')].pack('H*')
118
105
 
119
106
  assert_raise(RuntimeError, " \t" + testname) {
120
- @workbook.process_jpg(image, 'test.jpg')
107
+ @image.__send__("process_jpg", [data.join('')].pack('H*'))
121
108
  }
122
109
  end
123
110
 
@@ -126,7 +113,7 @@ class TC_29_process_jpg < Test::Unit::TestCase
126
113
  image = ''
127
114
 
128
115
  assert_raise(RuntimeError, " \t" + testname) {
129
- @workbook.process_jpg(image, 'test.jpg')
116
+ @image.__send__("process_jpg", image)
130
117
  }
131
118
  end
132
119
 
@@ -675,9 +662,9 @@ class TC_29_process_jpg < Test::Unit::TestCase
675
662
  03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
676
663
  03 03 03 03 03 03 FF C2 00 11 08 00 23 00 23 03
677
664
  )
678
- image = [data.join('')].pack('H*')
679
- expected = [@type, 35, 35]
680
- results = @workbook.process_jpg(image, 'test.jpg')
681
- assert_equal(expected, results)
665
+ @image.__send__("process_jpg", [data.join('')].pack('H*'))
666
+ assert_equal(@type, @image.type)
667
+ assert_equal(35, @image.width)
668
+ assert_equal(35, @image.height)
682
669
  end
683
670
  end
@@ -34,7 +34,7 @@ class TC_validation_dval < Test::Unit::TestCase
34
34
  00 00 01 00 00 00
35
35
  ).join(' ')
36
36
 
37
- result = unpack_record(@worksheet.store_dval(obj_id, dv_count))
37
+ result = unpack_record(@worksheet.__send__("store_dval", obj_id, dv_count))
38
38
  assert_equal(target, result, caption)
39
39
  end
40
40
 
@@ -48,7 +48,7 @@ class TC_validation_dval < Test::Unit::TestCase
48
48
  FF FF 01 00 00 00
49
49
  ).join(' ')
50
50
 
51
- result = unpack_record(@worksheet.store_dval(obj_id, dv_count))
51
+ result = unpack_record(@worksheet.__send__("store_dval", obj_id, dv_count))
52
52
  assert_equal(target, result, caption)
53
53
  end
54
54
 
@@ -62,7 +62,7 @@ class TC_validation_dval < Test::Unit::TestCase
62
62
  00 00 02 00 00 00
63
63
  ).join(' ')
64
64
 
65
- result = unpack_record(@worksheet.store_dval(obj_id, dv_count))
65
+ result = unpack_record(@worksheet.__send__("store_dval", obj_id, dv_count))
66
66
  assert_equal(target, result, caption)
67
67
  end
68
68
 
@@ -33,7 +33,7 @@ class TC_validation_dv_strings < Test::Unit::TestCase
33
33
  target = %w(
34
34
  01 00 00 00
35
35
  ).join(' ')
36
- result = unpack_record(@worksheet.pack_dv_string(string, max_length))
36
+ result = unpack_record(@worksheet.__send__("pack_dv_string", string, max_length))
37
37
  assert_equal(target, result, caption)
38
38
  end
39
39
 
@@ -45,7 +45,7 @@ class TC_validation_dv_strings < Test::Unit::TestCase
45
45
  target = %w(
46
46
  01 00 00 00
47
47
  ).join(' ')
48
- result = unpack_record(@worksheet.pack_dv_string(string, max_length))
48
+ result = unpack_record(@worksheet.__send__("pack_dv_string", string, max_length))
49
49
  assert_equal(target, result, caption)
50
50
  end
51
51
 
@@ -57,7 +57,7 @@ class TC_validation_dv_strings < Test::Unit::TestCase
57
57
  target = %w(
58
58
  01 00 00 20
59
59
  ).join(' ')
60
- result = unpack_record(@worksheet.pack_dv_string(string, max_length))
60
+ result = unpack_record(@worksheet.__send__("pack_dv_string", string, max_length))
61
61
  assert_equal(target, result, caption)
62
62
  end
63
63
 
@@ -69,7 +69,7 @@ class TC_validation_dv_strings < Test::Unit::TestCase
69
69
  target = %w(
70
70
  01 00 00 41
71
71
  ).join(' ')
72
- result = unpack_record(@worksheet.pack_dv_string(string, max_length))
72
+ result = unpack_record(@worksheet.__send__("pack_dv_string", string, max_length))
73
73
  assert_equal(target, result, caption)
74
74
  end
75
75
 
@@ -83,7 +83,7 @@ class TC_validation_dv_strings < Test::Unit::TestCase
83
83
  73 74 72 69 6E 67 20 69 73 20 6C 6F 6E 67 65 72
84
84
  20 74 68 61 6E 20 33 32 20 63 68
85
85
  ).join(' ')
86
- result = unpack_record(@worksheet.pack_dv_string(string, max_length))
86
+ result = unpack_record(@worksheet.__send__("pack_dv_string", string, max_length))
87
87
  assert_equal(target, result, caption)
88
88
  end
89
89
 
@@ -111,7 +111,7 @@ class TC_validation_dv_strings < Test::Unit::TestCase
111
111
  42 43 44 41 42 43 44 41 42 43 44 41 42 43 44 41
112
112
  42 43
113
113
  ).join(' ')
114
- result = unpack_record(@worksheet.pack_dv_string(string, max_length))
114
+ result = unpack_record(@worksheet.__send__("pack_dv_string", string, max_length))
115
115
  assert_equal(target, result, caption)
116
116
  end
117
117
 
@@ -38,7 +38,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
38
38
  bytes[3] = '00'
39
39
  target = bytes.join(" ")
40
40
 
41
- result = unpack_record(@worksheet.pack_dv_formula(formula))
41
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
42
42
  assert_equal(target, result, caption)
43
43
  end
44
44
 
@@ -55,12 +55,12 @@ class TC_validation_dv_formula < Test::Unit::TestCase
55
55
  bytes[3] = '00'
56
56
  target = bytes.join(" ")
57
57
 
58
- result = unpack_record(@worksheet.pack_dv_formula(formula))
58
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
59
59
  assert_equal(target, result, caption)
60
60
  end
61
61
 
62
62
  def test_date_values
63
- formula = @worksheet.convert_date_time('2008-07-24T')
63
+ formula = @worksheet.__send__("convert_date_time", '2008-07-24T')
64
64
 
65
65
  caption = " \tData validation: _pack_dv_formula('2008-07-24T')"
66
66
  bytes = %w(
@@ -72,12 +72,12 @@ class TC_validation_dv_formula < Test::Unit::TestCase
72
72
  bytes[3] = '00'
73
73
  target = bytes.join(" ")
74
74
 
75
- result = unpack_record(@worksheet.pack_dv_formula(formula))
75
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
76
76
  assert_equal(target, result, caption)
77
77
  end
78
78
 
79
79
  def test_time_values
80
- formula = @worksheet.convert_date_time('T12:00')
80
+ formula = @worksheet.__send__("convert_date_time", 'T12:00')
81
81
 
82
82
  caption = " \tData validation: _pack_dv_formula('T12:00')"
83
83
  bytes = %w(
@@ -89,7 +89,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
89
89
  bytes[3] = '00'
90
90
  target = bytes.join(" ")
91
91
 
92
- result = unpack_record(@worksheet.pack_dv_formula(formula))
92
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
93
93
  assert_equal(target, result, caption)
94
94
  end
95
95
 
@@ -106,7 +106,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
106
106
  bytes[3] = '00'
107
107
  target = bytes.join(" ")
108
108
 
109
- result = unpack_record(@worksheet.pack_dv_formula(formula))
109
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
110
110
  assert_equal(target, result, caption)
111
111
  end
112
112
 
@@ -123,7 +123,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
123
123
  bytes[3] = '00'
124
124
  target = bytes.join(" ")
125
125
 
126
- result = unpack_record(@worksheet.pack_dv_formula(formula))
126
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
127
127
  assert_equal(target, result, caption)
128
128
  end
129
129
 
@@ -140,7 +140,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
140
140
  bytes[3] = '00'
141
141
  target = bytes.join(" ")
142
142
 
143
- result = unpack_record(@worksheet.pack_dv_formula(formula))
143
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
144
144
  assert_equal(target, result, caption)
145
145
  end
146
146
 
@@ -157,7 +157,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
157
157
  bytes[3] = '00'
158
158
  target = bytes.join(" ")
159
159
 
160
- result = unpack_record(@worksheet.pack_dv_formula(formula))
160
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
161
161
  assert_equal(target, result, caption)
162
162
  end
163
163
 
@@ -174,7 +174,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
174
174
  bytes[3] = '00'
175
175
  target = bytes.join(" ")
176
176
 
177
- result = unpack_record(@worksheet.pack_dv_formula(formula))
177
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
178
178
  assert_equal(target, result, caption)
179
179
  end
180
180
 
@@ -191,7 +191,7 @@ class TC_validation_dv_formula < Test::Unit::TestCase
191
191
  bytes[3] = '00'
192
192
  target = bytes.join(" ")
193
193
 
194
- result = unpack_record(@worksheet.pack_dv_formula(formula))
194
+ result = unpack_record(@worksheet.__send__("pack_dv_formula", formula))
195
195
  assert_equal(target, result, caption)
196
196
  end
197
197
 
File without changes
File without changes
File without changes
@@ -31,7 +31,7 @@ class TC_Name_Stored < Test::Unit::TestCase
31
31
  sheet_index = 1
32
32
  formula = ['3B000000000B0000000100'].pack('H*')
33
33
 
34
- result = @workbook.store_name(
34
+ result = @workbook.__send__("store_name",
35
35
  name,
36
36
  encoding,
37
37
  sheet_index,
@@ -54,7 +54,7 @@ class TC_Name_Stored < Test::Unit::TestCase
54
54
  sheet_index = 3
55
55
  formula = ['3B02000600070006000700'].pack('H*')
56
56
 
57
- result = @workbook.store_name(
57
+ result = @workbook.__send__("store_name",
58
58
  name,
59
59
  encoding,
60
60
  sheet_index,
@@ -78,7 +78,7 @@ class TC_Name_Stored < Test::Unit::TestCase
78
78
  sheet_index = 1
79
79
  formula = ['3B0000000009000000FF00'].pack('H*')
80
80
 
81
- result = @workbook.store_name(
81
+ result = @workbook.__send__("store_name",
82
82
  name,
83
83
  encoding,
84
84
  sheet_index,
@@ -102,7 +102,7 @@ class TC_Name_Stored < Test::Unit::TestCase
102
102
  sheet_index = 1
103
103
  formula = ['3B0000000009000000FF00'].pack('H*')
104
104
 
105
- result = @workbook.store_name(
105
+ result = @workbook.__send__("store_name",
106
106
  name,
107
107
  encoding,
108
108
  sheet_index,
@@ -126,7 +126,7 @@ class TC_Name_Stored < Test::Unit::TestCase
126
126
  sheet_index = 1
127
127
  formula = ['3B00000000FFFF00000900'].pack('H*')
128
128
 
129
- result = @workbook.store_name(
129
+ result = @workbook.__send__("store_name",
130
130
  name,
131
131
  encoding,
132
132
  sheet_index,
@@ -150,7 +150,7 @@ class TC_Name_Stored < Test::Unit::TestCase
150
150
  sheet_index = 1
151
151
  formula = ['2917003B00000000FFFF030004003B0000010002000000FF0010'].pack('H*')
152
152
 
153
- result = @workbook.store_name(
153
+ result = @workbook.__send__("store_name",
154
154
  name,
155
155
  encoding,
156
156
  sheet_index,
@@ -175,7 +175,7 @@ class TC_Name_Stored < Test::Unit::TestCase
175
175
  sheet_index = 1
176
176
  formula = ['3B00000000040000000200'].pack('H*')
177
177
 
178
- result = @workbook.store_name(
178
+ result = @workbook.__send__("store_name",
179
179
  name,
180
180
  encoding,
181
181
  sheet_index,
@@ -199,7 +199,7 @@ class TC_Name_Stored < Test::Unit::TestCase
199
199
  sheet_index = 0
200
200
  formula = ['3A000007000100'].pack('H*')
201
201
 
202
- result = @workbook.store_name(
202
+ result = @workbook.__send__("store_name",
203
203
  name,
204
204
  encoding,
205
205
  sheet_index,
@@ -31,8 +31,8 @@ class TC_Name_Print_Area < Test::Unit::TestCase
31
31
  worksheet1.print_area(area)
32
32
 
33
33
  # Test the EXTERNSHEET record.
34
- @workbook.calculate_extern_sizes
35
- @workbook.store_externsheet
34
+ @workbook.__send__("calculate_extern_sizes")
35
+ @workbook.__send__("store_externsheet")
36
36
 
37
37
  target = [%w(
38
38
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -45,7 +45,7 @@ class TC_Name_Print_Area < Test::Unit::TestCase
45
45
 
46
46
  # Test the NAME record.
47
47
  @workbook.clear_data_for_test
48
- @workbook.store_names
48
+ @workbook.__send__("store_names")
49
49
 
50
50
  target = [%w(
51
51
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -65,8 +65,8 @@ class TC_Name_Print_Area < Test::Unit::TestCase
65
65
  worksheet1.print_area(area)
66
66
 
67
67
  # Test the EXTERNSHEET record.
68
- @workbook.calculate_extern_sizes
69
- @workbook.store_externsheet
68
+ @workbook.__send__("calculate_extern_sizes")
69
+ @workbook.__send__("store_externsheet")
70
70
 
71
71
  target = [%w(
72
72
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -79,7 +79,7 @@ class TC_Name_Print_Area < Test::Unit::TestCase
79
79
 
80
80
  # Test the NAME record.
81
81
  @workbook.clear_data_for_test
82
- @workbook.store_names
82
+ @workbook.__send__("store_names")
83
83
 
84
84
  target = [%w(
85
85
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -99,8 +99,8 @@ class TC_Name_Print_Area < Test::Unit::TestCase
99
99
  worksheet1.print_area(area)
100
100
 
101
101
  # Test the EXTERNSHEET record.
102
- @workbook.calculate_extern_sizes
103
- @workbook.store_externsheet
102
+ @workbook.__send__("calculate_extern_sizes")
103
+ @workbook.__send__("store_externsheet")
104
104
 
105
105
  target = [%w(
106
106
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -113,7 +113,7 @@ class TC_Name_Print_Area < Test::Unit::TestCase
113
113
 
114
114
  # Test the NAME record.
115
115
  @workbook.clear_data_for_test
116
- @workbook.store_names
116
+ @workbook.__send__("store_names")
117
117
 
118
118
  target = [%w(
119
119
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -133,8 +133,8 @@ class TC_Name_Print_Area < Test::Unit::TestCase
133
133
  worksheet1.print_area(area)
134
134
 
135
135
  # Test the EXTERNSHEET record.
136
- @workbook.calculate_extern_sizes
137
- @workbook.store_externsheet
136
+ @workbook.__send__("calculate_extern_sizes")
137
+ @workbook.__send__("store_externsheet")
138
138
 
139
139
  target = [%w(
140
140
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -147,7 +147,7 @@ class TC_Name_Print_Area < Test::Unit::TestCase
147
147
 
148
148
  # Test the NAME record.
149
149
  @workbook.clear_data_for_test
150
- @workbook.store_names
150
+ @workbook.__send__("store_names")
151
151
 
152
152
  target = [%w(
153
153
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -170,8 +170,8 @@ class TC_Name_Print_Area < Test::Unit::TestCase
170
170
  worksheet3.print_area('G7:H8')
171
171
 
172
172
  # Test the EXTERNSHEET record.
173
- @workbook.calculate_extern_sizes
174
- @workbook.store_externsheet
173
+ @workbook.__send__("calculate_extern_sizes")
174
+ @workbook.__send__("store_externsheet")
175
175
 
176
176
  target = [%w(
177
177
  17 00 14 00 03 00 00 00 00 00 00 00 00 00 01 00
@@ -185,7 +185,7 @@ class TC_Name_Print_Area < Test::Unit::TestCase
185
185
 
186
186
  # Test the NAME record.
187
187
  @workbook.clear_data_for_test
188
- @workbook.store_names
188
+ @workbook.__send__("store_names")
189
189
 
190
190
  target = [%w(
191
191
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -216,8 +216,8 @@ class TC_Name_Print_Area < Test::Unit::TestCase
216
216
  worksheet5.print_area('G7:H8')
217
217
 
218
218
  # Test the EXTERNSHEET record.
219
- @workbook.calculate_extern_sizes
220
- @workbook.store_externsheet
219
+ @workbook.__send__("calculate_extern_sizes")
220
+ @workbook.__send__("store_externsheet")
221
221
 
222
222
  target = [%w(
223
223
  17 00 14 00 03 00 00 00 00 00 00 00 00 00 02 00
@@ -231,7 +231,7 @@ class TC_Name_Print_Area < Test::Unit::TestCase
231
231
 
232
232
  # Test the NAME record.
233
233
  @workbook.clear_data_for_test
234
- @workbook.store_names
234
+ @workbook.__send__("store_names")
235
235
 
236
236
  target = [%w(
237
237
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -30,8 +30,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
30
30
  worksheet1.repeat_rows(0)
31
31
 
32
32
  # Test the EXTERNSHEET record.
33
- @workbook.calculate_extern_sizes
34
- @workbook.store_externsheet
33
+ @workbook.__send__("calculate_extern_sizes")
34
+ @workbook.__send__("store_externsheet")
35
35
 
36
36
  target = [%w(
37
37
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -44,7 +44,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
44
44
 
45
45
  # Test the NAME record.
46
46
  @workbook.clear_data_for_test
47
- @workbook.store_names
47
+ @workbook.__send__("store_names")
48
48
 
49
49
  target = [%w(
50
50
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -63,8 +63,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
63
63
  worksheet1.repeat_rows(0, 9)
64
64
 
65
65
  # Test the EXTERNSHEET record.
66
- @workbook.calculate_extern_sizes
67
- @workbook.store_externsheet
66
+ @workbook.__send__("calculate_extern_sizes")
67
+ @workbook.__send__("store_externsheet")
68
68
 
69
69
  target = [%w(
70
70
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -77,7 +77,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
77
77
 
78
78
  # Test the NAME record.
79
79
  @workbook.clear_data_for_test
80
- @workbook.store_names
80
+ @workbook.__send__("store_names")
81
81
 
82
82
  target = [%w(
83
83
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -96,8 +96,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
96
96
  worksheet1.repeat_columns(0)
97
97
 
98
98
  # Test the EXTERNSHEET record.
99
- @workbook.calculate_extern_sizes
100
- @workbook.store_externsheet
99
+ @workbook.__send__("calculate_extern_sizes")
100
+ @workbook.__send__("store_externsheet")
101
101
 
102
102
  target = [%w(
103
103
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -110,7 +110,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
110
110
 
111
111
  # Test the NAME record.
112
112
  @workbook.clear_data_for_test
113
- @workbook.store_names
113
+ @workbook.__send__("store_names")
114
114
 
115
115
  target = [%w(
116
116
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -129,8 +129,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
129
129
  worksheet1.repeat_columns('A:A')
130
130
 
131
131
  # Test the EXTERNSHEET record.
132
- @workbook.calculate_extern_sizes
133
- @workbook.store_externsheet
132
+ @workbook.__send__("calculate_extern_sizes")
133
+ @workbook.__send__("store_externsheet")
134
134
 
135
135
  target = [%w(
136
136
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -143,7 +143,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
143
143
 
144
144
  # Test the NAME record.
145
145
  @workbook.clear_data_for_test
146
- @workbook.store_names
146
+ @workbook.__send__("store_names")
147
147
 
148
148
  target = [%w(
149
149
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -162,8 +162,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
162
162
  worksheet1.repeat_columns(0, 9)
163
163
 
164
164
  # Test the EXTERNSHEET record.
165
- @workbook.calculate_extern_sizes
166
- @workbook.store_externsheet
165
+ @workbook.__send__("calculate_extern_sizes")
166
+ @workbook.__send__("store_externsheet")
167
167
 
168
168
  target = [%w(
169
169
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -176,7 +176,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
176
176
 
177
177
  # Test the NAME record.
178
178
  @workbook.clear_data_for_test
179
- @workbook.store_names
179
+ @workbook.__send__("store_names")
180
180
 
181
181
  target = [%w(
182
182
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -195,8 +195,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
195
195
  worksheet1.repeat_columns('A:J')
196
196
 
197
197
  # Test the EXTERNSHEET record.
198
- @workbook.calculate_extern_sizes
199
- @workbook.store_externsheet
198
+ @workbook.__send__("calculate_extern_sizes")
199
+ @workbook.__send__("store_externsheet")
200
200
 
201
201
  target = [%w(
202
202
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -209,7 +209,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
209
209
 
210
210
  # Test the NAME record.
211
211
  @workbook.clear_data_for_test
212
- @workbook.store_names
212
+ @workbook.__send__("store_names")
213
213
 
214
214
  target = [%w(
215
215
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -232,8 +232,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
232
232
  worksheet3.repeat_rows(6, 7)
233
233
 
234
234
  # Test the EXTERNSHEET record.
235
- @workbook.calculate_extern_sizes
236
- @workbook.store_externsheet
235
+ @workbook.__send__("calculate_extern_sizes")
236
+ @workbook.__send__("store_externsheet")
237
237
 
238
238
  target = [%w(
239
239
  17 00 14 00 03 00 00 00 00 00 00 00 00 00 01 00
@@ -247,7 +247,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
247
247
 
248
248
  # Test the NAME record.
249
249
  @workbook.clear_data_for_test
250
- @workbook.store_names
250
+ @workbook.__send__("store_names")
251
251
 
252
252
  target = [%w(
253
253
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -278,8 +278,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
278
278
  worksheet5.repeat_rows(6, 7)
279
279
 
280
280
  # Test the EXTERNSHEET record.
281
- @workbook.calculate_extern_sizes
282
- @workbook.store_externsheet
281
+ @workbook.__send__("calculate_extern_sizes")
282
+ @workbook.__send__("store_externsheet")
283
283
 
284
284
  target = [%w(
285
285
  17 00 14 00 03 00 00 00 00 00 00 00 00 00 02 00
@@ -293,7 +293,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
293
293
 
294
294
  # Test the NAME record.
295
295
  @workbook.clear_data_for_test
296
- @workbook.store_names
296
+ @workbook.__send__("store_names")
297
297
 
298
298
  target = [%w(
299
299
  18 00 1B 00 20 00 00 01 0B 00 00 00 01 00 00 00
@@ -319,8 +319,8 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
319
319
  worksheet1.repeat_columns(3, 4)
320
320
 
321
321
  # Test the EXTERNSHEET record.
322
- @workbook.calculate_extern_sizes
323
- @workbook.store_externsheet
322
+ @workbook.__send__("calculate_extern_sizes")
323
+ @workbook.__send__("store_externsheet")
324
324
 
325
325
  target = [%w(
326
326
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -333,7 +333,7 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
333
333
 
334
334
  # Test the NAME record.
335
335
  @workbook.clear_data_for_test
336
- @workbook.store_names
336
+ @workbook.__send__("store_names")
337
337
 
338
338
  target = [%w(
339
339
  18 00 2A 00 20 00 00 01 1A 00 00 00 01 00 00 00
@@ -30,8 +30,8 @@ class TC_autofilter < Test::Unit::TestCase
30
30
  worksheet1.autofilter('A1:C5')
31
31
 
32
32
  # Test the EXTERNSHEET record.
33
- @workbook.calculate_extern_sizes
34
- @workbook.store_externsheet
33
+ @workbook.__send__("calculate_extern_sizes")
34
+ @workbook.__send__("store_externsheet")
35
35
 
36
36
  target = [%w(
37
37
  17 00 08 00 01 00 00 00 00 00 00 00
@@ -44,7 +44,7 @@ class TC_autofilter < Test::Unit::TestCase
44
44
 
45
45
  # Test the NAME record.
46
46
  @workbook.clear_data_for_test
47
- @workbook.store_names
47
+ @workbook.__send__("store_names")
48
48
 
49
49
  target = [%w(
50
50
  18 00 1B 00 21 00 00 01 0B 00 00 00 01 00 00 00
@@ -65,8 +65,8 @@ class TC_autofilter < Test::Unit::TestCase
65
65
  worksheet2.autofilter('A1:C5')
66
66
 
67
67
  # Test the EXTERNSHEET record.
68
- @workbook.calculate_extern_sizes
69
- @workbook.store_externsheet
68
+ @workbook.__send__("calculate_extern_sizes")
69
+ @workbook.__send__("store_externsheet")
70
70
 
71
71
  target = [%w(
72
72
  17 00 0E 00 02 00 00 00 00 00 00 00 00 00 01 00
@@ -80,7 +80,7 @@ class TC_autofilter < Test::Unit::TestCase
80
80
 
81
81
  # Test the NAME record.
82
82
  @workbook.clear_data_for_test
83
- @workbook.store_names
83
+ @workbook.__send__("store_names")
84
84
 
85
85
  target = [%w(
86
86
  18 00 1B 00 21 00 00 01 0B 00 00 00 01 00 00 00