roo 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/roo/openoffice.rb +4 -4
- data/lib/roo/version.rb +1 -1
- data/test/test_roo.rb +18 -1
- data/website/index.html +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/lib/roo/openoffice.rb
CHANGED
@@ -118,7 +118,7 @@ class Openoffice
|
|
118
118
|
@cell.each_pair {|key,value|
|
119
119
|
y,x = key.split(',')
|
120
120
|
y = y.to_i
|
121
|
-
result = [result, y].max
|
121
|
+
result = [result, y].max if value
|
122
122
|
}
|
123
123
|
result
|
124
124
|
end
|
@@ -130,7 +130,7 @@ class Openoffice
|
|
130
130
|
@cell.each_pair {|key,value|
|
131
131
|
y,x = key.split(',')
|
132
132
|
x = x.to_i
|
133
|
-
result = [result, x].max
|
133
|
+
result = [result, x].max if value
|
134
134
|
}
|
135
135
|
result
|
136
136
|
end
|
@@ -142,7 +142,7 @@ class Openoffice
|
|
142
142
|
@cell.each_pair {|key,value|
|
143
143
|
y,x = key.split(',')
|
144
144
|
y = y.to_i
|
145
|
-
result = [result, y].min
|
145
|
+
result = [result, y].min if value
|
146
146
|
}
|
147
147
|
result
|
148
148
|
end
|
@@ -154,7 +154,7 @@ class Openoffice
|
|
154
154
|
@cell.each_pair {|key,value|
|
155
155
|
y,x = key.split(',')
|
156
156
|
x = x.to_i
|
157
|
-
result = [result, x].min
|
157
|
+
result = [result, x].min if value
|
158
158
|
}
|
159
159
|
result
|
160
160
|
end
|
data/lib/roo/version.rb
CHANGED
data/test/test_roo.rb
CHANGED
@@ -4,7 +4,7 @@ class TestRoo < Test::Unit::TestCase
|
|
4
4
|
|
5
5
|
def test_sheets
|
6
6
|
oo = Openoffice.new("test/numbers1.ods")
|
7
|
-
assert_equal ["Tabelle1","
|
7
|
+
assert_equal ["Tabelle1","Name of Sheet 2","Sheet3"], oo.sheets
|
8
8
|
end
|
9
9
|
|
10
10
|
def test_cell
|
@@ -111,4 +111,21 @@ class TestRoo < Test::Unit::TestCase
|
|
111
111
|
oo.default_sheet = oo.sheets.first
|
112
112
|
assert_equal 'A', oo.first_column_as_letter
|
113
113
|
end
|
114
|
+
|
115
|
+
def test_sheetname
|
116
|
+
oo = Openoffice.new("test/numbers1.ods")
|
117
|
+
oo.default_sheet = "Name of Sheet 2"
|
118
|
+
assert_equal 'I am sheet 2', oo.cell('C',5)
|
119
|
+
end
|
120
|
+
|
121
|
+
def test_boundaries
|
122
|
+
oo = Openoffice.new("test/numbers1.ods")
|
123
|
+
oo.default_sheet = "Name of Sheet 2"
|
124
|
+
assert true
|
125
|
+
assert_equal 2, oo.first_column
|
126
|
+
assert_equal 'B', oo.first_column_as_letter
|
127
|
+
assert_equal 5, oo.first_row
|
128
|
+
assert_equal 'E', oo.last_column_as_letter
|
129
|
+
assert_equal 14, oo.last_row
|
130
|
+
end
|
114
131
|
end
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>roo</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/roo"; return false'>
|
35
35
|
Get Version
|
36
|
-
<a href="http://rubyforge.org/projects/roo" class="numbers">0.1.
|
36
|
+
<a href="http://rubyforge.org/projects/roo" class="numbers">0.1.1</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
metadata
CHANGED