Parse DocxPatternFill object
 @param node [Nokogiri::XML:Element] node to parse
 @return [DocxPatternFill] result of parsing
194668
def parse(node)
      @preset = node.attribute('prst').value.to_sym
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'fgClr'
          @foreground_color = Color.new(parent: self).parse_color_model(node_child)
        when 'bgClr'
          @background_color = Color.new(parent: self).parse_color_model(node_child)
        end
      end
      self
    end
1226777
def parse(node)
      link_to_table_part_xml = OOXMLDocumentObject.get_link_from_rels(node.attribute('id').value)
      doc = parse_xml(OOXMLDocumentObject.path_to_folder + link_to_table_part_xml.gsub('..', 'xl'))
      table_node = doc.xpath('xmlns:table').first
      table_node.attributes.each do |key, value|
        case key
        when 'name'
          @name = value.value.to_s
        when 'displayName'
          @display_name = value.value.to_s
        when 'ref'
          @reference = Coordinates.parser_coordinates_range value.value.to_s
        end
      end
      table_node.xpath('*').each do |node_child|
        case node_child.name
        when 'autoFilter'
          @autofilter = Autofilter.new(parent: self).parse(node_child)
        when 'extLst'
          @extension_list = ExtensionList.new(parent: self).parse(node_child)
        when 'tableColumns'
          @table_columns = TableColumns.new(parent: self).parse(node_child)
        when 'tableStyleInfo'
          @table_style_info = TableStyleInfo.new(parent: self).parse(node_child)
        end
      end
      self
    end
1310922
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'num'
          @count = value.value.to_i
        when 'sep'
          @separator = value.value
        when 'equalWidth'
          @equal_width = option_enabled?(node, 'equalWidth')
        when 'space'
          @space = OoxmlSize.new(value.value.to_f)
        end
      end

      node.xpath('*').each do |column_node|
        case column_node.name
        when 'col'
          @column_array << Column.new(parent: self).parse(column_node)
        end
      end
      self
    end
46561
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'name'
          @name = node_child.attribute('val').value
        when 'qFormat'
          @q_format = option_enabled?(node_child)
        end
      end
      self
    end
748579
def parse(node, unit = :dxa)
      node.attributes.each do |key, value|
        case key
        when 'top'
          @top = OoxmlSize.new(value.value.to_f, unit)
        when 'left'
          @left = OoxmlSize.new(value.value.to_f, unit)
        when 'right'
          @right = OoxmlSize.new(value.value.to_f, unit)
        when 'bottom'
          @bottom = OoxmlSize.new(value.value.to_f, unit)
        when 'header'
          @header = OoxmlSize.new(value.value.to_f, unit)
        when 'footer'
          @footer = OoxmlSize.new(value.value.to_f, unit)
        when 'gutter'
          @gutter = OoxmlSize.new(value.value.to_f, unit)
        end
      end
      self
    end
104076
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'sp'
          @elements << DocxShape.new(parent: self).parse(node_child).dup
        when 'pic'
          @elements << DocxPicture.new(parent: self).parse(node_child)
        when 'graphicFrame'
          @elements << GraphicFrame.new(parent: self).parse(node_child)
        when 'grpSp'
          @elements << ShapesGrouping.new(parent: self).parse(node_child)
        when 'cxnSp'
          @elements << ConnectionShape.new(parent: self).parse(node_child)
        end
      end
      self
    end
1349414
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'spTree'
          @shape_tree = ShapeTree.new(parent: self).parse(node_child)
        when 'bg'
          @background = Background.new(parent: self).parse(node_child)
        end
      end
      self
    end
744392
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'ilvl'
          @ilvl = value.value.to_f
        end
      end

      node.xpath('*').each do |num_level_child|
        case num_level_child.name
        when 'start'
          @start = ValuedChild.new(:integer, parent: self).parse(num_level_child)
        when 'numFmt'
          @numbering_format = NumberingFormat.new(parent: self).parse(num_level_child)
        when 'lvlText'
          @text = LevelText.new(parent: self).parse(num_level_child)
        when 'lvlJc'
          @justification = LevelJustification.new(parent: self).parse(num_level_child)
        when 'pPr'
          @paragraph_properties = ParagraphProperties.new(parent: self).parse(num_level_child)
        when 'rPr'
          @run_properties = RunProperties.new(parent: self).parse(num_level_child)
        when 'suff'
          @suffix = @suffix.parse(num_level_child)
        end
      end

      self
    end
