diff options
| author | Randy Morgan <[email protected]> | 2012-05-04 12:26:04 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-04 12:26:04 +0900 |
| commit | f6a2ddc9e84e37d02aefc7f69bb2e3c72698d165 (patch) | |
| tree | d3fd2516953db13c75102965f6738bc2b5c2e90e /lib | |
| parent | 50c365898f1a5389f32ab881d3bce127367c1f36 (diff) | |
| download | caxlsx-f6a2ddc9e84e37d02aefc7f69bb2e3c72698d165.tar.gz caxlsx-f6a2ddc9e84e37d02aefc7f69bb2e3c72698d165.zip | |
add comment relationship type
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/util/constants.rb | 3 | ||||
| -rw-r--r-- | lib/axlsx/util/validators.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb index 0699a482..ca794499 100644 --- a/lib/axlsx/util/constants.rb +++ b/lib/axlsx/util/constants.rb @@ -79,6 +79,9 @@ module Axlsx # image rels namespace HYPERLINK_R = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" + # comment rels namespace + COMMENT_R = "http://purl.oclc.org/ooxml/officeDocument/relationships/comments" + # table content type TABLE_CT = "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml" diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index 48f99877..7b0a74a6 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -179,7 +179,7 @@ module Axlsx # XML_NS_R, TABLE_R, WORKBOOK_R, WORKSHEET_R, APP_R, RELS_R, CORE_R, STYLES_R, CHART_R, DRAWING_R, IMAGE_R, HYPERLINK_R, SHARED_STRINGS_R are allowed # @param [Any] v The value validated def self.validate_relationship_type(v) - RestrictionValidator.validate :relationship_type, [XML_NS_R, TABLE_R, WORKBOOK_R, WORKSHEET_R, APP_R, RELS_R, CORE_R, STYLES_R, CHART_R, DRAWING_R, IMAGE_R, HYPERLINK_R, SHARED_STRINGS_R], v + RestrictionValidator.validate :relationship_type, [XML_NS_R, TABLE_R, WORKBOOK_R, WORKSHEET_R, APP_R, RELS_R, CORE_R, STYLES_R, CHART_R, DRAWING_R, IMAGE_R, HYPERLINK_R, SHARED_STRINGS_R, COMMENT_R], v end # Requires that the value is a valid table element type |
