ooxml_parser 0.21.0 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/{effect_reference.rb → style_matrix_reference.rb} +4 -4
  3. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb +4 -6
  4. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape.rb +14 -0
  5. data/lib/ooxml_parser/common_parser/common_data/coordinates.rb +30 -21
  6. data/lib/ooxml_parser/common_parser/common_data/hyperlink.rb +2 -2
  7. data/lib/ooxml_parser/common_parser/common_data/ooxml_document_object.rb +15 -23
  8. data/lib/ooxml_parser/common_parser/parser/encryption_checker.rb +43 -0
  9. data/lib/ooxml_parser/common_parser/parser.rb +5 -2
  10. data/lib/ooxml_parser/common_parser.rb +15 -0
  11. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments/comment.rb +0 -0
  12. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments.rb +0 -0
  13. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments_extended/comment_extended.rb +0 -0
  14. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments_extended.rb +0 -0
  15. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_background.rb +0 -0
  16. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_properties.rb +0 -0
  17. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_settings.rb +0 -0
  18. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_structure_helpers.rb +0 -0
  19. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_style/document_style_helper.rb +0 -0
  20. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_style.rb +0 -0
  21. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/bookmark_end.rb +0 -0
  22. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/bookmark_start.rb +0 -0
  23. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/comment_range_end.rb +0 -0
  24. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/comment_range_start.rb +0 -0
  25. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/accent.rb +0 -0
  26. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/argument_properties/argument_size.rb +0 -0
  27. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/argument_properties.rb +0 -0
  28. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/bar.rb +0 -0
  29. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/box.rb +0 -0
  30. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/delimeter.rb +0 -0
  31. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/fraction.rb +0 -0
  32. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/function.rb +0 -0
  33. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/group_char.rb +0 -0
  34. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/index.rb +0 -0
  35. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/limit.rb +0 -0
  36. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/math_run/math_run_properties.rb +0 -0
  37. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/math_run.rb +0 -0
  38. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/matrix/matrix_row.rb +0 -0
  39. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/matrix.rb +0 -0
  40. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/nary/nary_properties/nary_grow.rb +0 -0
  41. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/nary/nary_properties/nary_limit_location.rb +0 -0
  42. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/nary/nary_properties.rb +0 -0
  43. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/nary.rb +0 -0
  44. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/pre_sub_superscript.rb +0 -0
  45. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/radical.rb +0 -0
  46. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula.rb +0 -0
  47. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_helper.rb +0 -0
  48. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/docx_paragraph_run_helpers.rb +0 -0
  49. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/object/ole_object.rb +0 -0
  50. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/object.rb +0 -0
  51. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape/shape_properties/shape_margins.rb +0 -0
  52. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape/shape_properties/shape_size.rb +0 -0
  53. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape/shape_properties/stroke.rb +0 -0
  54. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape/shape_properties.rb +0 -0
  55. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape.rb +0 -0
  56. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/text_fill.rb +0 -0
  57. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/text_outline.rb +0 -0
  58. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run.rb +0 -0
  59. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/field_simple.rb +0 -0
  60. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/frame_properties.rb +0 -0
  61. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/indents.rb +0 -0
  62. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/inserted.rb +0 -0
  63. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/sdt/sdt_content.rb +0 -0
  64. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/sdt/sdt_properties.rb +0 -0
  65. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/structured_document_tag.rb +0 -0
  66. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/style_parametres.rb +0 -0
  67. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph.rb +0 -0
  68. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/header_footer.rb +0 -0
  69. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/multilevel_type.rb +0 -0
  70. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/level_justification.rb +0 -0
  71. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/level_text.rb +0 -0
  72. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/numbering_format.rb +0 -0
  73. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/suffix.rb +0 -0
  74. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level.rb +0 -0
  75. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering.rb +0 -0
  76. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/numbering_definition.rb +0 -0
  77. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering.rb +0 -0
  78. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/columns/column.rb +0 -0
  79. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/columns.rb +0 -0
  80. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/document_grid.rb +0 -0
  81. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/footnote_properties.rb +0 -0
  82. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/note.rb +0 -0
  83. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/page_margins.rb +0 -0
  84. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/page_properties.rb +0 -0
  85. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/page_size.rb +0 -0
  86. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles/document_defaults/paragraph_properties_default.rb +0 -0
  87. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles/document_defaults/run_properties_default.rb +0 -0
  88. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles/document_defaults.rb +0 -0
  89. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles.rb +0 -0
  90. data/lib/ooxml_parser/docx_parser/{docx_data/document_structure.rb → document_structure.rb} +0 -0
  91. data/lib/ooxml_parser/{docx_parser/docx_parser.rb → docx_parser.rb} +2 -3
  92. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/comment_authors/comment_author.rb +0 -0
  93. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/comment_authors.rb +0 -0
  94. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_comments/presentation_comment.rb +0 -0
  95. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_comments.rb +0 -0
  96. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_helpers.rb +0 -0
  97. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/font_scheme/font_collection/text_font.rb +0 -0
  98. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/font_scheme/font_collection.rb +0 -0
  99. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/font_scheme.rb +0 -0
  100. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/theme_color.rb +0 -0
  101. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme.rb +0 -0
  102. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/background/background_properties/stretch.rb +0 -0
  103. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/background/background_properties.rb +0 -0
  104. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/background.rb +0 -0
  105. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/common_slide_data/shape_tree.rb +0 -0
  106. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/common_slide_data.rb +0 -0
  107. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/connection_shape.rb +0 -0
  108. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/graphic_frame/graphic_frame.rb +0 -0
  109. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/presentation_alternate_content.rb +0 -0
  110. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/presentation_notes.rb +0 -0
  111. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/shapes_grouping.rb +0 -0
  112. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/animation_effect/animation_effect.rb +0 -0
  113. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/set_time_node/behavior/behavior.rb +0 -0
  114. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/set_time_node/behavior/target_element.rb +0 -0
  115. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/set_time_node/set_time_node.rb +0 -0
  116. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node/common_timing/codition_list/condition.rb +0 -0
  117. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node/common_timing/condition_list.rb +0 -0
  118. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node/common_timing.rb +0 -0
  119. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node.rb +0 -0
  120. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing.rb +0 -0
  121. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide_helper.rb +0 -0
  122. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition/sound_action/sound.rb +0 -0
  123. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition/sound_action.rb +0 -0
  124. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition.rb +0 -0
  125. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition_properties/transition_properties/wheel.rb +0 -0
  126. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition_properties/transition_properties.rb +0 -0
  127. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide.rb +0 -0
  128. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_layout_file.rb +0 -0
  129. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_layouts_helper.rb +0 -0
  130. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_master_file.rb +0 -0
  131. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_masters_helper.rb +0 -0
  132. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_size.rb +0 -0
  133. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/table_styles.rb +0 -0
  134. data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation.rb → presentation.rb} +0 -0
  135. data/lib/ooxml_parser/{pptx_parser/pptx_parser.rb → pptx_parser.rb} +1 -1
  136. data/lib/ooxml_parser/version.rb +1 -1
  137. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/chartsheet.rb +0 -0
  138. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/defined_name.rb +0 -0
  139. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb +0 -0
  140. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_fields/cache_field.rb +0 -0
  141. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_fields.rb +0 -0
  142. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_source/worksheet_source.rb +0 -0
  143. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_source.rb +0 -0
  144. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition.rb +0 -0
  145. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache.rb +0 -0
  146. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/column_row_items/column_row_item.rb +0 -0
  147. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/column_row_items.rb +0 -0
  148. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/location.rb +0 -0
  149. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields/pivot_field/items/item.rb +0 -0
  150. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields/pivot_field/items.rb +0 -0
  151. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields/pivot_field.rb +0 -0
  152. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields.rb +0 -0
  153. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_table_style_info.rb +0 -0
  154. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition.rb +0 -0
  155. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/shared_string_table/string_index.rb +0 -0
  156. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/shared_string_table.rb +0 -0
  157. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/sheet.rb +0 -0
  158. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/cell_xfs/cell_style/alignment.rb +0 -0
  159. data/lib/ooxml_parser/xlsx_parser/workbook/style_sheet/cell_xfs/cell_style/protection.rb +32 -0
  160. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/cell_xfs/xf.rb +5 -0
  161. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/cell_xfs.rb +0 -0
  162. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/differential_formatting_records.rb +0 -0
  163. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fills/fill/pattern_fill.rb +0 -0
  164. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fills/fill.rb +0 -0
  165. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fills.rb +0 -0
  166. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fonts/font.rb +0 -0
  167. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fonts.rb +0 -0
  168. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/number_formats/number_format.rb +0 -0
  169. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/number_formats.rb +0 -0
  170. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/xlsx_borders/xlsx_border.rb +0 -0
  171. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/xlsx_borders.rb +0 -0
  172. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet.rb +0 -0
  173. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/workbook_helpers.rb +0 -0
  174. data/lib/ooxml_parser/xlsx_parser/workbook/workbook_protection.rb +38 -0
  175. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments/author.rb +0 -0
  176. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments/comment_list.rb +0 -0
  177. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments/excel_comment.rb +0 -0
  178. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments.rb +0 -0
  179. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/ole_objects.rb +0 -0
  180. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/page_setup.rb +0 -0
  181. data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb +42 -0
  182. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_format_properties.rb +0 -0
  183. data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_protection.rb +117 -0
  184. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_view/pane.rb +1 -1
  185. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_view/selection.rb +1 -1
  186. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_view.rb +1 -1
  187. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/autofilter/filter_column/custom_filters/custom_filter.rb +0 -0
  188. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/autofilter/filter_column/custom_filters.rb +0 -0
  189. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/autofilter/filter_column.rb +0 -0
  190. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/autofilter.rb +0 -0
  191. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/color_scale.rb +0 -0
  192. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/data_bar/conditional_format_value_object.rb +0 -0
  193. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/data_bar.rb +0 -0
  194. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/differential_formatting_record.rb +0 -0
  195. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/icon_set/conditional_formatting_icon.rb +0 -0
  196. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/icon_set.rb +0 -0
  197. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule.rb +0 -0
  198. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting.rb +0 -0
  199. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings.rb +0 -0
  200. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/data_validations/data_validation/data_validation_formula.rb +0 -0
  201. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/data_validations/data_validation.rb +0 -0
  202. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/data_validations.rb +0 -0
  203. data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb +26 -0
  204. data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines.rb +33 -0
  205. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb +5 -0
  206. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/sparkline_groups.rb +0 -0
  207. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/x14_table.rb +0 -0
  208. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension.rb +0 -0
  209. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list.rb +0 -0
  210. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/table_columns/table_column.rb +0 -0
  211. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/table_columns.rb +0 -0
  212. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/table_style_info.rb +0 -0
  213. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part.rb +0 -0
  214. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/worksheet_helper.rb +0 -0
  215. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_column_properties.rb +0 -0
  216. data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/client_data.rb +27 -0
  217. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb +0 -0
  218. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_drawing.rb +5 -0
  219. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_header_footer/header_footer_child.rb +0 -0
  220. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_header_footer.rb +0 -0
  221. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_row/xlsx_cell/formula.rb +0 -0
  222. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_row/xlsx_cell.rb +0 -0
  223. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_row.rb +1 -1
  224. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet.rb +13 -0
  225. data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook.rb → workbook.rb} +12 -0
  226. data/lib/ooxml_parser/{xlsx_parser/xlsx_parser.rb → xlsx_parser.rb} +1 -1
  227. data/lib/ooxml_parser.rb +4 -16
  228. metadata +225 -218
  229. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/fill_reference.rb +0 -31
  230. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/line_reference.rb +0 -31
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'pptx_data/presentation'
3
+ require_relative 'pptx_parser/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.21.0'
7
+ STRING = '0.24.0'
8
8
  end
