Skip to content

Commit

Permalink
fix xls/xlsx so they read the row|column defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
--unset committed Feb 24, 2009
1 parent 599e04b commit ce722e6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
Binary file modified test/style.xls
Binary file not shown.
Binary file modified test/style.xlsx
Binary file not shown.
43 changes: 20 additions & 23 deletions test/test_roo.rb
Expand Up @@ -4907,39 +4907,36 @@ def verify_cell_fonts(oo)
assert_equal true, oo.font(7,1).italic?
assert_equal true, oo.font(7,1).underline?

# bolded row
assert_equal true, oo.font(8,1).bold?
assert_equal false, oo.font(8,1).italic?
assert_equal false, oo.font(8,1).underline?


# bolded col
assert_equal true, oo.font(9,2).bold?
assert_equal false, oo.font(9,2).italic?
assert_equal false, oo.font(9,2).underline?

# bolded row, italic col
assert_equal true, oo.font(10,3).bold?
assert_equal true, oo.font(10,3).italic?
assert_equal false, oo.font(10,3).underline?

# normal
assert_equal false, oo.font(11,4).bold?
assert_equal false, oo.font(11,4).italic?
assert_equal false, oo.font(11,4).underline?
end

def test_cell_styles
if OPENOFFICE
oo = Openoffice.new(File.join(TESTDIR,"style.ods"))
verify_cell_fonts(oo)

# bolded row
assert_equal true, oo.font(8,1).bold?
assert_equal false, oo.font(8,1).italic?
assert_equal false, oo.font(8,1).underline?

# bolded col
assert_equal true, oo.font(9,2).bold?
assert_equal false, oo.font(9,2).italic?
assert_equal false, oo.font(9,2).underline?

# bolded row, italic col
assert_equal true, oo.font(10,3).bold?
assert_equal true, oo.font(10,3).italic?
assert_equal false, oo.font(10,3).underline?

# normal
assert_equal false, oo.font(11,4).bold?
assert_equal false, oo.font(11,4).italic?
assert_equal false, oo.font(11,4).underline?
end
if EXCELX
oo = Excelx.new(File.join(TESTDIR,"style.xlsx"))
verify_cell_fonts(oo)
end
verify_cell_fonts(oo)
end
if EXCEL
oo = Excel.new(File.join(TESTDIR,"style.xls"))
verify_cell_fonts(oo)
Expand Down

0 comments on commit ce722e6

Please sign in to comment.