Parse ChartLegend object
 @param node [Nokogiri::XML:Element] node to parse
 @return [ChartLegend] result of parsing
350612
def parse(node)
      node.xpath('*').each do |child_node|
        case child_node.name
        when 'legendPos'
          @position = value_to_symbol(child_node.attribute('val'))
        when 'overlay'
          @overlay = true if child_node.attribute('val').value.to_s == '1'
        end
      end
      self
    end
967064
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'barChart'
          @bar_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'lineChart'
          @line_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'areaChart'
          @area_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'bubbleChart'
          @bubble_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'doughnutChart'
          @doughnut_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'pieChart'
          @pie_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'scatterChart'
          @scatter_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'radarChart'
          @radar_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'stockChart'
          @stock_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'surface3DChart'
          @surface_3d_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'line3DChart'
          @line_3d_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'bar3DChart'
          @bar_3d_chart = CommonChartData.new(parent: self).parse(node_child)
        when 'pie3DChart'
          @pie_3d_chart = CommonChartData.new(parent: self).parse(node_child)
        end
      end
      self
    end
114105
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'shape'
          @type = :shape
          @data = OldDocxShape.new(parent: self).parse(node_child)
        when 'group'
          @type = :group
          @data = OldDocxGroup.new(parent: self).parse(node_child)
        when 'style'
          @style_number = node_child.attribute('val').value.to_i
        end
      end
      self
    end
33179
def parse(node)
      @borders = true if node.name == 'borderBox'
      @element = MathRun.new(parent: self).parse(node)
      self
    end
460000
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'ref'
          @reference = Coordinates.parser_coordinates_range(value.value.to_s)
        when 'si'
          @string_index = value.value.to_i
        when 't'
          @type = value.value.to_s
        end
      end

      @value = node.text unless node.text.empty?
      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
196396
def parse(node)
      @fill = PresentationFill.new(parent: self).parse(node)
      @line_join = LineJoin.new(parent: self).parse(node)
      node.attributes.each do |key, value|
        case key
        when 'w'
          @width = OoxmlSize.new(value.value.to_f, :emu)
        when 'algn'
          @align = value_to_symbol(value)
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'headEnd'
          @head_end = LineEnd.new(parent: self).parse(node_child)
        when 'tailEnd'
          @tail_end = LineEnd.new(parent: self).parse(node_child)
        when 'ln'
          return TableCellLine.new(parent: self).parse(node_child)
        end
      end
      self
    end
834922
def parse_content(node)
      content = if node.children.empty?
        node.content
      else
        parse_nodes(node.children)
      end
    end
673752
def parse(node)
      @type = node.name.to_sym
      case node.name
      when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
      when 'cut', 'fade'
        @through_black = option_enabled?(node, 'thruBlk')
      when 'split'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
        @orientation = node.attribute('orient').value.to_sym if node.attribute('orient')
      when 'wheel', 'wheelReverse'
        @spokes = option_enabled?(node, 'spokes')
      end
      self
    end
1175568
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'dPr'
          node_child.xpath('*').each do |node_child_child|
            case node_child_child.name
            when 'begChr'
              @begin_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            when 'endChr'
              @end_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            end
          end
        end
      end
      @value = DocxFormula.new(parent: self).parse(node)
      self
    end
1031398
def parse(node)
      unless node.attribute('behindDoc').nil?
        @wrap_text = :behind if node.attribute('behindDoc').value == '1'
        @wrap_text = :infront if node.attribute('behindDoc').value == '0'
      end
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'wrapSquare'
          @wrap_text = :square
          @distance_from_text = DocxDrawingDistanceFromText.new(parent: self).parse(node_child)
          break
        when 'wrapTight'
          @wrap_text = :tight
          @distance_from_text = DocxDrawingDistanceFromText.new(parent: self).parse(node_child)
          break
        when 'wrapThrough'
          @wrap_text = :through
          @distance_from_text = DocxDrawingDistanceFromText.new(parent: self).parse(node_child)
          break
        when 'wrapTopAndBottom'
          @wrap_text = :topbottom
          @distance_from_text = DocxDrawingDistanceFromText.new(parent: self).parse(node_child)
          break
        end
      end
      self
    end
943652
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'sdtContent'
          @sdt_content = SDTContent.new(parent: self).parse(node_child)
        when 'sdtPr'
          @properties = SDTProperties.new(parent: self).parse(node_child)
        end
      end
      self
    end
1275941
def parse(node)
      @color1 = Color.new(parent: self).parse_hex_string(node.attribute('color').value)
      node.xpath('v:background').each do |second_color|
        @size = second_color.attribute('targetscreensize').value.sub(',', 'x') unless second_color.attribute('targetscreensize').nil?
        second_color.xpath('*').each do |node_child|
          case node_child.name
          when 'fill'
            @fill = Fill.new(parent: self).parse(node_child)
          end
        end
      end
      self
    end
632322
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'dLblPos'
          @position = value_to_symbol(node_child.attribute('val'))
        when 'showLegendKey'
          @show_legend_key = true if node_child.attribute('val').value == '1'
        when 'showVal'
          @show_values = true if node_child.attribute('val').value == '1'
        when 'showCatName'
          @show_category_name = option_enabled?(node_child)
        when 'showSerName'
          @show_series_name = option_enabled?(node_child)
        when 'delete'
          @delete = option_enabled?(node_child)
        end
      end
      self
    end
930682
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'relativeFrom'
          @relative_from = value_to_symbol(value)
        end
      end

      node.xpath('*').each do |preset_geometry_child|
        case preset_geometry_child.name
        when 'pctHeight'
          @height = PictureDimension.new(parent: self).parse(preset_geometry_child)
        end
      end

      self
    end
1095948
def parse(node)
      node.xpath('*').each do |series_child|
        case series_child.name
        when 'strRef'
          @string = NumberStringReference.new(parent: self).parse(series_child)
        end
      end
      self
    end
1222264
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'rot'
          @rotation = value.value.to_f
        when 'flipH'
          @flip_horizontal = attribute_enabled?(value)
        when 'flipV'
          @flip_vertical = attribute_enabled?(value)
        end
      end
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'off'
          @offset = OOXMLCoordinates.parse(node_child, unit: :emu)
        when 'ext'
          @extent = OOXMLCoordinates.parse(node_child, x_attr: 'cx', y_attr: 'cy', unit: :emu)
        when 'chOff'
          @child_offset = OOXMLCoordinates.parse(node_child, unit: :emu)
        when 'chExt'
          @child_extent = OOXMLCoordinates.parse(node_child, x_attr: 'cx', y_attr: 'cy', unit: :emu)
        end
      end
      self
    end