9
9
  end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OoxmlParser
4
+ # Class for parsing <protection> tag
5
+ class Protection < OOXMLDocumentObject
6
+ # @return [True, False] Specifies if cell is locked
7
+ attr_reader :locked
8
+ # @return [True, False] Specifies if formulas in cell are hidden
9
+ attr_reader :hidden
10
+
11
+ def initialize(parent: nil)
12
+ @locked = true
13
+ @hidden = false
14
+ super
15
+ end
16
+
17
+ # Parse Protection data
18
+ # @param [Nokogiri::XML:Element] node with Protection data
19
+ # @return [Sheet] value of Protection
20
+ def parse(node)
21
+ node.attributes.each do |key, value|
22
+ case key
23
+ when 'locked'
24
+ @locked = attribute_enabled?(value)
25
+ when 'hidden'
26
+ @hidden = attribute_enabled?(value)
27
+ end
28
+ end
29
+ self
30
+ end
31
+ end
32
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'cell_style/alignment'
4
+ require_relative 'cell_style/protection'
4
5
  module OoxmlParser
5
6
  # Class for parsing `xf` object
6
7
  class Xf < OOXMLDocumentObject
@@ -76,6 +77,8 @@ module OoxmlParser
76
77
  attr_reader :fill_id
77
78
  # @return [Integer] id of number format
