class Xlsxrb::Ooxml::Reader::HyperlinksListener
SAX2 listener for parsing <hyperlinks><hyperlink> elements.
Attributes
links
[R]
untyped
Public Class Methods
() → untyped
Source
# File lib/xlsxrb/ooxml/reader/listeners/core_listeners.rb, line 727 def initialize @links = [] end
Public Instance Methods
(untyped _uri, untyped local_name, untyped qname, untyped attributes) → untyped
Source
# File lib/xlsxrb/ooxml/reader/listeners/core_listeners.rb, line 731 def start_element(_uri, local_name, qname, attributes) name = element_name(local_name, qname) return unless name == "hyperlink" ref = attributes["ref"] return unless ref link = { ref: ref } link[:rid] = attributes["r:id"] if attributes["r:id"] link[:display] = attributes["display"] if attributes["display"] link[:tooltip] = attributes["tooltip"] if attributes["tooltip"] link[:location] = attributes["location"] if attributes["location"] @links << link end