Sha256: da7ed53e159136fe00153b0253f135e65664924f86996830bb438eaf8f80752f

Contents?: true

Size: 770 Bytes

Versions: 13

Compression:

Stored size: 770 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing SlideLayout files
  class SlideLayoutFile < OOXMLDocumentObject
    # @return [CommonSlideData] common slide data
    attr_reader :common_slide_data

    # Parse SlideLayoutFile
    # @param file [String] path to file to parse
    # @return [SlideLayoutFile] result of parsing
    def parse(file)
      OOXMLDocumentObject.add_to_xmls_stack(file.gsub(OOXMLDocumentObject.path_to_folder, ''))
      doc = parse_xml(file)
      doc.xpath('p:sldLayout/*').each do |node_child|
        case node_child.name
        when 'cSld'
          @common_slide_data = CommonSlideData.new(parent: self).parse(node_child)
        end
      end
      OOXMLDocumentObject.xmls_stack.pop
      self
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ooxml_parser-0.29.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.28.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.27.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.26.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.25.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.24.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.23.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_layout_file.rb
ooxml_parser-0.22.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_layout_file.rb
ooxml_parser-0.21.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_layout_file.rb
ooxml_parser-0.20.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_layout_file.rb
ooxml_parser-0.19.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_layout_file.rb
ooxml_parser-0.18.1 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_layout_file.rb
ooxml_parser-0.18.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_layout_file.rb