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.18.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.17.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.16.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.15.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.14.2 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.14.1-mingw32 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.14.1 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.14.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.13.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.12.2 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.12.1 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.12.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.11.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.10.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.9.1 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.9.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.8.1 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.8.0 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.7.2 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb
ooxml_parser-0.7.1 lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb