ooxml_parser 0.7.1 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart.rb +55 -48
  3. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats.rb +1 -1
  4. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area/common_chart_data.rb +1 -1
  5. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb +1 -1
  6. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_axis.rb +6 -10
  7. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_axis_title.rb +1 -1
  8. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_cells_range.rb +1 -1
  9. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_legend.rb +4 -6
  10. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/display_labels_properties.rb +4 -4
  11. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/docx_drawing.rb +2 -21
  12. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_properties.rb +51 -4
  13. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_wrap_drawing.rb +1 -1
  14. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/ooxml_coordinates.rb +1 -1
  15. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/docx_graphic.rb +1 -1
  16. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/ooxml_text_box.rb +1 -1
  17. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb +0 -4
  18. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb +0 -4
  19. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/fill_reference.rb +0 -4
  20. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/font_reference.rb +0 -4
  21. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/line_reference.rb +0 -4
  22. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/text_body.rb +1 -1
  23. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/color/docx_color_scheme.rb +1 -1
  24. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/docx_custom_geometry/docx_shape_line_path.rb +1 -1
  25. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/docx_custom_geometry/docx_shape_line_path/docx_shape_line_element.rb +1 -1
  26. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb +1 -1
  27. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_line.rb +1 -1
  28. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb +13 -3
  29. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb +1 -1
  30. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_size.rb +10 -3
  31. data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/group/old_docx_group.rb +1 -1
  32. data/lib/ooxml_parser/common_parser/common_data/borders_properties.rb +1 -1
  33. data/lib/ooxml_parser/common_parser/common_data/color.rb +11 -77
  34. data/lib/ooxml_parser/common_parser/common_data/color/color_helper.rb +33 -3
  35. data/lib/ooxml_parser/common_parser/common_data/color/color_indexes.list +66 -0
  36. data/lib/ooxml_parser/common_parser/common_data/colors/color_properties.rb +8 -2
  37. data/lib/ooxml_parser/common_parser/common_data/colors/hsl_color.rb +0 -33
  38. data/lib/ooxml_parser/common_parser/common_data/colors/image_fill.rb +1 -1
  39. data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/gradient_color.rb +1 -1
  40. data/lib/ooxml_parser/common_parser/common_data/colors/theme_colors.rb +1 -1
  41. data/lib/ooxml_parser/common_parser/common_data/colors/tile.rb +1 -1
  42. data/lib/ooxml_parser/common_parser/common_data/content_types.rb +1 -1
  43. data/lib/ooxml_parser/common_parser/common_data/hyperlink.rb +15 -4
  44. data/lib/ooxml_parser/common_parser/common_data/ooxml_document_object.rb +5 -1
  45. data/lib/ooxml_parser/common_parser/common_data/paragraph.rb +1 -1
  46. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_properties.rb +1 -1
  47. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run.rb +1 -1
  48. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties.rb +31 -9
  49. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb +5 -3
  50. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/shade.rb +1 -1
  51. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering_properties.rb +1 -1
  52. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/spacing.rb +1 -1
  53. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/tabs.rb +1 -1
  54. data/lib/ooxml_parser/common_parser/common_data/relationships.rb +1 -1
  55. data/lib/ooxml_parser/common_parser/common_data/table.rb +1 -1
  56. data/lib/ooxml_parser/common_parser/common_data/table/margins/paragraph_margins.rb +1 -5
  57. data/lib/ooxml_parser/common_parser/common_data/table/margins/table_margins.rb +2 -2
  58. data/lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb +1 -1
  59. data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style_properties.rb +1 -1
  60. data/lib/ooxml_parser/common_parser/common_data/table/row/cell/cell.rb +1 -1
  61. data/lib/ooxml_parser/common_parser/common_data/table/row/cell/cell_properties.rb +2 -0
  62. data/lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb +1 -7
  63. data/lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/borders.rb +1 -1
  64. data/lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb +1 -1
  65. data/lib/ooxml_parser/common_parser/common_data/table/row/row.rb +1 -1
  66. data/lib/ooxml_parser/common_parser/common_data/table/table_grid.rb +1 -1
  67. data/lib/ooxml_parser/common_parser/common_data/table/table_properties.rb +1 -1
  68. data/lib/ooxml_parser/common_parser/common_data/underline.rb +4 -3
  69. data/lib/ooxml_parser/common_parser/common_data/valued_child.rb +1 -1
  70. data/lib/ooxml_parser/common_parser/common_document_structure.rb +1 -0
  71. data/lib/ooxml_parser/docx_parser/docx_data/document_structure.rb +15 -7
  72. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/comments.rb +2 -2
  73. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/comments/comment.rb +1 -1
  74. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/comments_extended.rb +2 -2
  75. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_background.rb +1 -1
  76. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_settings.rb +1 -1
  77. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_style.rb +1 -1
  78. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph.rb +5 -9
  79. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula.rb +1 -1
  80. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/bar.rb +1 -1
  81. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/box.rb +1 -1
  82. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/delimeter.rb +1 -1
  83. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/limit.rb +1 -1
  84. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/math_run/math_run_properties.rb +1 -1
  85. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/matrix.rb +1 -1
  86. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/matrix/matrix_row.rb +1 -1
  87. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/radical.rb +1 -1
  88. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run.rb +1 -1
  89. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/docx_paragraph_run_helpers.rb +38 -21
  90. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape.rb +1 -1
  91. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/text_outline.rb +1 -1
  92. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/field_simple.rb +1 -1
  93. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/indents.rb +3 -3
  94. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_content.rb +1 -1
  95. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb +5 -8
  96. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/header_footer.rb +9 -3
  97. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering.rb +2 -2
  98. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering.rb +1 -1
  99. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/numbering_level.rb +1 -1
  100. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/numbering_level/suffix.rb +1 -1
  101. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/columns.rb +4 -1
  102. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/note.rb +4 -2
  103. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_margins.rb +1 -0
  104. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_properties.rb +1 -1
  105. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_size.rb +2 -1
  106. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/styles.rb +2 -2
  107. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/comment_authors.rb +1 -1
  108. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_comments.rb +1 -1
  109. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme.rb +1 -0
  110. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme/theme_color.rb +1 -1
  111. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide.rb +3 -3
  112. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/background.rb +1 -1
  113. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/common_slide_data/shape_tree.rb +1 -1
  114. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/graphic_frame/graphic_frame.rb +2 -2
  115. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb +1 -1
  116. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/shapes_grouping.rb +1 -1
  117. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing.rb +1 -1
  118. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/set_time_node/behavior/behavior.rb +1 -1
  119. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/set_time_node/behavior/target_element.rb +1 -1
  120. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node.rb +1 -1
  121. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing/condition_list.rb +1 -1
  122. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb +1 -1
  123. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/table_styles.rb +1 -1
  124. data/lib/ooxml_parser/pptx_parser/pptx_parser.rb +1 -1
  125. data/lib/ooxml_parser/version.rb +1 -1
  126. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/chartsheet.rb +1 -1
  127. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/shared_string_table.rb +1 -1
  128. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet.rb +1 -1
  129. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/cell_xfs.rb +1 -1
  130. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/cell_xfs/cell_style/alignment.rb +5 -5
  131. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/cell_xfs/xf.rb +1 -1
  132. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fills.rb +1 -1
  133. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fonts.rb +1 -1
  134. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fonts/font.rb +1 -1
  135. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/number_formats.rb +1 -1
  136. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/xlsx_borders.rb +1 -1
  137. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet.rb +1 -1
  138. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments.rb +1 -1
  139. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/comment_list.rb +1 -1
  140. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment.rb +1 -1
  141. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_view.rb +1 -1
  142. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column.rb +1 -1
  143. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column/custom_filters.rb +1 -1
  144. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list.rb +1 -1
  145. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/sparkline_groups.rb +1 -1
  146. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_columns.rb +1 -1
  147. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row.rb +1 -1
  148. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row/xlsx_cell.rb +1 -1
  149. metadata +9 -9
  150. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb +0 -28
