writeexcel 1.0.4 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +8 -0
  3. data/README.rdoc +9 -1
  4. data/examples/a_simple.rb +0 -1
  5. data/examples/chart_area.rb +0 -1
  6. data/examples/chart_legend.rb +0 -1
  7. data/examples/copyformat.rb +0 -1
  8. data/examples/data_validate.rb +1 -2
  9. data/examples/date_time.rb +0 -1
  10. data/examples/demo.rb +0 -1
  11. data/examples/diag_border.rb +0 -1
  12. data/examples/formats.rb +0 -1
  13. data/examples/header.rb +0 -1
  14. data/examples/hide_sheet.rb +0 -1
  15. data/examples/hyperlink.rb +0 -1
  16. data/examples/hyperlink2.rb +0 -1
  17. data/examples/images.rb +0 -1
  18. data/examples/merge1.rb +0 -1
  19. data/examples/merge2.rb +0 -1
  20. data/examples/merge3.rb +0 -1
  21. data/examples/merge4.rb +0 -1
  22. data/examples/merge5.rb +0 -1
  23. data/examples/password_protection.rb +0 -1
  24. data/examples/properties.rb +0 -1
  25. data/examples/properties_jp.rb +0 -1
  26. data/examples/protection.rb +0 -1
  27. data/examples/regions.rb +0 -1
  28. data/examples/repeat.rb +0 -1
  29. data/examples/set_first_sheet.rb +0 -1
  30. data/examples/stocks.rb +0 -1
  31. data/examples/store_formula.rb +0 -1
  32. data/examples/tab_colors.rb +0 -1
  33. data/examples/write_arrays.rb +0 -1
  34. data/lib/writeexcel/biffwriter.rb +2 -1
  35. data/lib/writeexcel/chart.rb +2 -3
  36. data/lib/writeexcel/charts/area.rb +1 -1
  37. data/lib/writeexcel/charts/pie.rb +1 -1
  38. data/lib/writeexcel/charts/scatter.rb +1 -1
  39. data/lib/writeexcel/charts/stock.rb +1 -1
  40. data/lib/writeexcel/col_info.rb +2 -2
  41. data/lib/writeexcel/comments.rb +1 -1
  42. data/lib/writeexcel/convert_date_time.rb +7 -7
  43. data/lib/writeexcel/excelformulaparser.rb +49 -49
  44. data/lib/writeexcel/format.rb +1 -1
  45. data/lib/writeexcel/formula.rb +2 -6
  46. data/lib/writeexcel/helper.rb +3 -3
  47. data/lib/writeexcel/properties.rb +1 -1
  48. data/lib/writeexcel/shared_string_table.rb +5 -5
  49. data/lib/writeexcel/storage_lite.rb +2 -9
  50. data/lib/writeexcel/version.rb +1 -1
  51. data/lib/writeexcel/workbook.rb +13 -14
  52. data/lib/writeexcel/worksheet.rb +43 -35
  53. data/test/helper.rb +12 -5
  54. data/test/test_00_IEEE_double.rb +1 -1
  55. data/test/test_04_dimensions.rb +2 -2
  56. data/test/test_05_rows.rb +1 -1
  57. data/test/test_06_extsst.rb +1 -1
  58. data/test/test_11_date_time.rb +1 -1
  59. data/test/test_12_date_only.rb +1 -1
  60. data/test/test_13_date_seconds.rb +1 -1
  61. data/test/test_21_escher.rb +1 -1
  62. data/test/test_22_mso_drawing_group.rb +1 -1
  63. data/test/test_23_note.rb +1 -1
  64. data/test/test_24_txo.rb +1 -1
  65. data/test/test_25_position_object.rb +1 -1
  66. data/test/test_26_autofilter.rb +1 -1
  67. data/test/test_27_autofilter.rb +1 -1
  68. data/test/test_28_autofilter.rb +1 -1
  69. data/test/test_29_process_jpg.rb +1 -43
  70. data/test/test_30_validation_dval.rb +1 -1
  71. data/test/test_31_validation_dv_strings.rb +1 -1
  72. data/test/test_32_validation_dv_formula.rb +1 -1
  73. data/test/test_40_property_types.rb +1 -1
  74. data/test/test_41_properties.rb +1 -1
  75. data/test/test_42_set_properties.rb +2 -2
  76. data/test/test_50_name_stored.rb +1 -9
  77. data/test/test_51_name_print_area.rb +3 -13
  78. data/test/test_52_name_print_titles.rb +3 -21
  79. data/test/test_53_autofilter.rb +1 -5
  80. data/test/test_60_chart_generic.rb +3 -3
  81. data/test/test_61_chart_subclasses.rb +2 -1
  82. data/test/test_62_chart_formats.rb +9 -21
  83. data/test/test_63_chart_area_formats.rb +1 -1
  84. data/test/test_compatibility.rb +1 -1
  85. data/test/test_example_match.rb +835 -835
  86. data/test/test_format.rb +1 -114
  87. data/test/test_formula.rb +1 -1
  88. data/test/test_properties.rb +1 -2
  89. data/test/test_storage_lite.rb +2 -2
  90. data/test/test_workbook.rb +1 -66
  91. data/test/test_worksheet.rb +1 -18
  92. data/test/test_write_formula_does_not_change_formula_string.rb +1 -1
  93. data/writeexcel.gemspec +4 -1
  94. metadata +38 -19
  95. data/test/test_01_add_worksheet.rb +0 -43
  96. data/test/test_02_merge_formats.rb +0 -49
  97. data/test/test_biff.rb +0 -71
  98. data/test/test_big_workbook.rb +0 -17
  99. data/test/test_ole.rb +0 -102
