lib/roo/openoffice.rb in roo-0.5.3 vs lib/roo/openoffice.rb in roo-0.5.4
- old
+ new
@@ -467,13 +467,11 @@
v = str.text
end
end
end
if skip
- if v == nil
- x += (skip.to_i - 1)
- else
+ if v != nil
0.upto(skip.to_i-1) do |i|
@cell_type["#{y},#{x+i}"] = Openoffice.oo_type_2_roo_type(vt)
@formula["#{y},#{x+i}"] = formula if formula
if @cell_type["#{y},#{x+i}"] == :float
@cell["#{y},#{x+i}"] = v.to_f
@@ -483,11 +481,11 @@
@cell["#{y},#{x+i}"] = tr.attributes['date-value']
else
@cell["#{y},#{x+i}"] = v
end
end
- x += 1
end
+ x += (skip.to_i - 1)
end # if skip
@formula["#{y},#{x}"] = formula if formula
@cell_type["#{y},#{x}"] = Openoffice.oo_type_2_roo_type(vt)
if @cell_type["#{y},#{x}"] == :float
@cell["#{y},#{x}"] = v.to_f