@@ -16,7 +16,7 @@ module OoxmlParser
16
16
 
17
17
  def initialize(parent: nil)
18
18
  @level_list = []
19
- @parent = parent
19
+ super
20
20
  end
21
21
 
22
22
  # Parse Abstract Numbering data
@@ -26,8 +26,8 @@ module OoxmlParser
26
26
  attr_accessor :suffix
27
27
 
28
28
  def initialize(parent: nil)
29
- @parent = parent
30
29
  @suffix = Suffix.new(parent: self)
30
+ super
31
31
  end
32
32
 
33
33
  # Parse Numbering Level data
@@ -14,7 +14,7 @@ module OoxmlParser
14
14
  def initialize(value = :tab,
15
15
  parent: nil)
16
16
  @value = value
17
- @parent = parent
17
+ super(parent: parent)
18
18
  end
19
19
 
20
20
  # Parse Suffix
@@ -4,10 +4,12 @@ require_relative 'columns/column'
4
4
  module OoxmlParser
5
5
  # Class for data of Columns
6
6
  class Columns < OOXMLDocumentObject
7
+ # @return [Integer] count of columns
7
8
  attr_accessor :count
9
+ # @return [True, False] is columns are equal width
8
10
  attr_accessor :equal_width
9
-
10
11
  alias equal_width? equal_width