78
79
  attr_reader :number_format_id
80
+ # @return [Protection] Settings of cell protection
81
+ attr_reader :protection
79
82
 
80
83
  def initialize(parent: nil)
81
84
  @numerical_format = 'General'
@@ -115,6 +118,8 @@ module OoxmlParser
115
118
  case node_child.name
116
119
  when 'alignment'
117
120
  @alignment.parse(node_child) if @apply_alignment
121
+ when 'protection'
122
+ @protection = Protection.new(parent: self).parse(node_child)
118
123
  end
119
124
  end
120
125
  self
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OoxmlParser
4
+ # Class for parsing <workbookProtection> tag
5
+ class WorkbookProtection < OOXMLDocumentObject
6
+ # @return [True, False] Specifies if workbook structure is protected
7
+ attr_reader :lock_structure
8
+ # @return [String] name of hashing algorithm
9
+ attr_reader :workbook_algorithm_name
10
+ # @return [String] hash value for the password
11
+ attr_reader :workbook_hash_value
12
+ # @return [String] salt value for the password
13
+ attr_reader :workbook_salt_value
14
+ # @return [Integer] number of times the hashing function shall be iteratively run
15
+ attr_reader :workbook_spin_count
16
+
17
+ # Parse WorkbookProtection data
18
+ # @param [Nokogiri::XML:Element] node with WorkbookProtection data
19
+ # @return [Sheet] value of WorkbookProtection
20
+ def parse(node)
21
+ node.attributes.each do |key, value|
22
+ case key
23
+ when 'lockStructure'
24
+ @lock_structure = attribute_enabled?(value)
25
+ when 'workbookAlgorithmName'
26
+ @workbook_algorithm_name = value.value.to_s
27
+ when 'workbookHashValue'
28
+ @workbook_hash_value = value.value.to_s
29
+ when 'workbookSaltValue'
30
+ @workbook_salt_value = value.value.to_s
31
+ when 'workbookSpinCount'
32
+ @workbook_spin_count = value.value.to_i
33
+ end
34
+ end
35
+ self
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OoxmlParser
4
+ # Class for parsing <protectedRange> tag
5
+ class ProtectedRange < OOXMLDocumentObject
6
+ # @return [String] Name of hashing algorithm
7
+ attr_reader :algorithm_name
8
+ # @return [String] Hash value for the password
9
+ attr_reader :hash_value
10
+ # @return [String] Salt value for the password
11
+ attr_reader :salt_value
12
+ # @return [Integer] Number of times the hashing function shall be iteratively run
13
+ attr_reader :spin_count
14
+ # @return [String] Name of protected range
15
+ attr_accessor :name
16
+ # @return [String] Range reference
17
+ attr_reader :reference_sequence
18
+
19
+ # Parse ProtectedRange data
20
+ # @param [Nokogiri::XML:Element] node with ProtectedRange data
21
+ # @return [Sheet] value of ProtectedRange
22
+ def parse(node)
23
+ node.attributes.each do |key, value|
24
+ case key
25
+ when 'algorithmName'
26
+ @algorithm_name = value.value.to_s
27
+ when 'hashValue'
28
+ @hash_value = value.value.to_s
29
+ when 'saltValue'
30
+ @salt_value = value.value.to_s
31
+ when 'spinCount'
32
+ @spin_count = value.value.to_i
33
+ when 'name'
34
+ @name = value.value.to_s
35
+ when 'sqref'
36
+ @reference_sequence = value.value.to_s
37
+ end
38
+ end
39
+ self
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,117 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OoxmlParser
4
+ # Class for parsing <sheetProtection> tag
5
+ class SheetProtection < OOXMLDocumentObject
6
+ # @return [String] Name of hashing algorithm
7
+ attr_reader :algorithm_name
8
+ # @return [String] Hash value for the password
9
+ attr_reader :hash_value
10
+ # @return [String] Salt value for the password
11
+ attr_reader :salt_value
12
+ # @return [Integer] Number of times the hashing function shall be iteratively run
13
+ attr_reader :spin_count
14
+ # @return [True, False] Specifies if sheet is protected
15
+ attr_reader :sheet
16
+ # @return [True, False] Specifies if using autofilter is not allowed on protected sheet
17
+ attr_reader :auto_filter
18
+ # @return [True, False] Specifies if deleting columns is not allowed on protected sheet
19
+ attr_reader :delete_columns
20
+ # @return [True, False] Specifies if deleting rows is not allowed on protected sheet
21
+ attr_reader :delete_rows
22
+ # @return [True, False] Specifies if formatting cells is not allowed on protected sheet
23
+ attr_reader :format_cells
24
+ # @return [True, False] Specifies if formatting columns is not allowed on protected sheet
25
+ attr_reader :format_columns
26
+ # @return [True, False] Specifies if formatting rows is not allowed on protected sheet
27
+ attr_reader :format_rows
28
+ # @return [True, False] Specifies if inserting columns is not allowed on protected sheet
29
+ attr_reader :insert_columns
30
+ # @return [True, False] Specifies if inserting rows is not allowed on protected sheet
31
+ attr_reader :insert_rows
32
+ # @return [True, False] Specifies if inserting hyperlinks is not allowed on protected sheet
33
+ attr_reader :insert_hyperlinks
34
+ # @return [True, False] Specifies if editing objects is not allowed on protected sheet
35
+ attr_reader :objects
36
+ # @return [True, False] Specifies if using pivot tables is not allowed on protected sheet
37
+ attr_reader :pivot_tables
38
+ # @return [True, False] Specifies if editing scenarios is not allowed on protected sheet
39
+ attr_reader :scenarios
40
+ # @return [True, False] Specifies if selecting locked cells is not allowed on protected sheet
41
+ attr_reader :select_locked_cells
42
+ # @return [True, False] Specifies if selecting unlocked cells is not allowed on protected sheet
43
+ attr_reader :select_unlocked_cells
44
+ # @return [True, False] Specifies if sorting is not allowed on protected sheet
45
+ attr_reader :sort
46
+
47
+ def initialize(parent: nil)
48
+ @objects = false
49
+ @scenarios = false
50
+ @select_locked_cells = false
51
+ @select_unlocked_cells = false
52
+ @auto_filter = true
53
+ @delete_columns = true
54
+ @delete_rows = true
55
+ @format_cells = true
56
+ @format_columns = true
57
+ @format_rows = true
58
+ @insert_columns = true
59
+ @insert_rows = true
60
+ @insert_hyperlinks = true
61
+ @pivot_tables = true
62
+ @sort = true
63
+ super
64
+ end
65
+
66
+ # Parse SheetProtection data
67
+ # @param [Nokogiri::XML:Element] node with SheetProtection data
68
+ # @return [Sheet] value of SheetProtection
69
+ def parse(node)
70
+ node.attributes.each do |key, value|
71
+ case key
72
+ when 'algorithmName'
73
+ @algorithm_name = value.value.to_s
74
+ when 'hashValue'
75
+ @hash_value = value.value.to_s
76
+ when 'saltValue'
77
+ @salt_value = value.value.to_s
78
+ when 'spinCount'
79
+ @spin_count = value.value.to_i
80
+ when 'sheet'
81
+ @sheet = attribute_enabled?(value)
82
+ when 'autoFilter'
83
+ @auto_filter = attribute_enabled?(value)
84
+ when 'deleteColumns'
85
+ @delete_columns = attribute_enabled?(value)
86
+ when 'deleteRows'
87
+ @delete_rows = attribute_enabled?(value)
88
+ when 'formatCells'
89
+ @format_cells = attribute_enabled?(value)
90
+ when 'formatColumns'
91
+ @format_columns = attribute_enabled?(value)
92
+ when 'formatRows'
93
+ @format_rows = attribute_enabled?(value)
94
+ when 'insertColumns'
95
+ @insert_columns = attribute_enabled?(value)
96
+ when 'insertRows'
97
+ @insert_rows = attribute_enabled?(value)
98
+ when 'insertHyperlinks'
99
+ @insert_hyperlinks = attribute_enabled?(value)
100
+ when 'objects'
101
+ @objects = attribute_enabled?(value)
102
+ when 'pivotTables'
103
+ @pivot_tables = attribute_enabled?(value)
104
+ when 'scenarios'
105
+ @scenarios = attribute_enabled?(value)
106
+ when 'selectLockedCells'
107
+ @select_locked_cells = attribute_enabled?(value)
108
+ when 'selectUnlockedCells'
109
+ @select_unlocked_cells = attribute_enabled?(value)
110
+ when 'sort'
111
+ @sort = attribute_enabled?(value)
112
+ end
113
+ end
114
+ self
115
+ end
116
+ end
117
+ end
@@ -14,7 +14,7 @@ module OoxmlParser
14
14
  when 'state'
