Skip to content

Commit

Permalink
Merge pull request #235 from stevendaniels/replace-hard-tabs
Browse files Browse the repository at this point in the history
Replace hard tabs with soft tabs
  • Loading branch information
stevendaniels committed Jul 8, 2015
2 parents 4adca5a + 1b1eb32 commit a27e2b8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 39 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@

## [0.2.4] - 2007-06-16
### Fixed
- ID 11605 Two cols with same value: crash roo (openoffice version only)
- ID 11605 Two cols with same value: crash roo (openoffice version only)

## [0.2.3] - 2007-06-02
### Changed / Added
Expand Down
19 changes: 10 additions & 9 deletions test/all_ss.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
require 'roo'
Dir.glob("test/files/*.ods").each do |fn|
begin
oo = Roo::OpenOffice.new fn
print File.basename(fn) + " "
puts oo.officeversion
rescue Zip::ZipError, Errno::ENOENT => e
# file is not a real .ods spreadsheet file
puts e.message
end

Dir.glob('test/files/*.ods').each do |fn|
begin
oo = Roo::OpenOffice.new fn
print "#{File.basename(fn)} "
puts oo.officeversion
rescue Zip::ZipError, Errno::ENOENT => e
# file is not a real .ods spreadsheet file
puts e.message
end
end
58 changes: 29 additions & 29 deletions test/test_roo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ def test_office_version
end

def test_libre_office
if LIBREOFFICE
if LIBREOFFICE
oo = Roo::LibreOffice.new(File.join(TESTDIR, "numbers1.ods"))
oo.default_sheet = oo.sheets.first
assert_equal 41, oo.cell('a',12)
end
end
end

def test_sheetname
Expand Down Expand Up @@ -479,17 +479,17 @@ def test_huge_document_to_csv
end

def test_bug_quotes_excelx
if LONG_RUN
if LONG_RUN
with_each_spreadsheet(:name=>'Bibelbund', :format=>[:openoffice, :excelx]) do |oo|
oo.default_sheet = oo.sheets.first
assert_equal 'Einflüsse der neuen Theologie in "de gereformeerde Kerken van Nederland"',
oo.cell('a',76)
oo.cell('a',76)
oo.to_csv("csv#{$$}")
assert_equal 'Einflüsse der neuen Theologie in "de gereformeerde Kerken van Nederland"',
oo.cell('a',78)
oo.cell('a',78)
File.delete_if_exist("csv#{$$}")
end
end
end
end

def test_bug_mehrere_datum
Expand Down Expand Up @@ -719,7 +719,7 @@ def test_find_by_conditions

#TODO: temporaerer Test
def test_seiten_als_date
if LONG_RUN
if LONG_RUN
with_each_spreadsheet(:name=>'Bibelbund', :format=>:excelx) do |oo|
assert_equal 'Bericht aus dem Sekretariat', oo.cell(13,1)
assert_equal '1981-4', oo.cell(13,'D')
Expand All @@ -728,7 +728,7 @@ def test_seiten_als_date
assert_equal '428', oo.excelx_value(13,'E')
assert_equal 428.0, oo.cell(13,'E')
end
end
end
end

def test_column
Expand Down Expand Up @@ -1387,9 +1387,9 @@ def test_labels
with_each_spreadsheet(:name=>'named_cells', :format=>[:openoffice,:excelx,:libreoffice]) do |oo|
# oo.default_sheet = oo.sheets.first
assert_equal [
['anton',[5,3,'Sheet1']],
['berta',[4,2,'Sheet1']],
['caesar',[7,2,'Sheet1']],
['anton',[5,3,'Sheet1']],
['berta',[4,2,'Sheet1']],
['caesar',[7,2,'Sheet1']],
], oo.labels, "error with labels array in class #{oo.class}"
end
end
Expand Down Expand Up @@ -1641,29 +1641,29 @@ def cell_postprocessing(row,col,value)
=end

def test_nil_rows_and_lines_csv
# x_123
if CSV
oo = Roo::CSV.new(File.join(TESTDIR,'Bibelbund.csv'))
oo.default_sheet = oo.sheets.first
assert_equal 1, oo.first_row
end
# x_123
if CSV
oo = Roo::CSV.new(File.join(TESTDIR,'Bibelbund.csv'))
oo.default_sheet = oo.sheets.first
assert_equal 1, oo.first_row
end
end

def test_bug_pfand_from_windows_phone_xlsx
return if defined? JRUBY_VERSION
with_each_spreadsheet(:name=>'Pfand_from_windows_phone', :format=>:excelx) do |oo|
oo.default_sheet = oo.sheets.first
assert_equal ['Blatt1','Blatt2','Blatt3'], oo.sheets
assert_equal 'Summe', oo.cell('b',1)

assert_equal Date.new(2011,9,14), oo.cell('a',2)
assert_equal :date, oo.celltype('a',2)
assert_equal Date.new(2011,9,15), oo.cell('a',3)
assert_equal :date, oo.celltype('a',3)

assert_equal 3.81, oo.cell('b',2)
assert_equal "SUM(C2:L2)", oo.formula('b',2)
assert_equal 0.7, oo.cell('c',2)
oo.default_sheet = oo.sheets.first
assert_equal ['Blatt1','Blatt2','Blatt3'], oo.sheets
assert_equal 'Summe', oo.cell('b',1)

assert_equal Date.new(2011,9,14), oo.cell('a',2)
assert_equal :date, oo.celltype('a',2)
assert_equal Date.new(2011,9,15), oo.cell('a',3)
assert_equal :date, oo.celltype('a',3)

assert_equal 3.81, oo.cell('b',2)
assert_equal "SUM(C2:L2)", oo.formula('b',2)
assert_equal 0.7, oo.cell('c',2)
end # each
end

Expand Down

0 comments on commit a27e2b8

Please sign in to comment.