12
+ # @return [Array<Column>] list of colujmns
11
13
  attr_accessor :column_array
12
14
  # @return [Boolean] Draw Line Between Columns
13
15
  attr_reader :separator
@@ -17,6 +19,7 @@ module OoxmlParser
17
19
  def initialize(columns_count = 0)
18
20
  @count = columns_count
19
21
  @column_array = []
22
+ super(parent: nil)
20
23
  end
21
24
 
22
25
  # @return [Array, Column] accessor
@@ -7,6 +7,7 @@ module OoxmlParser
7
7
 
8
8
  def initialize
9
9
  @elements = []
10
+ super(parent: nil)
10
11
  end
11
12
 
12
13
  # Parse note data
@@ -26,10 +27,11 @@ module OoxmlParser
26
27
  doc.search(xpath_note).each do |ftr|
27
28
  number = 0
28
29
  ftr.xpath('*').each do |sub_element|
29
- if sub_element.name == 'p'
30
+ case sub_element.name
31
+ when 'p'
30
32
  note.elements << params[:default_paragraph].dup.parse(sub_element, number, params[:default_character], parent: note)
31
33
  number += 1
32
- elsif sub_element.name == 'tbl'
34
+ when 'tbl'
33
35
  note.elements << Table.new(parent: note).parse(sub_element, number)
34
36
  number += 1
35
37
  end
@@ -14,6 +14,7 @@ module OoxmlParser
14
14
  @footer = params[:footer]
15
15
  @gutter = params[:gutter]
16
16
  @parent = params[:parent]
17
+ super(parent: nil)
17
18
  end
18
19
 
19
20
  # Parse BordersProperties
@@ -18,7 +18,7 @@ module OoxmlParser
18
18
 
19
19
  def initialize(parent: nil)
20
20
  @notes = []
21
- @parent = parent
21
+ super
22
22
  end
23
23
 
24
24
  # Parse PageProperties data
@@ -9,11 +9,12 @@ module OoxmlParser
9
9
  @height = height
10
10
  @width = width
11
11
  @orientation = orientation
12
+ super(parent: nil)
12
13
  end
13
14
 
14
15
  # @return [String] convert to string
15
16
  def to_s
16
- 'Height: ' + @height.to_s + ' Width: ' + @width.to_s + ' Orientation: ' + @orientation.to_s
17
+ "Height: #{@height} Width: #{@width} Orientation: #{@orientation}"
17
18
  end
18
19
 
19
20
  # @return [True, False] compare dimensions of size, ignoring orientation
@@ -11,13 +11,13 @@ module OoxmlParser
11
11
 
12
12
  def initialize(parent: nil)
13
13
  @styles = []
14
- @parent = parent
14
+ super
15
15
  end
16
16
 
17
17
  # Parse styles data
18
18
  # @return [Styles] result of parsing
19
19
  def parse
20
- doc = parse_xml(OOXMLDocumentObject.path_to_folder + 'word/styles.xml')
20
+ doc = parse_xml("#{OOXMLDocumentObject.path_to_folder}word/styles.xml")
21
21
  doc.xpath('w:styles/*').each do |node_child|
22
22
  case node_child.name
23
23
  when 'docDefaults'
@@ -9,7 +9,7 @@ module OoxmlParser
9
9
 
10
10
  def initialize(parent: nil)
11
11
  @list = []
12
- @parent = parent
12
+ super
13
13
  end
14
14
 
15
15
  # Parse CommentAuthors object
@@ -9,7 +9,7 @@ module OoxmlParser
9
9
 
10
10
  def initialize(parent: nil)
11
11
  @list = []
12
- @parent = parent
12
+ super
13
13
  end
14
14
 
15
15
  # Parse PresentationComments object
@@ -12,6 +12,7 @@ module OoxmlParser
12
12
  def initialize(name = '', color_scheme = {})
13
13
  @name = name
14
14
  @color_scheme = color_scheme
15
+ super(parent: nil)
15
16
  end
16
17
 
