Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit ce722e656a5e04723c4a7415fc3a0a681b2a21f0 1 parent 599e04b
Hugh McGowan authored
BIN  test/style.xls
View
Binary file not shown
BIN  test/style.xlsx
View
Binary file not shown
43 test/test_roo.rb
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.