Sha256: d363bfb9e9eb0f1d6bf50a04b970e49273024b4ef40f339b3482229d77ed5d70

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

require_relative 'excel_comment_character/excel_comment_character_properties'
# Single Properties Character (Run) of XLSX comment
module OoxmlParser
  class ExcelCommentCharacter
    attr_accessor :properties, :text

    def initialize(properties = nil, text = '')
      @properties = properties
      @text = text
    end

    def self.parse(character_node)
      character = ExcelCommentCharacter.new
      character_node.xpath('*').each do |character_node_child|
        case character_node_child.name
        when 'rPr'
          character.properties = ExcelCommentCharacterProperties.parse(character_node_child)
        when 't'
          character.text = character_node_child.text
        end
      end
      character
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ooxml_parser-0.1.2 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment/excel_comment_character.rb
ooxml_parser-0.1.1 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment/excel_comment_character.rb