17
18
  # Parse PresentationTheme
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
  def initialize(type: '', color: nil, parent: nil)
9
9
  @type = type
10
10
  @color = color
11
- @parent = parent
11
+ super(parent: parent)
12
12
  end
13
13
 
14
14
  # Compare ThemeColor with other object
@@ -3,8 +3,8 @@
3
3
  require_relative 'slide/presentation_alternate_content'
4
4
  require_relative 'slide/background'
5
5
  require_relative 'slide/common_slide_data'
6
- require_relative 'slide/connection_shape.rb'
7
- require_relative 'slide/presentation_notes.rb'
6
+ require_relative 'slide/connection_shape'
7
+ require_relative 'slide/presentation_notes'
8
8
  require_relative 'slide/graphic_frame/graphic_frame'
9
9
  require_relative 'slide/slide/shapes_grouping'
10
10
  require_relative 'slide/slide/timing'
@@ -24,8 +24,8 @@ module OoxmlParser
24
24
  attr_reader :note
25
25
 
26
26
  def initialize(parent: nil, xml_path: nil)
27
- @parent = parent
28
27
  @xml_path = xml_path
28
+ super(parent: parent)
29
29
  end
30
30
 
31
31
  # @return [True, False] is slide with data
@@ -10,7 +10,7 @@ module OoxmlParser
10
10
 
11
11
  def initialize(type = nil, parent: nil)
12
12
  @type = type
13
- @parent = parent
13
+ super(parent: parent)
14
14
  end
15
15
 
16
16
  # Parse Background object
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
 
9
9
  def initialize(parent: nil)
10
10
  @elements = []
11
- @parent = parent
11
+ super
12
12
  end
13
13
 
14
14
  # Parse ShapeTree object
@@ -9,7 +9,7 @@ module OoxmlParser
9
9
 
10
10
  def initialize(graphic_data = [], parent: nil)
11
11
  @graphic_data = graphic_data
12
- @parent = parent
12
+ super(parent: parent)
13
13
  end
14
14
 
15
15
  # Parse GraphicFrame object
@@ -31,7 +31,7 @@ module OoxmlParser
31
31
  graphic_data << Table.new(parent: self).parse(graphic_node_child)
32
32
  when 'chart'
33
33
  OOXMLDocumentObject.add_to_xmls_stack(OOXMLDocumentObject.get_link_from_rels(graphic_node_child.attribute('id').value))
34
- graphic_data << Chart.parse(parent: self)
34
+ graphic_data << Chart.new(parent: self).parse
35
35
  OOXMLDocumentObject.xmls_stack.pop
36
36
  when 'oleObj'
37
37
  graphic_data << OleObject.new(parent: self).parse(graphic_node_child)
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
 
9
9
  def initialize(parent: nil)
10
10
  @elements = elements
11
- @parent = parent
11
+ super
12
12
  end
13
13
 
14
14
  # Parse PresentationAlternateContent object
@@ -7,7 +7,7 @@ module OoxmlParser
7
7
 
8
8
  def initialize(parent: nil)
9
9
  @elements = []
10
- @parent = parent
10
+ super
11
11
  end
12
12
 
13
13
  # Parse ShapesGrouping object
@@ -10,7 +10,7 @@ module OoxmlParser
10
10
  @time_node_list = []
11
11
  @build_list = []
12
12
  @extension_list = []
13
- @parent = parent
13
+ super
14
14
  end
15
15
 
16
16
  # Parse Timing object
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
 
9
9
  def initialize(parent: nil)
10
10
  @attribute_name_list = []
11
- @parent = parent
11
+ super
12
12
  end
13
13
 
14
14
  # Parse Behavior object
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
  def initialize(type = '', id = '', parent: nil)
9
9
  @type = type
10
10
  @id = id
11
- @parent = parent
11
+ super(parent: parent)
12
12
  end
13
13
 
14
14
  # Parse TargetElement object
@@ -12,7 +12,7 @@ module OoxmlParser
12
12
  @type = type
13
13
  @previous_conditions_list = []
14
14
  @next_conditions_list = []
15
- @parent = parent
15
+ super(parent: parent)
16
16
  end
17
17
 
18
18
  # Parse TimeNode
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
 
9
9
  def initialize(parent: nil)
10
10
  @list = []
11
- @parent = parent
11
+ super
12
12
  end
13
13
 
14
14
  # Parse ConditionList object
@@ -10,7 +10,7 @@ module OoxmlParser
10
10
  def initialize(path = '', name = '', parent: nil)
