diff options
| author | Randy Morgan <[email protected]> | 2012-02-21 08:20:28 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-02-21 08:20:28 +0900 |
| commit | 78f50d06d7ed41f57e87bd2eb7b304b642939306 (patch) | |
| tree | 6cf466e718923262dda7b64b57b4a224fc1a676e /lib/axlsx/stylesheet | |
| parent | 4e06bb2b6c824ccd6cff287666027619339ad21e (diff) | |
| download | caxlsx-78f50d06d7ed41f57e87bd2eb7b304b642939306.tar.gz caxlsx-78f50d06d7ed41f57e87bd2eb7b304b642939306.zip | |
specs for Jonathan Tron's applyBorder patch.
Diffstat (limited to 'lib/axlsx/stylesheet')
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index e8bcdbfb..633fbcad 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -199,6 +199,7 @@ module Axlsx end borderId = options[:border] || 0 + raise ArgumentError, "Invalid borderId" unless borderId < borders.size fill = if options[:bg_color] @@ -223,8 +224,8 @@ module Axlsx xf = Xf.new(:fillId => fill, :fontId=>fontId, :applyFill=>1, :applyFont=>1, :numFmtId=>numFmtId, :borderId=>borderId, :applyProtection=>applyProtection) - xf.applyBorder = true if borderId > 0 xf.applyNumberFormat = true if xf.numFmtId > 0 + xf.applyBorder = true if borderId > 0 if options[:alignment] xf.alignment = CellAlignment.new(options[:alignment]) |
