Sha256: b620dbb491664aa2c8fef7f6b6be14918af5898b6c3f78cad1672c762d96bee3
Contents?: true
Size: 940 Bytes
Versions: 2
Compression:
Stored size: 940 Bytes
Contents
# Docx Shape Body Properties require_relative 'ooxml_shape_body_properties/preset_text_warp' module OoxmlParser class OOXMLShapeBodyProperties < OOXMLDocumentObject attr_accessor :margins, :anchor, :wrap, :preset_text_warp alias vertical_align anchor def self.parse(body_pr_node) body_properties = OOXMLShapeBodyProperties.new body_properties.margins = ParagraphMargins.parse(body_pr_node) body_pr_node.attributes.each do |key, value| case key when 'wrap' body_properties.wrap = value.value.to_sym when 'anchor' body_properties.anchor = Alignment.parse(value) end end body_pr_node.xpath('*').each do |body_properties_child| case body_properties_child.name when 'prstTxWarp' body_properties.preset_text_warp = PresetTextWarp.parse(body_properties_child) end end body_properties end end end
Version data entries
2 entries across 2 versions & 1 rubygems