11
11
  @path = path
12
12
  @name = name
13
- @parent = parent
13
+ super(parent: parent)
14
14
  end
15
15
 
16
16
  # Parse Sound
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
 
9
9
  def initialize(parent: nil)
10
10
  @table_style_list = []
11
- @parent = parent
11
+ super
12
12
  end
13
13
 
14
14
  # Parse TableStyles object
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'pptx_data/presentation.rb'
3
+ require_relative 'pptx_data/presentation'
4
4
 
5
5
  module OoxmlParser
6
6
  # Basic class for parsing pptx
@@ -4,6 +4,6 @@ module OoxmlParser
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
6
  # [String] Version of Gem
7
- STRING = '0.7.1'
7
+ STRING = '0.9.1'
8
8
  end
9
9
  end
@@ -8,7 +8,7 @@ module OoxmlParser
8
8
 
9
9
  def initialize(parent: nil)
10
10
  @sheet_views = []
11
- @parent = parent
11
+ super
12
12
  end
13
13
 
14
14
  # Parse Chartsheet object
@@ -13,7 +13,7 @@ module OoxmlParser
13
13
 
14
14
  def initialize(parent: nil)
15
15
  @string_indexes = []
16
- @parent = parent
16
+ super
17
17
  end
18
18
 
19
19
  # Parse Shared string table file
@@ -23,7 +23,7 @@ module OoxmlParser
23
23
  @number_formats = NumberFormats.new(parent: self)
24
24
  @fonts = Fonts.new(parent: self)
25
25
  @fills = Fills.new(parent: self)
26
- @parent = parent
26
+ super
27
27
  end
28
28
 
29
29
  # Parse StyleSheet object
@@ -11,7 +11,7 @@ module OoxmlParser
11
11
 
12
12
  def initialize(parent: nil)
13
13
  @xf_array = []
14
- @parent = parent
14
+ super
15
15
  end
16
16
 
17
17
  # Parse CellXfs data
@@ -5,11 +5,11 @@ module OoxmlParser
5
5
  class XlsxAlignment < OOXMLDocumentObject
6
6
  attr_accessor :horizontal, :vertical, :wrap_text, :text_rotation
7
7
 
8
- def initialize(horizontal = :left, vertical = :bottom, wrap_text = false, parent: nil)
9
- @horizontal = horizontal
10
- @vertical = vertical
11
- @wrap_text = wrap_text
12
- @parent = parent
8
+ def initialize(params = {})
9
+ @horizontal = params.fetch(:horizontal, :left)
10
+ @vertical = params.fetch(:vertical, :bottom)
11
+ @wrap_text = params.fetch(:wrap_text, false)
12
+ super(parent: params[:parent])
13
13
  end
14
14
 
15
15
  # Parse XlsxAlignment object
@@ -80,7 +80,7 @@ module OoxmlParser
80
80
  def initialize(parent: nil)
81
81
  @numerical_format = 'General'
82
82
  @alignment = XlsxAlignment.new
83
- @parent = parent
83
+ super
84
84
  end
85
85
 
86
86
  # Parse Xf object
@@ -9,7 +9,7 @@ module OoxmlParser
9
9
 
10
10
  def initialize(parent: nil)
11
11
  @fills_array = []
12
- @parent = parent
12
+ super
13
13
  end
14
14
 
15
15
  # @return [Array, Fill] accessor
@@ -9,7 +9,7 @@ module OoxmlParser
9
9
 
10
10
  def initialize(parent: nil)
11
11
  @fonts_array = []
12
- @parent = parent
12
+ super
13
13
  end
14
14
 
15
15
  # @return [Array<Font>] accessor
@@ -10,7 +10,7 @@ module OoxmlParser
10
10
  def initialize(parent: nil)
11
11
  @name = 'Calibri'
12
12
  @size = 11
13
- @parent = parent
13
+ super
14
14
  end
15
15
 
16
16
  # Parse Font object
@@ -9,7 +9,7 @@ module OoxmlParser
9
9
 
10
10
  def initialize(parent: nil)
11
11
  @number_formats_array = []
12
- @parent = parent
12
+ super
13
13
  end
14
14
 
15
15
  # Parse NumberFormats data
@@ -11,7 +11,7 @@ module OoxmlParser
11
11
 
12
12
  def initialize(parent: nil)
13
13
  @borders_array = []
14
- @parent = parent
14
+ super
15
15
  end
16
16
 
17
17
  # Parse XlsxBorders data