Permalink
Browse files

fix xls/xlsx so they read the row|column defaults

  • Loading branch information...
1 parent 599e04b commit ce722e656a5e04723c4a7415fc3a0a681b2a21f0 --unset committed Feb 24, 2009
Showing with 20 additions and 23 deletions.
  1. BIN test/style.xls
  2. BIN test/style.xlsx
  3. +20 −23 test/test_roo.rb
View
BIN test/style.xls
Binary file not shown.
View
BIN test/style.xlsx
Binary file not shown.
View
43 test/test_roo.rb
@@ -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)

0 comments on commit ce722e6

Please sign in to comment.