Class: Doc2Text::Odt::XmlNodes::Text::List

Inherits:
Object
  • Object
show all
Includes:
Node, Doc2Text::Odt::XmlNodes::Text
Defined in:
lib/doc2text/odt_xml_namespaces.rb

Instance Attribute Summary

Attributes included from Node

#attrs, #children, #name, #parent, #prefix, #text

Instance Method Summary collapse

Methods included from Doc2Text::Odt::XmlNodes::Text

#fetch_style?, #find_style, #initialize

Methods included from Node

#close, create_node, #delete, #eql?, #expand, #generic?, #has_text?, included, #initialize, #not_deleted?, #not_enclosing?, #root?, titleize, #to_s, #un_delete, #xml_name

Instance Method Details

#delete_on_close?Boolean

Returns:

  • (Boolean)


236
237
238
# File 'lib/doc2text/odt_xml_namespaces.rb', line 236

def delete_on_close?
  false
end

#fetch_style(elem_style) ⇒ Object



222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/doc2text/odt_xml_namespaces.rb', line 222

def fetch_style(elem_style)
  if elem_style
    elem_style.children.select { |style_property| style_property.xml_name == 'style:text-properties' }.each { |text_property|
      text_property.attrs.each { |attr|
        if attr.prefix == 'style'
          if attr.localname == 'list-level-style-number' && attr.value == 'Numbering_20_Symbols'
            @enclosing_style << '_'
          end
        end
      }
    }
  end
end

#openObject



218
219
220
# File 'lib/doc2text/odt_xml_namespaces.rb', line 218

def open
  "\n"
end