spreadsheet 1.3.3 → 1.3.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.
- checksums.yaml +4 -4
- data/bin/irb +29 -0
- data/bin/racc +29 -0
- data/bin/rdbg +29 -0
- data/bin/rdoc +29 -0
- data/bin/ri +29 -0
- data/bin/rubocop +29 -0
- data/bin/ruby-parse +29 -0
- data/bin/ruby-rewrite +29 -0
- data/bin/standardrb +29 -0
- data/bin/test-unit +29 -0
- data/lib/parseexcel/parseexcel.rb +66 -58
- data/lib/parseexcel/parser.rb +1 -1
- data/lib/parseexcel.rb +1 -1
- data/lib/spreadsheet/column.rb +13 -10
- data/lib/spreadsheet/compatibility.rb +3 -1
- data/lib/spreadsheet/datatypes.rb +150 -147
- data/lib/spreadsheet/encodings.rb +20 -16
- data/lib/spreadsheet/errors.rb +2 -2
- data/lib/spreadsheet/excel/error.rb +23 -22
- data/lib/spreadsheet/excel/internals/biff5.rb +11 -11
- data/lib/spreadsheet/excel/internals/biff8.rb +13 -13
- data/lib/spreadsheet/excel/internals.rb +451 -451
- data/lib/spreadsheet/excel/offset.rb +34 -31
- data/lib/spreadsheet/excel/password_hash.rb +18 -18
- data/lib/spreadsheet/excel/reader/biff5.rb +34 -35
- data/lib/spreadsheet/excel/reader/biff8.rb +235 -222
- data/lib/spreadsheet/excel/reader.rb +1331 -1274
- data/lib/spreadsheet/excel/rgb.rb +91 -91
- data/lib/spreadsheet/excel/row.rb +99 -91
- data/lib/spreadsheet/excel/sst_entry.rb +41 -38
- data/lib/spreadsheet/excel/workbook.rb +87 -76
- data/lib/spreadsheet/excel/worksheet.rb +126 -107
- data/lib/spreadsheet/excel/writer/biff8.rb +57 -55
- data/lib/spreadsheet/excel/writer/format.rb +274 -256
- data/lib/spreadsheet/excel/writer/n_worksheet.rb +838 -798
- data/lib/spreadsheet/excel/writer/workbook.rb +672 -635
- data/lib/spreadsheet/excel/writer/worksheet.rb +899 -861
- data/lib/spreadsheet/excel/writer.rb +1 -1
- data/lib/spreadsheet/excel.rb +19 -12
- data/lib/spreadsheet/font.rb +31 -26
- data/lib/spreadsheet/format.rb +75 -59
- data/lib/spreadsheet/link.rb +8 -5
- data/lib/spreadsheet/note.rb +7 -6
- data/lib/spreadsheet/noteObject.rb +6 -5
- data/lib/spreadsheet/row.rb +35 -24
- data/lib/spreadsheet/version.rb +1 -1
- data/lib/spreadsheet/workbook.rb +28 -13
- data/lib/spreadsheet/worksheet.rb +103 -68
- data/lib/spreadsheet/writer.rb +3 -0
- data/lib/spreadsheet.rb +12 -15
- data/test/data/test_row_record_empty_range.xls +0 -0
- data/test/excel/reader.rb +8 -8
- data/test/excel/row.rb +35 -31
- data/test/excel/writer/workbook.rb +18 -16
- data/test/excel/writer/worksheet.rb +10 -8
- data/test/font.rb +44 -32
- data/test/format.rb +38 -33
- data/test/integration.rb +641 -598
- data/test/row.rb +5 -3
- data/test/suite.rb +7 -7
- data/test/workbook.rb +15 -14
- data/test/workbook_protection.rb +5 -5
- data/test/worksheet.rb +36 -34
- metadata +59 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spreadsheet/compatibility"
|
|
2
2
|
|
|
3
3
|
module Spreadsheet
|
|
4
4
|
##
|
|
@@ -6,155 +6,158 @@ module Spreadsheet
|
|
|
6
6
|
# attributes (boolean, colors and enumerations)
|
|
7
7
|
module Datatypes
|
|
8
8
|
include Compatibility
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
def self.append_features mod
|
|
10
11
|
super
|
|
11
12
|
mod.module_eval do
|
|
12
|
-
class << self
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
13
|
+
class << self
|
|
14
|
+
##
|
|
15
|
+
# Valid colors for color attributes.
|
|
16
|
+
COLORS = [:builtin_black, :builtin_white, :builtin_red, :builtin_green,
|
|
17
|
+
:builtin_blue, :builtin_yellow, :builtin_magenta, :builtin_cyan,
|
|
18
|
+
:text, :border, :pattern_bg, :dialog_bg, :chart_text, :chart_bg,
|
|
19
|
+
:chart_border, :tooltip_bg, :tooltip_text, :aqua,
|
|
20
|
+
:black, :blue, :cyan, :brown, :fuchsia, :gray, :grey, :green,
|
|
21
|
+
:lime, :magenta, :navy, :orange, :purple, :red, :silver, :white,
|
|
22
|
+
:yellow,
|
|
23
|
+
:xls_color_0,
|
|
24
|
+
:xls_color_1,
|
|
25
|
+
:xls_color_2,
|
|
26
|
+
:xls_color_3,
|
|
27
|
+
:xls_color_4,
|
|
28
|
+
:xls_color_5,
|
|
29
|
+
:xls_color_6,
|
|
30
|
+
:xls_color_7,
|
|
31
|
+
:xls_color_8,
|
|
32
|
+
:xls_color_9,
|
|
33
|
+
:xls_color_10,
|
|
34
|
+
:xls_color_11,
|
|
35
|
+
:xls_color_12,
|
|
36
|
+
:xls_color_13,
|
|
37
|
+
:xls_color_14,
|
|
38
|
+
:xls_color_15,
|
|
39
|
+
:xls_color_16,
|
|
40
|
+
:xls_color_17,
|
|
41
|
+
:xls_color_18,
|
|
42
|
+
:xls_color_19,
|
|
43
|
+
:xls_color_20,
|
|
44
|
+
:xls_color_21,
|
|
45
|
+
:xls_color_22,
|
|
46
|
+
:xls_color_23,
|
|
47
|
+
:xls_color_24,
|
|
48
|
+
:xls_color_25,
|
|
49
|
+
:xls_color_26,
|
|
50
|
+
:xls_color_27,
|
|
51
|
+
:xls_color_28,
|
|
52
|
+
:xls_color_29,
|
|
53
|
+
:xls_color_30,
|
|
54
|
+
:xls_color_31,
|
|
55
|
+
:xls_color_32,
|
|
56
|
+
:xls_color_33,
|
|
57
|
+
:xls_color_34,
|
|
58
|
+
:xls_color_35,
|
|
59
|
+
:xls_color_36,
|
|
60
|
+
:xls_color_37,
|
|
61
|
+
:xls_color_38,
|
|
62
|
+
:xls_color_39,
|
|
63
|
+
:xls_color_40,
|
|
64
|
+
:xls_color_41,
|
|
65
|
+
:xls_color_42,
|
|
66
|
+
:xls_color_43,
|
|
67
|
+
:xls_color_44,
|
|
68
|
+
:xls_color_45,
|
|
69
|
+
:xls_color_46,
|
|
70
|
+
:xls_color_47,
|
|
71
|
+
:xls_color_48,
|
|
72
|
+
:xls_color_49,
|
|
73
|
+
:xls_color_50,
|
|
74
|
+
:xls_color_51,
|
|
75
|
+
:xls_color_52,
|
|
76
|
+
:xls_color_53,
|
|
77
|
+
:xls_color_54,
|
|
78
|
+
:xls_color_55]
|
|
79
|
+
##
|
|
80
|
+
# Define instance methods to read and write boolean attributes.
|
|
81
|
+
def boolean *args
|
|
82
|
+
args.each do |key|
|
|
83
|
+
define_method key do
|
|
84
|
+
name = ivar_name key
|
|
85
|
+
!!(instance_variable_get(name) if instance_variables.include?(name))
|
|
86
|
+
end
|
|
87
|
+
define_method :"#{key}?" do
|
|
88
|
+
send key
|
|
89
|
+
end
|
|
90
|
+
define_method :"#{key}=" do |arg|
|
|
91
|
+
arg = false if arg == 0
|
|
92
|
+
instance_variable_set(ivar_name(key), !!arg)
|
|
93
|
+
end
|
|
94
|
+
define_method :"#{key}!" do
|
|
95
|
+
send :"#{key}=", true
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
##
|
|
101
|
+
# Define instance methods to read and write color attributes.
|
|
102
|
+
# For valid colors see COLORS
|
|
103
|
+
def colors *args
|
|
104
|
+
args.each do |key|
|
|
105
|
+
attr_reader key
|
|
106
|
+
define_method :"#{key}=" do |name|
|
|
107
|
+
name = name.to_s.downcase.to_sym
|
|
108
|
+
if COLORS.include?(name)
|
|
109
|
+
instance_variable_set ivar_name(key), name
|
|
110
|
+
else
|
|
111
|
+
raise ArgumentError, "unknown color '#{name}'"
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
##
|
|
118
|
+
# Define instance methods to read and write enumeration attributes.
|
|
119
|
+
# * The first argument designates the attribute name.
|
|
120
|
+
# * The second argument designates the default value.
|
|
121
|
+
# * All subsequent attributes are possible values.
|
|
122
|
+
# * If the last attribute is a Hash, each value in the Hash designates
|
|
123
|
+
# aliases for the corresponding key.
|
|
124
|
+
def enum key, *values
|
|
125
|
+
aliases = {}
|
|
126
|
+
if values.last.is_a? Hash
|
|
127
|
+
values.pop.each do |value, synonyms|
|
|
128
|
+
if synonyms.is_a? Array
|
|
129
|
+
synonyms.each { |synonym| aliases.store synonym, value }
|
|
130
|
+
else
|
|
131
|
+
aliases.store synonyms, value
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
values.each do |value|
|
|
136
|
+
aliases.store value, value
|
|
137
|
+
end
|
|
138
|
+
define_method key do
|
|
139
|
+
name = ivar_name key
|
|
140
|
+
value = instance_variable_get(name) if instance_variables.include? name
|
|
141
|
+
value || values.first
|
|
142
|
+
end
|
|
143
|
+
define_method :"#{key}=" do |arg|
|
|
144
|
+
if arg
|
|
145
|
+
arg = aliases.fetch arg do
|
|
146
|
+
aliases.fetch arg.to_s.downcase.gsub(/[ -]/, "_").to_sym, arg
|
|
147
|
+
end
|
|
148
|
+
if values.any? { |val| val === arg }
|
|
149
|
+
instance_variable_set(ivar_name(key), arg)
|
|
150
|
+
else
|
|
151
|
+
valid = values.collect { |val| val.inspect }.join ", "
|
|
152
|
+
raise ArgumentError,
|
|
153
|
+
"Invalid value '#{arg.inspect}' for #{key}. Valid values are: #{valid}"
|
|
154
|
+
end
|
|
155
|
+
else
|
|
156
|
+
instance_variable_set ivar_name(key), values.first
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
151
160
|
end
|
|
152
|
-
else
|
|
153
|
-
instance_variable_set ivar_name(key), values.first
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
end
|
|
158
161
|
end
|
|
159
162
|
end
|
|
160
163
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
# Spreadsheet::Encoding -- spreadheet -- 07.09.2011 -- mhatakeyama@ywesee.com
|
|
4
4
|
# Spreadsheet::Encoding -- spreadheet -- 03.07.2009 -- hwyss@ywesee.com
|
|
5
5
|
|
|
@@ -7,43 +7,47 @@ module Spreadsheet
|
|
|
7
7
|
##
|
|
8
8
|
# Methods for Encoding-conversions. You should not need to use any of these.
|
|
9
9
|
module Encodings
|
|
10
|
-
if RUBY_VERSION >=
|
|
11
|
-
def client string, internal=
|
|
10
|
+
if RUBY_VERSION >= "1.9"
|
|
11
|
+
def client string, internal = "UTF-16LE"
|
|
12
12
|
string = string.dup
|
|
13
13
|
string.force_encoding internal
|
|
14
14
|
string.encode Spreadsheet.client_encoding
|
|
15
15
|
end
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
def internal string, client = Spreadsheet.client_encoding
|
|
17
18
|
string = string.dup
|
|
18
19
|
string.force_encoding client
|
|
19
|
-
string.encode(
|
|
20
|
+
string.encode("UTF-16LE").force_encoding("ASCII-8BIT")
|
|
20
21
|
end
|
|
21
|
-
|
|
22
|
+
|
|
23
|
+
def utf8 string, client = Spreadsheet.client_encoding
|
|
22
24
|
string = string.dup
|
|
23
25
|
string.force_encoding client
|
|
24
|
-
string.encode(
|
|
26
|
+
string.encode("UTF-8")
|
|
25
27
|
end
|
|
26
28
|
else
|
|
27
|
-
require
|
|
29
|
+
require "iconv"
|
|
28
30
|
@@iconvs = {}
|
|
29
31
|
|
|
30
32
|
def build_output_encoding(to_encoding)
|
|
31
|
-
[to_encoding, Spreadsheet.enc_translit, Spreadsheet.enc_ignore].compact.join(
|
|
33
|
+
[to_encoding, Spreadsheet.enc_translit, Spreadsheet.enc_ignore].compact.join("//")
|
|
32
34
|
end
|
|
33
35
|
|
|
34
|
-
def client string, internal=
|
|
36
|
+
def client string, internal = "UTF-16LE"
|
|
35
37
|
string = string.dup
|
|
36
38
|
key = [Spreadsheet.client_encoding, internal]
|
|
37
39
|
iconv = @@iconvs[key] ||= Iconv.new(Spreadsheet.client_encoding, internal)
|
|
38
40
|
iconv.iconv string
|
|
39
41
|
end
|
|
40
|
-
|
|
42
|
+
|
|
43
|
+
def internal string, client = Spreadsheet.client_encoding, to_encoding = "UTF-16LE"
|
|
41
44
|
string = string.dup
|
|
42
45
|
key = [to_encoding, client]
|
|
43
46
|
iconv = @@iconvs[key] ||= Iconv.new(build_output_encoding(to_encoding), client)
|
|
44
47
|
iconv.iconv string
|
|
45
48
|
end
|
|
46
|
-
|
|
49
|
+
|
|
50
|
+
def utf8 string, client = Spreadsheet.client_encoding, to_encoding = "UTF-8"
|
|
47
51
|
string = string.dup
|
|
48
52
|
key = [to_encoding, client]
|
|
49
53
|
iconv = @@iconvs[key] ||= Iconv.new(build_output_encoding(to_encoding), client)
|
|
@@ -52,12 +56,12 @@ module Spreadsheet
|
|
|
52
56
|
end
|
|
53
57
|
rescue LoadError
|
|
54
58
|
warn "You don't have Iconv support compiled in your Ruby. Spreadsheet may not work as expected"
|
|
55
|
-
def client string, internal=
|
|
59
|
+
def client string, internal = "UTF-16LE"
|
|
56
60
|
string.delete "\0"
|
|
57
61
|
end
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
|
|
63
|
+
def internal string, internal = "UTF-16LE"
|
|
64
|
+
string.chars.zip(Array.new(string.size, 0.chr)).join
|
|
60
65
|
end
|
|
61
66
|
end
|
|
62
67
|
end
|
|
63
|
-
|
data/lib/spreadsheet/errors.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module Spreadsheet
|
|
2
2
|
# Custom errors raised by this gem, not errors from Excel
|
|
3
3
|
module Errors
|
|
4
|
-
BaseError
|
|
4
|
+
BaseError = Class.new(StandardError)
|
|
5
5
|
|
|
6
6
|
# A codepage not stored in Spreadsheet::Internals::CODEPAGES
|
|
7
|
-
UnknownCodepage
|
|
7
|
+
UnknownCodepage = Class.new(BaseError)
|
|
8
8
|
# The encoding can be known, but not supported by Ruby
|
|
9
9
|
UnsupportedEncoding = Class.new(BaseError)
|
|
10
10
|
end
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
module Spreadsheet
|
|
2
2
|
module Excel
|
|
3
|
-
##
|
|
4
|
-
# This class encapsulates Excel Error-Codes
|
|
5
|
-
class Error
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
end
|
|
3
|
+
##
|
|
4
|
+
# This class encapsulates Excel Error-Codes
|
|
5
|
+
class Error
|
|
6
|
+
attr_reader :code
|
|
7
|
+
ERROR_VALUES = {
|
|
8
|
+
0x00 => "#NULL!", # Intersection of two cell ranges is empty
|
|
9
|
+
0x07 => "#DIV/0!", # Division by zero
|
|
10
|
+
0x0F => "#VALUE!", # Wrong type of operand
|
|
11
|
+
0x17 => "#REF!", # Illegal or deleted cell reference
|
|
12
|
+
0x1D => "#NAME?", # Wrong function or range name
|
|
13
|
+
0x24 => "#NUM!", # Value range overflow
|
|
14
|
+
0x2A => "#N/A!" # Argument or function not available
|
|
15
|
+
}
|
|
16
|
+
def initialize code
|
|
17
|
+
@code = code
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
# The String value Excel associates with an Error code
|
|
22
|
+
def value
|
|
23
|
+
ERROR_VALUES.fetch @code, "#UNKNOWN"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
25
26
|
end
|
|
26
27
|
end
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
module Spreadsheet
|
|
2
2
|
module Excel
|
|
3
3
|
module Internals
|
|
4
|
-
##
|
|
5
|
-
# Binary Formats and other configurations internal to Biff5. This Module is
|
|
6
|
-
# likely to be expanded as Support for older Versions of Excel grows.
|
|
7
|
-
module Biff5
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
end
|
|
4
|
+
##
|
|
5
|
+
# Binary Formats and other configurations internal to Biff5. This Module is
|
|
6
|
+
# likely to be expanded as Support for older Versions of Excel grows.
|
|
7
|
+
module Biff5
|
|
8
|
+
BINARY_FORMATS = {
|
|
9
|
+
dimensions: "v5"
|
|
10
|
+
}
|
|
11
|
+
def binfmt key # :nodoc:
|
|
12
|
+
BINARY_FORMATS.fetch key do super end # standard:disable BlockSingleLineBraces
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
module Spreadsheet
|
|
2
2
|
module Excel
|
|
3
3
|
module Internals
|
|
4
|
-
##
|
|
5
|
-
# Binary Formats and other configurations internal to Biff8. This Module is
|
|
6
|
-
# likely to be expanded as Support for older Versions of Excel grows and more
|
|
7
|
-
# Binary formats are moved here for disambiguation.
|
|
8
|
-
module Biff8
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
end
|
|
4
|
+
##
|
|
5
|
+
# Binary Formats and other configurations internal to Biff8. This Module is
|
|
6
|
+
# likely to be expanded as Support for older Versions of Excel grows and more
|
|
7
|
+
# Binary formats are moved here for disambiguation.
|
|
8
|
+
module Biff8
|
|
9
|
+
BINARY_FORMATS = {
|
|
10
|
+
bof: "v4V2",
|
|
11
|
+
dimensions: "V2v2x2"
|
|
12
|
+
}
|
|
13
|
+
def binfmt key # :nodoc:
|
|
14
|
+
BINARY_FORMATS.fetch key do super end # standard:disable BlockSingleLineBraces
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
end
|