15
15
  @state = value.value.to_sym
16
16
  when 'topLeftCell'
17
- @top_left_cell = Coordinates.parse_coordinates_from_string(value.value)
17
+ @top_left_cell = Coordinates.new.parse_string(value.value)
18
18
  when 'xSplit'
19
19
  @x_split = value.value
20
20
  when 'ySplit'
@@ -17,7 +17,7 @@ module OoxmlParser
17
17
  node.attributes.each do |key, value|
18
18
  case key
19
19
  when 'activeCell'
20
- @active_cell = Coordinates.parse_coordinates_from_string(value.value)
20
+ @active_cell = Coordinates.new.parse_string(value.value)
21
21
  when 'activeCellId'
22
22
  @active_cell_id = value.value.to_i
23
23
  when 'sqref'
@@ -36,7 +36,7 @@ module OoxmlParser
36
36
  when 'showRowColHeaders'
37
37
  @show_row_column_headers = attribute_enabled?(value)
38
38
  when 'topLeftCell'
39
- @top_left_cell = Coordinates.parse_coordinates_from_string(value.value)
39
+ @top_left_cell = Coordinates.new.parse_string(value.value)
40
40
  when 'workbookViewId'
41
41
  @workbook_view_id = value.value.to_i
42
42
  when 'zoomScale'
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OoxmlParser
4
+ # Class for `sparkline` data
5
+ class Sparkline < OOXMLDocumentObject
6
+ # @return [String] reference to source range of sparkline
7
+ attr_reader :source_reference
8
+ # @return [String] reference to destination range of sparkline
9
+ attr_reader :destination_reference
10
+
11
+ # Parse Sparkline
12
+ # @param [Nokogiri::XML:Node] node with Sparkline
13
+ # @return [Sparkline] result of parsing
14
+ def parse(node)
15
+ node.xpath('*').each do |node_child|
16
+ case node_child.name
17
+ when 'f'
18
+ @source_reference = node_child.text
19
+ when 'sqref'
20
+ @destination_reference = node_child.text
21
+ end
22
+ end
23
+ self
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'sparklines/sparkline'
4
+ module OoxmlParser
5
+ # Class for `sparklines` data
6
+ class Sparklines < OOXMLDocumentObject
7
+ # @return [Array<Sparkline>] list of sparklines
8
+ attr_reader :sparklines
9
+
10
+ def initialize(parent: nil)
11
+ @sparklines = []
12
+ super
13
+ end
14
+
15
+ # @return [Sparkline] accessor
16
+ def [](key)
17
+ sparklines[key]
18
+ end
19
+
20
+ # Parse Sparklines data
21
+ # @param [Nokogiri::XML:Element] node with Sparklines data
22
+ # @return [Sparklines] value of Sparklines data
23
+ def parse(node)
24
+ node.xpath('*').each do |column_node|
25
+ case column_node.name
26
+ when 'sparkline'
27
+ @sparklines << Sparkline.new(parent: self).parse(column_node)
28
+ end
29
+ end
30
+ self
31
+ end
32
+ end
33
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'sparkline_group/sparklines'
3
4
  module OoxmlParser
4
5
  # Class for `sparklineGroup` data
5
6
  class SparklineGroup < OOXMLDocumentObject
@@ -49,6 +50,8 @@ module OoxmlParser
49
50
  attr_reader :color_negative
50
51
  # @return [OoxmlColor] markers color
51
52
  attr_reader :color_markers
53
+ # @return [Sparklines] sparklines
54
+ attr_reader :sparklines
52
55
 
53
56
  # Parse SparklineGroup
54
57
  # @param [Nokogiri::XML:Node] node with SparklineGroup
@@ -107,6 +110,8 @@ module OoxmlParser
107
110
  @color_negative = OoxmlColor.new(parent: self).parse(node_child)
108
111
  when 'colorMarkers'
109
112
  @color_markers = OoxmlColor.new(parent: self).parse(node_child)
113
+ when 'sparklines'
114
+ @sparklines = Sparklines.new(parent: self).parse(node_child)
110
115
  end
111
116
  end
112
117
  self