summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/util/validators.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-11-08 08:10:36 +0900
committerRandy Morgan <[email protected]>2012-11-08 08:10:36 +0900
commitd18170cd86810a6210905b7ab8ed104b6103d877 (patch)
tree7ffabea376a31095025241ef818131be87943f77 /lib/axlsx/util/validators.rb
parent887734c808438f30f419c5c26598e2f42ee01242 (diff)
downloadcaxlsx-d18170cd86810a6210905b7ab8ed104b6103d877.tar.gz
caxlsx-d18170cd86810a6210905b7ab8ed104b6103d877.zip
fixed cell text run validation for u and family
Diffstat (limited to 'lib/axlsx/util/validators.rb')
-rw-r--r--lib/axlsx/util/validators.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb
index 9c1ec741..55a49e72 100644
--- a/lib/axlsx/util/validators.rb
+++ b/lib/axlsx/util/validators.rb
@@ -140,7 +140,14 @@ module Axlsx
def self.validate_page_orientation(v)
RestrictionValidator.validate "page_orientation", [:default, :landscape, :portrait], v
end
+ # Requires that the value is one of :none, :single, :double, :singleAccounting, :doubleAccounting
+ def self.validate_cell_u(v)
+ RestrictionValidator.validate "cell run style u", [:none, :single, :double, :singleAccounting, :doubleAccounting], v
+ end
+ def self.validate_family(v)
+ RestrictionValidator.validate "cell run style family", 1..5, v
+ end
# Requires that the value is valid pattern type.
# valid pattern types must be one of :none, :solid, :mediumGray, :darkGray, :lightGray, :darkHorizontal, :darkVertical, :darkDown,
# :darkUp, :darkGrid, :darkTrellis, :lightHorizontal, :lightVertical, :lightDown, :lightUp, :lightGrid, :lightTrellis, :gray125, or :gray0625.