Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

include applyAlignment attribute when adding style

  • Loading branch information...
commit 5c680582c20a2f976daeceaaab5b326f70d5f466 1 parent f9f5f3c
@ochko ochko authored
Showing with 3 additions and 2 deletions.
  1. +1 −0  lib/axlsx/stylesheet/styles.rb
  2. +2 −2 test/stylesheet/tc_styles.rb
View
1  lib/axlsx/stylesheet/styles.rb
@@ -230,6 +230,7 @@ def add_style(options={})
if options[:alignment]
xf.alignment = CellAlignment.new(options[:alignment])
+ xf.applyAlignment = true
end
if applyProtection
View
4 test/stylesheet/tc_styles.rb
@@ -49,8 +49,8 @@ def test_add_style
assert_equal(xf.applyProtection, 1, "protection applied")
assert_equal(xf.applyBorder, true, "border applied")
- assert_equal(xf.applyNumberFormat, true, "border applied")
-
+ assert_equal(xf.applyNumberFormat, true, "number format applied")
+ assert_equal(xf.applyAlignment, true, "alignment applied")
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.