Class: OoxmlParser::TableLook

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb

Constant Summary

Constants inherited from OOXMLDocumentObject

OOXMLDocumentObject::DEFAULT_DIRECTORY_FOR_MEDIA

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, add_to_xmls_stack, copy_file_and_rename_to_zip, copy_media_file, current_xml, dir, encrypted_file?, get_link_from_rels, media_folder, option_enabled?, unzip_file

Constructor Details

#initializeTableLook

Returns a new instance of TableLook.



7
8
9
10
11
12
13
14
15
16
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 7

def initialize
  @first_row = false
  @first_column = false
  @last_row = false
  @last_column = false
  @banding_row = false
  @banding_column = false
  @no_horizontal_banding = false
  @no_horizontal_banding = false
end

Instance Attribute Details

#banding_columnObject

Returns the value of attribute banding_column.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def banding_column
  @banding_column
end

#banding_rowObject

Returns the value of attribute banding_row.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def banding_row
  @banding_row
end

#first_columnObject

Returns the value of attribute first_column.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def first_column
  @first_column
end

#first_rowObject

Returns the value of attribute first_row.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def first_row
  @first_row
end

#last_columnObject

Returns the value of attribute last_column.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def last_column
  @last_column
end

#last_rowObject

Returns the value of attribute last_row.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def last_row
  @last_row
end

#no_horizontal_bandingObject

Returns the value of attribute no_horizontal_banding.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def no_horizontal_banding
  @no_horizontal_banding
end

#no_vertical_bandingObject

Returns the value of attribute no_vertical_banding.



4
5
6
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 4

def no_vertical_banding
  @no_vertical_banding
end

Class Method Details

.parse(table_look_node) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb', line 18

def self.parse(table_look_node)
  table_look = TableLook.new
  table_look_node.attributes.each do |key, value|
    case key
    when 'firstRow'
      table_look.first_row = OOXMLDocumentObject.option_enabled?(value)
    when 'lastRow'
      table_look.last_row = OOXMLDocumentObject.option_enabled?(value)
    when 'firstCol', 'firstColumn'
      table_look.first_column = OOXMLDocumentObject.option_enabled?(value)
    when 'lastCol', 'lastColumn'
      table_look.last_column = OOXMLDocumentObject.option_enabled?(value)
    when 'noHBand'
      table_look.no_horizontal_banding = OOXMLDocumentObject.option_enabled?(value)
    when 'noVBand'
      table_look.no_vertical_banding = OOXMLDocumentObject.option_enabled?(value)
    when 'bandRow'
      table_look.banding_row = OOXMLDocumentObject.option_enabled?(value)
    when 'bandCol'
      table_look.banding_column = OOXMLDocumentObject.option_enabled?(value)
    end
  end
  table_look
end