data/test/test_ole.rb DELETED
@@ -1,102 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require 'helper'
3
- require 'stringio'
4
-
5
- class TC_OLE < Test::Unit::TestCase
6
-
7
- def setup
8
- @file = StringIO.new
9
- @ole = OLEWriter.new(@file)
10
- end
11
-
12
- def test_constructor
13
- assert_kind_of(OLEWriter, @ole)
14
- end
15
-
16
- def test_constants
17
- assert_equal(7087104, OLEWriter::MaxSize)
18
- assert_equal(4096, OLEWriter::BlockSize)
19
- assert_equal(512, OLEWriter::BlockDiv)
20
- assert_equal(127, OLEWriter::ListBlocks)
21
- end
22
-
23
- def test_calculate_sizes
24
- assert_respond_to(@ole, :calculate_sizes)
25
- assert_nothing_raised{ @ole.calculate_sizes }
26
- assert_equal(0, @ole.big_blocks)
27
- assert_equal(1, @ole.list_blocks)
28
- assert_equal(0, @ole.root_start)
29
- end
30
-
31
- def test_set_size_too_big
32
- assert(!@ole.set_size(999999999))
33
- end
34
-
35
- def test_book_size_large
36
- assert_nothing_raised{ @ole.set_size(8192) }
37
- assert_equal(8192, @ole.book_size)
38
- end
39
-
40
- def test_book_size_small
41
- assert_nothing_raised{ @ole.set_size(2048) }
42
- assert_equal(4096, @ole.book_size)
43
- end
44
-
45
- def test_biff_size
46
- assert_nothing_raised{ @ole.set_size(2048) }
47
- assert_equal(2048, @ole.biff_size)
48
- end
49
-
50
- def test_size_allowed
51
- assert_nothing_raised{ @ole.set_size }
52
- assert_equal(true, @ole.size_allowed)
53
- end
54
-
55
- def test_big_block_size_default
56
- assert_nothing_raised{ @ole.set_size }
57
- assert_nothing_raised{ @ole.calculate_sizes }
58
- assert_equal(8, @ole.big_blocks, "Bad big block size")
59
- end
60
-
61
- def test_big_block_size_rounded_up
62
- assert_nothing_raised{ @ole.set_size(4099) }
63
- assert_nothing_raised{ @ole.calculate_sizes }
64
- assert_equal(9, @ole.big_blocks, "Bad big block size")
65
- end
66
-
67
- def test_list_block_size
68
- assert_nothing_raised{ @ole.set_size }
69
- assert_nothing_raised{ @ole.calculate_sizes }
70
- assert_equal(1, @ole.list_blocks, "Bad list block size")
71
- end
72
-
73
- def test_root_start_size_default
74
- assert_nothing_raised{ @ole.set_size }
75
- assert_nothing_raised{ @ole.calculate_sizes }
76
- assert_equal(8, @ole.big_blocks, "Bad root start size")
77
- end
78
-
79
- def test_root_start_size_rounded_up
80
- assert_nothing_raised{ @ole.set_size(4099) }
81
- assert_nothing_raised{ @ole.calculate_sizes }
82
- assert_equal(9, @ole.big_blocks, "Bad root start size")
83
- end
84
-
85
- def test_write_header
86
- assert_nothing_raised{ @ole.write_header }
87
- #assert_nothing_raised{ @ole.close }
88
- #assert_equal(512, File.size(@file))
89
- end
90
-
91
- def test_write_big_block_depot
92
- assert_nothing_raised{ @ole.write_big_block_depot }
93
- #assert_nothing_raised{ @ole.close }
94
- #assert_equal(8, File.size(@file))
95
- end
96
-
97
- def test_write_property_storage_size
98
- assert_nothing_raised{ @ole.write_property_storage }
99
- #assert_nothing_raised{ @ole.close }
100
- #assert_equal(512, File.size(@file))
101
- end
102
- end