diff options
| author | Randy Morgan <[email protected]> | 2012-03-14 07:03:26 -0700 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-03-14 07:03:26 -0700 |
| commit | 5d27ba1cc1841c92b26190b82382fcb21ac1b431 (patch) | |
| tree | 081eab1224185ac781a6a1ae1e85822af577bc78 | |
| parent | f9f5f3c9486a8202f1639dfe91e4e3410b1ee857 (diff) | |
| parent | 5c680582c20a2f976daeceaaab5b326f70d5f466 (diff) | |
| download | caxlsx-5d27ba1cc1841c92b26190b82382fcb21ac1b431.tar.gz caxlsx-5d27ba1cc1841c92b26190b82382fcb21ac1b431.zip | |
Merge pull request #51 from ochko/master
applyAlignment should be included in xf
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 1 | ||||
| -rw-r--r-- | test/stylesheet/tc_styles.rb | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index 955a8b1e..1c59bcfd 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -230,6 +230,7 @@ module Axlsx if options[:alignment] xf.alignment = CellAlignment.new(options[:alignment]) + xf.applyAlignment = true end if applyProtection diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb index df180b61..1b7365b2 100644 --- a/test/stylesheet/tc_styles.rb +++ b/test/stylesheet/tc_styles.rb @@ -49,8 +49,8 @@ class TestStyles < Test::Unit::TestCase 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 |
