Sha256: 4e6ad95cedc191b2dfb54cc1b981fc01c517b545c99f0cbcc9740135f427384a

Contents?: true

Size: 747 Bytes

Versions: 13

Compression:

Stored size: 747 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)
      root_object.add_to_xmls_stack(file.gsub(root_object.unpacked_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
      root_object.xmls_stack.pop
      self
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ooxml_parser-0.38.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.37.1 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.37.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.36.1 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.36.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.35.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.34.2 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.34.1 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.34.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.33.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.32.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.31.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb
ooxml_parser-0.30.0 lib/ooxml_parser/pptx_parser/presentation/slide_layout_file.rb