29726
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'min'
          @from = value.value.to_i
        when 'max'
          @to = value.value.to_i
        when 'style'
          @style = root_object.style_sheet.cell_xfs.xf_array[value.value.to_i]
        when 'width'
          @width = value.value.to_f - 0.7109375
        when 'customWidth'
          @custom_width = option_enabled?(node, 'customWidth')
        when 'bestFit'
          @best_fit = attribute_enabled?(value)
        when 'hidden'
          @hidden = attribute_enabled?(value)
        end
      end
      self
    end
313314
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'tableStyleId'
          @table_style_id = node_child.text
        when 'tblBorders'
          @table_borders = TableBorders.new(parent: self).parse(node_child)
        when 'tblStyle'
          # TODO: Incorrect but to keep compatibility
          @table_style_element = TableStyle.new(parent: self).parse(node_child)
        when 'tblW'
          @table_width = OoxmlSize.new.parse(node_child)
        when 'jc'
          @jc = node_child.attribute('val').text.to_sym
        when 'shd'
          @shade = Shade.new(parent: self).parse(node_child)
        when 'solidFill'
          @fill = PresentationFill.new(parent: self).parse(node)
        when 'tblLook'
          @table_look = TableLook.new(parent: self).parse(node_child)
        when 'tblInd'
          @table_indent = OoxmlSize.new(node_child.attribute('w').text.to_f)
        when 'tblpPr'
          @table_positon = TablePosition.new(parent: self).parse(node_child)
        when 'tblCellMar'
          @table_cell_margin = TableMargins.new(parent: table_properties).parse(node_child)
        when 'tblStyleColBandSize'
          @table_style_column_band_size = TableStyleColumnBandSize.new(parent: self).parse(node_child)
        when 'tblStyleRowBandSize'
          @table_style_row_band_size = TableStyleRowBandSize.new(parent: self).parse(node_child)
        when 'tblLayout'
          @table_layout = TableLayout.new(parent: self).parse(node_child)
        when 'tblCellSpacing'
          @table_cell_spacing = OoxmlSize.new.parse(node_child)
        when 'tblCaption'
          @caption = ValuedChild.new(:string, parent: self).parse(node_child)
        when 'tblDescription'
          @description = ValuedChild.new(:string, parent: self).parse(node_child)
        end
      end
      @table_look = TableLook.new(parent: self).parse(node) if @table_look.nil?
      self
    end
909324
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 's'
          @style_index = value.value.to_i
        when 't'
          @type = value.value.to_s
        end
      end
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'f'
          @formula = Formula.new(parent: self).parse(node_child)
        when 'v'
          @value = TextValue.new(parent: self).parse(node_child)
        end
      end
      parse_text_data
      self
    end
205578
def parse(node)
      blip_node = node.xpath('a:blip', 'xmlns:a' => 'http://schemas.openxmlformats.org/drawingml/2006/main').first
      return self if blip_node.nil?

      @file_reference = FileReference.new(parent: self).parse(blip_node)
      self
    end
834922
def parse_content(node)
      content = if node.children.empty?
        node.content
      else
        parse_nodes(node.children)
      end
    end
282658
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'nvSpPr'
          @non_visual_properties = NonVisualShapeProperties.new(parent: self).parse(node_child)
        when 'spPr'
          @properties = DocxShapeProperties.new(parent: self).parse(node_child)
        when 'txbx'
          @text_body = OOXMLTextBox.new(parent: self).parse(node_child)
        when 'txBody'
          @text_body = TextBody.new(parent: self).parse(node_child)
        when 'bodyPr'
          @body_properties = OOXMLShapeBodyProperties.new(parent: self).parse(node_child)
        end
      end
      self
    end
864123
def parse(node)
      node.xpath('*').each do |math_run_child|
        case math_run_child.name
        when 'rPr'
          @properties = MathRunProperties.new(parent: self).parse(math_run_child)
        when 't'
          @text = math_run_child.text
        end
      end
      self
    end
1027319
def parse(node)
      @id = node.attribute('id').value.to_i
      parse_type(node)
      doc = parse_xml(OOXMLDocumentObject.path_to_folder + xml_path)
      doc.search(xpath_for_search).each do |footnote|
        next unless footnote.attribute('id').value.to_i == @id

        paragraph_number = 0
        footnote.xpath('w:p').each do |paragraph|
          @elements << DocumentStructure.default_paragraph_style.dup.parse(paragraph, paragraph_number, DocumentStructure.default_run_style, parent: self)
          paragraph_number += 1
        end
      end
      self
    end
1287932
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'style'
          @style_number = node_child.attribute('val').value.to_i
        when 'oleObject'
          @ole_object = OleObject.new(parent: self).parse(node_child)
        end
      end
      self
    end