Sha256: 060ccc717f6282df88d483425f3910f4a6684ccbbefadb0f9d15c4b6a6c6270f

Contents?: true

Size: 931 Bytes

Versions: 44

Compression:

Stored size: 931 Bytes

Contents

# frozen_string_literal: true

require_relative 'old_docx_shape_properties'
module OoxmlParser
  # Fallback DOCX shape data
  class OldDocxShape < OOXMLDocumentObject
    attr_accessor :properties, :text_box, :fill
    # @return [FileReference] image structure
    attr_accessor :file_reference

    # Parse OldDocxShape object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [OldDocxShape] result of parsing
    def parse(node)
      @properties = OldDocxShapeProperties.new(parent: self).parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'textbox'
          @text_box = TextBox.parse_list(node_child, parent: self)
        when 'imagedata'
          @file_reference = FileReference.new(parent: self).parse(node_child)
        when 'fill'
          @fill = OldDocxShapeFill.new(parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
ooxml_parser-0.35.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.34.2 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.34.1 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.34.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.33.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.32.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.31.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.30.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.29.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.28.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.27.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.26.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.25.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.24.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.23.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.22.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.21.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.20.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.19.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.18.1 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb