Sha256: 00b69bd1a2c4631aeb05629ff56cae9c6ab4db16eb76c4d9776bf2fd7e998587

Contents?: true

Size: 602 Bytes

Versions: 4

Compression:

Stored size: 602 Bytes

Contents

module OoxmlParser
  # Docx Drawing Distance From Text
  class DocxDrawingDistanceFromText < OOXMLDocumentObject
    attr_accessor :top, :bottom, :left, :right

    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'distT'
          @top = OoxmlSize.new(value.value.to_f, :emu)
        when 'distB'
          @bottom = OoxmlSize.new(value.value.to_f, :emu)
        when 'distL'
          @left = OoxmlSize.new(value.value.to_f, :emu)
        when 'distR'
          @right = OoxmlSize.new(value.value.to_f, :emu)
        end
      end
      self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ooxml_parser-0.4.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_distance_from_text.rb
ooxml_parser-0.4.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_distance_from_text.rb
ooxml_parser-0.3.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_distance_from_text.rb
ooxml_parser-0.2.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_distance_from_text.rb