Class: OoxmlParser::TableStyle
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableStyle
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb
Overview
Style of Table
Instance Attribute Summary collapse
-
#banding_1_horizontal ⇒ Object
Returns the value of attribute banding_1_horizontal.
-
#banding_1_vertical ⇒ Object
Returns the value of attribute banding_1_vertical.
-
#banding_2_horizontal ⇒ Object
Returns the value of attribute banding_2_horizontal.
-
#banding_2_vertical ⇒ Object
Returns the value of attribute banding_2_vertical.
-
#first_column ⇒ Object
Returns the value of attribute first_column.
-
#first_row ⇒ Object
Returns the value of attribute first_row.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_column ⇒ Object
Returns the value of attribute last_column.
-
#last_row ⇒ Object
Returns the value of attribute last_row.
-
#name ⇒ Object
Returns the value of attribute name.
-
#northeast_cell ⇒ Object
Returns the value of attribute northeast_cell.
-
#northwest_cell ⇒ Object
Returns the value of attribute northwest_cell.
-
#southeast_cell ⇒ Object
Returns the value of attribute southeast_cell.
-
#southwest_cell ⇒ Object
Returns the value of attribute southwest_cell.
-
#value ⇒ String
readonly
Value of table style.
-
#whole_table ⇒ Object
Returns the value of attribute whole_table.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ TableStyle
Parse TableStyle object.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#banding_1_horizontal ⇒ Object
Returns the value of attribute banding_1_horizontal.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def banding_1_horizontal @banding_1_horizontal end |
#banding_1_vertical ⇒ Object
Returns the value of attribute banding_1_vertical.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def banding_1_vertical @banding_1_vertical end |
#banding_2_horizontal ⇒ Object
Returns the value of attribute banding_2_horizontal.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def banding_2_horizontal @banding_2_horizontal end |
#banding_2_vertical ⇒ Object
Returns the value of attribute banding_2_vertical.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def banding_2_vertical @banding_2_vertical end |
#first_column ⇒ Object
Returns the value of attribute first_column.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def first_column @first_column end |
#first_row ⇒ Object
Returns the value of attribute first_row.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def first_row @first_row end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def id @id end |
#last_column ⇒ Object
Returns the value of attribute last_column.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def last_column @last_column end |
#last_row ⇒ Object
Returns the value of attribute last_row.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def last_row @last_row end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def name @name end |
#northeast_cell ⇒ Object
Returns the value of attribute northeast_cell.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def northeast_cell @northeast_cell end |
#northwest_cell ⇒ Object
Returns the value of attribute northwest_cell.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def northwest_cell @northwest_cell end |
#southeast_cell ⇒ Object
Returns the value of attribute southeast_cell.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def southeast_cell @southeast_cell end |
#southwest_cell ⇒ Object
Returns the value of attribute southwest_cell.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def southwest_cell @southwest_cell end |
#value ⇒ String (readonly)
Returns value of table style.
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 11 def value @value end |
#whole_table ⇒ Object
Returns the value of attribute whole_table.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 7 def whole_table @whole_table end |
Instance Method Details
#parse(node) ⇒ TableStyle
Parse TableStyle object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb', line 16 def parse(node) node.attributes.each do |key, value| case key when 'styleId' @id = value.value.to_s when 'styleName' @name = value.value.to_s when 'val' @value = value.value.to_s end end node.xpath('*').each do |style_node_child| case style_node_child.name when 'wholeTbl' @whole_table = TableElement.new(parent: self).parse(style_node_child) when 'band1H' @banding_1_horizontal = TableElement.new(parent: self).parse(style_node_child) when 'band2H', 'band2Horz' @banding_2_horizontal = TableElement.new(parent: self).parse(style_node_child) when 'band1V' @banding_1_vertical = TableElement.new(parent: self).parse(style_node_child) when 'band2V' @banding_2_vertical = TableElement.new(parent: self).parse(style_node_child) when 'lastCol' @last_column = TableElement.new(parent: self).parse(style_node_child) when 'firstCol' @first_column = TableElement.new(parent: self).parse(style_node_child) when 'lastRow' @last_row = TableElement.new(parent: self).parse(style_node_child) when 'firstRow' @first_row = TableElement.new(parent: self).parse(style_node_child) when 'seCell' @southeast_cell = TableElement.new(parent: self).parse(style_node_child) when 'swCell' @southwest_cell = TableElement.new(parent: self).parse(style_node_child) when 'neCell' @northeast_cell = TableElement.new(parent: self).parse(style_node_child) when 'nwCell' @northwest_cell = TableElement.new(parent: self).parse(style_node_child) end end self end |