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.
- checksums.yaml +4 -4
- 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
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb +4 -6
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape.rb +14 -0
- data/lib/ooxml_parser/common_parser/common_data/coordinates.rb +30 -21
- data/lib/ooxml_parser/common_parser/common_data/hyperlink.rb +2 -2
- data/lib/ooxml_parser/common_parser/common_data/ooxml_document_object.rb +15 -23
- data/lib/ooxml_parser/common_parser/parser/encryption_checker.rb +43 -0
- data/lib/ooxml_parser/common_parser/parser.rb +5 -2
- data/lib/ooxml_parser/common_parser.rb +15 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments/comment.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments_extended/comment_extended.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments_extended.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_background.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_settings.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_structure_helpers.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_style/document_style_helper.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/document_style.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/bookmark_end.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/bookmark_start.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/comment_range_end.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/comment_range_start.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/accent.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/argument_properties/argument_size.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/argument_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/bar.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/box.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/delimeter.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/fraction.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/function.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/group_char.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/index.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/limit.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/math_run/math_run_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/math_run.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/matrix/matrix_row.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/matrix.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/nary/nary_properties/nary_grow.rb +0 -0
- 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
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/nary/nary_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/nary.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/pre_sub_superscript.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula/radical.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_formula.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_helper.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/docx_paragraph_run_helpers.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/object/ole_object.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/object.rb +0 -0
- 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
- 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
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape/shape_properties/stroke.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape/shape_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/shape.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/text_fill.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run/text_outline.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/docx_paragraph_run.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/field_simple.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/frame_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/indents.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/inserted.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/sdt/sdt_content.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/sdt/sdt_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/structured_document_tag.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph/style_parametres.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/docx_paragraph.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/header_footer.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/multilevel_type.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/level_justification.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/level_text.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/numbering_format.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level/suffix.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering/numbering_level.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/abstract_numbering.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering/numbering_definition.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/columns/column.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/columns.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/document_grid.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/footnote_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/note.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/page_margins.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/page_properties.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/page_properties/page_size.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles/document_defaults/paragraph_properties_default.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles/document_defaults/run_properties_default.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles/document_defaults.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles.rb +0 -0
- data/lib/ooxml_parser/docx_parser/{docx_data/document_structure.rb → document_structure.rb} +0 -0
- data/lib/ooxml_parser/{docx_parser/docx_parser.rb → docx_parser.rb} +2 -3
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/comment_authors/comment_author.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/comment_authors.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_comments/presentation_comment.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_comments.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_helpers.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/font_scheme/font_collection/text_font.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/font_scheme/font_collection.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/font_scheme.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme/theme_color.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/background/background_properties/stretch.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/background/background_properties.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/background.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/common_slide_data/shape_tree.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/common_slide_data.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/connection_shape.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/graphic_frame/graphic_frame.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/presentation_alternate_content.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/presentation_notes.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/shapes_grouping.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/animation_effect/animation_effect.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/set_time_node/behavior/behavior.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/set_time_node/behavior/target_element.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/set_time_node/set_time_node.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node/common_timing/codition_list/condition.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node/common_timing/condition_list.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node/common_timing.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing/time_node.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide/timing.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/slide_helper.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition/sound_action/sound.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition/sound_action.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition_properties/transition_properties/wheel.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/transition/transition_properties/transition_properties.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_layout_file.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_layouts_helper.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_master_file.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_masters_helper.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide_size.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/table_styles.rb +0 -0
- data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation.rb → presentation.rb} +0 -0
- data/lib/ooxml_parser/{pptx_parser/pptx_parser.rb → pptx_parser.rb} +1 -1
- data/lib/ooxml_parser/version.rb +1 -1
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/chartsheet.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/defined_name.rb +0 -0
- 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
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_fields/cache_field.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_fields.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_source/worksheet_source.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition/cache_source.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache/pivot_cache_definition.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_cache.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/column_row_items/column_row_item.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/column_row_items.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/location.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields/pivot_field/items/item.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields/pivot_field/items.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields/pivot_field.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_fields.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition/pivot_table_style_info.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/pivot_table_definition.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/shared_string_table/string_index.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/shared_string_table.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/sheet.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/cell_xfs/cell_style/alignment.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/workbook/style_sheet/cell_xfs/cell_style/protection.rb +32 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/cell_xfs/xf.rb +5 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/cell_xfs.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/differential_formatting_records.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fills/fill/pattern_fill.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fills/fill.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fills.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fonts/font.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/fonts.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/number_formats/number_format.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/number_formats.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/xlsx_borders/xlsx_border.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet/xlsx_borders.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/style_sheet.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/workbook_helpers.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/workbook/workbook_protection.rb +38 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments/author.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments/comment_list.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments/excel_comment.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/excel_comments.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/ole_objects.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/page_setup.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb +42 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_format_properties.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_protection.rb +117 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_view/pane.rb +1 -1
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_view/selection.rb +1 -1
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/sheet_view.rb +1 -1
- 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
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/autofilter/filter_column/custom_filters.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/autofilter/filter_column.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/autofilter.rb +0 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/conditional_formattings.rb +0 -0
- 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
- 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
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/data_validations.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines.rb +33 -0
- 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
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/sparkline_groups.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension/x14_table.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list/extension.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/extension_list.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/table_columns/table_column.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/table_columns.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part/table_style_info.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/table_part.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/worksheet_helper.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_column_properties.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_drawing/client_data.rb +27 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_drawing.rb +5 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_header_footer/header_footer_child.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_header_footer.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_row/xlsx_cell/formula.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_row/xlsx_cell.rb +0 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet/xlsx_row.rb +1 -1
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook → workbook}/worksheet.rb +13 -0
- data/lib/ooxml_parser/xlsx_parser/{xlsx_data/view_model/workbook.rb → workbook.rb} +12 -0
- data/lib/ooxml_parser/{xlsx_parser/xlsx_parser.rb → xlsx_parser.rb} +1 -1
- data/lib/ooxml_parser.rb +4 -16
- metadata +225 -218
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/fill_reference.rb +0 -31
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/line_reference.rb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7709109a298642b27297b3646d9b94c2dd73dd5ba6d52468dfe7c90c221d4809
|
4
|
+
data.tar.gz: '09db15c81f7f0c31d2a0bd7f5afcb7606c8455baa7140b1d0a340234ec34e74f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 515a28a6d616cb0bd272645ab0ec4d8c5365fcbb96f58141552a70eec3a34dd3e22ff207f997f1baa4624216b3452a351e803f5b93c6edbb73f12ad344b07448
|
7
|
+
data.tar.gz: e81fc4ad01b4fc326eea90a3a8758b95b9f7fe56cb4c6c46d53c2b50d0ba472007ee6c7412d0510d9550632c1ff6ff52202b6519ea8f92adb66c443137bef52c
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module OoxmlParser
|
4
|
-
# Class for parsing `a:effectRef` tags
|
5
|
-
class
|
4
|
+
# Class for parsing `a:fillRef`, `a:effectRef`, `a:lnRef` tags
|
5
|
+
class StyleMatrixReference < OOXMLDocumentObject
|
6
6
|
# @return [Integer] Style Matrix Index
|
7
7
|
attr_reader :index
|
8
8
|
# @return [Color] scheme color of EffectReference
|
9
9
|
attr_reader :scheme_color
|
10
10
|
|
11
|
-
# Parse
|
11
|
+
# Parse StyleMatrixReference object
|
12
12
|
# @param node [Nokogiri::XML:Element] node to parse
|
13
|
-
# @return [
|
13
|
+
# @return [StyleMatrixReference] result of parsing
|
14
14
|
def parse(node)
|
15
15
|
node.attributes.each do |key, value|
|
16
16
|
case key
|
@@ -1,9 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'shape_style/
|
4
|
-
require_relative 'shape_style/fill_reference'
|
3
|
+
require_relative 'shape_style/style_matrix_reference'
|
5
4
|
require_relative 'shape_style/font_reference'
|
6
|
-
require_relative 'shape_style/line_reference'
|
7
5
|
module OoxmlParser
|
8
6
|
# Class for parsing `wps:style` tags
|
9
7
|
class ShapeStyle < OOXMLDocumentObject
|
@@ -23,13 +21,13 @@ module OoxmlParser
|
|
23
21
|
node.xpath('*').each do |node_child|
|
24
22
|
case node_child.name
|
25
23
|
when 'effectRef'
|
26
|
-
@effect_reference =
|
24
|
+
@effect_reference = StyleMatrixReference.new(parent: self).parse(node_child)
|
27
25
|
when 'fillRef'
|
28
|
-
@fill_reference =
|
26
|
+
@fill_reference = StyleMatrixReference.new(parent: self).parse(node_child)
|
29
27
|
when 'fontRef'
|
30
28
|
@font_reference = FontReference.new(parent: self).parse(node_child)
|
31
29
|
when 'lnRef'
|
32
|
-
@line_reference =
|
30
|
+
@line_reference = StyleMatrixReference.new(parent: self).parse(node_child)
|
33
31
|
end
|
34
32
|
end
|
35
33
|
self
|
@@ -10,9 +10,16 @@ module OoxmlParser
|
|
10
10
|
# Class for parsing `sp`, `wsp` tags
|
11
11
|
class DocxShape < OOXMLDocumentObject
|
12
12
|
attr_accessor :non_visual_properties, :properties, :style, :body_properties, :text_body
|
13
|
+
# @return [True, False] Specifies if text in shape is locked when sheet is protected
|
14
|
+
attr_reader :locks_text
|
13
15
|
|
14
16
|
alias shape_properties properties
|
15
17
|
|
18
|
+
def initialize(parent: nil)
|
19
|
+
@locks_text = true
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
16
23
|
# @return [True, false] if structure contain any user data
|
17
24
|
def with_data?
|
18
25
|
return true if @text_body.nil?
|
@@ -27,6 +34,13 @@ module OoxmlParser
|
|
27
34
|
# @param node [Nokogiri::XML:Element] node to parse
|
28
35
|
# @return [DocxShape] result of parsing
|
29
36
|
def parse(node)
|
37
|
+
node.attributes.each do |key, value|
|
38
|
+
case key
|
39
|
+
when 'fLocksText'
|
40
|
+
@locks_text = attribute_enabled?(value)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
30
44
|
node.xpath('*').each do |node_child|
|
31
45
|
case node_child.name
|
32
46
|
when 'nvSpPr'
|
@@ -12,23 +12,6 @@ module OoxmlParser
|
|
12
12
|
end
|
13
13
|
|
14
14
|
class << self
|
15
|
-
# @param [String] string to parse
|
16
|
-
# @return [Coordinates]
|
17
|
-
def parse_coordinates_from_string(string)
|
18
|
-
coordinates = Coordinates.new
|
19
|
-
begin
|
20
|
-
coordinates.list = string.match(/'\w+'/)[0].delete("''")
|
21
|
-
rescue StandardError
|
22
|
-
'Raise Exception'
|
23
|
-
end
|
24
|
-
string = string.split('!').last
|
25
|
-
if coordinates?(string)
|
26
|
-
coordinates.row = string.scan(/[0-9]/).join.to_i
|
27
|
-
coordinates.column = string.scan(/[A-Z]/).join
|
28
|
-
end
|
29
|
-
coordinates
|
30
|
-
end
|
31
|
-
|
32
15
|
# Parse range of coordinates
|
33
16
|
# @param arguments_string [String] data to parse
|
34
17
|
# @return [Array] result
|
@@ -109,6 +92,18 @@ module OoxmlParser
|
|
109
92
|
end
|
110
93
|
end
|
111
94
|
|
95
|
+
# Parse string to coordinates
|
96
|
+
# @param [String] string to parse
|
97
|
+
# @return [Coordinates] result
|
98
|
+
def parse_string(string)
|
99
|
+
string = extract_list_from_string(string) if list_name_in_string?(string)
|
100
|
+
if Coordinates.coordinates?(string)
|
101
|
+
@row = string.scan(/\d/).join.to_i
|
102
|
+
@column = string.scan(/[A-Z]/).join
|
103
|
+
end
|
104
|
+
self
|
105
|
+
end
|
106
|
+
|
112
107
|
# @return [Integer] number of column
|
113
108
|
# This method takes @column string
|
114
109
|
# and converts into integer
|
@@ -118,10 +113,6 @@ module OoxmlParser
|
|
118
113
|
end
|
119
114
|
end
|
120
115
|
|
121
|
-
alias get_column_number column_number
|
122
|
-
extend Gem::Deprecate
|
123
|
-
deprecate :get_column_number, 'column_number', 2020, 1
|
124
|
-
|
125
116
|
# Compares rows of two cells
|
126
117
|
# @param [Coordinates] other_cell other cell coordinates
|
127
118
|
# @return [true, false] true, if row greater, than other row
|
@@ -151,5 +142,23 @@ module OoxmlParser
|
|
151
142
|
def ==(other)
|
152
143
|
other.is_a?(Coordinates) ? (@row == other.row && @column == other.column) : false
|
153
144
|
end
|
145
|
+
|
146
|
+
private
|
147
|
+
|
148
|
+
# Check if there is list name in string
|
149
|
+
# @param [String] string to check
|
150
|
+
# @return [Boolean] result
|
151
|
+
def list_name_in_string?(string)
|
152
|
+
string.include?('!')
|
153
|
+
end
|
154
|
+
|
155
|
+
# Extract list name and leave coordinates
|
156
|
+
# @param [String] string to parse
|
157
|
+
# @return [String] coordinates string without list
|
158
|
+
def extract_list_from_string(string)
|
159
|
+
split = string.split('!')
|
160
|
+
@list = split[0...-1].join('!')
|
161
|
+
split[-1]
|
162
|
+
end
|
154
163
|
end
|
155
164
|
end
|
@@ -43,14 +43,14 @@ module OoxmlParser
|
|
43
43
|
node.attributes.each do |key, value|
|
44
44
|
case key
|
45
45
|
when 'location'
|
46
|
-
@url = Coordinates.
|
46
|
+
@url = Coordinates.new.parse_string(value.value)
|
47
47
|
when 'id'
|
48
48
|
@id = value.value
|
49
49
|
@url = OOXMLDocumentObject.get_link_from_rels(@id) unless @id.empty?
|
50
50
|
when 'tooltip'
|
51
51
|
@tooltip = value.value
|
52
52
|
when 'ref'
|
53
|
-
@coordinates = Coordinates.
|
53
|
+
@coordinates = Coordinates.new.parse_string(value.value)
|
54
54
|
when 'action'
|
55
55
|
@action_link = value.value
|
56
56
|
when 'highlightClick'
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'filemagic' unless Gem.win_platform?
|
4
3
|
require 'securerandom'
|
5
4
|
require 'nokogiri'
|
6
5
|
require 'zip'
|
6
|
+
require 'ooxml_decrypt'
|
7
7
|
require_relative 'ooxml_document_object/nokogiri_parsing_exception'
|
8
8
|
require_relative 'ooxml_document_object/ooxml_document_object_helper'
|
9
9
|
require_relative 'ooxml_document_object/ooxml_object_attribute_helper'
|
@@ -58,28 +58,6 @@ module OoxmlParser
|
|
58
58
|
# @return [String] path to root folder
|
59
59
|
attr_accessor :path_to_folder
|
60
60
|
|
61
|
-
# @param path_to_file [String] file
|
62
|
-
# @param ignore_system [True, False] should host system be ignored, since
|
63
|
-
# this method is OS-dependent
|
64
|
-
# @return [True, False] Check if file is protected by password on open
|
65
|
-
def encrypted_file?(path_to_file, ignore_system: false)
|
66
|
-
if Gem.win_platform? || ignore_system
|
67
|
-
warn 'FileMagic and checking file for encryption is not supported on Windows'
|
68
|
-
return false
|
69
|
-
end
|
70
|
-
file_result = FileMagic.new(:mime).file(path_to_file)
|
71
|
-
# Support of Encrtypted status in `file` util was introduced in file v5.20
|
72
|
-
# but LTS version of ubuntu before 16.04 uses older `file` and it return `Composite Document`
|
73
|
-
# https://github.com/file/file/blob/master/ChangeLog#L217
|
74
|
-
if file_result.include?('encrypted') ||
|
75
|
-
file_result.include?('Composite Document File V2 Document, No summary info') ||
|
76
|
-
file_result.include?('application/CDFV2-corrupt')
|
77
|
-
warn("File #{path_to_file} is encrypted. Can't parse it")
|
78
|
-
return true
|
79
|
-
end
|
80
|
-
false
|
81
|
-
end
|
82
|
-
|
83
61
|
# Copy this file and rename to zip
|
84
62
|
# @param path [String] path to file
|
85
63
|
# @return [String] path to result zip
|
@@ -95,6 +73,20 @@ module OoxmlParser
|
|
95
73
|
file_path
|
96
74
|
end
|
97
75
|
|
76
|
+
# Decrypt file protected with password
|
77
|
+
# @param path [String] path to file
|
78
|
+
# @param password [String] password to file
|
79
|
+
# @return [String] path to decrypted file
|
80
|
+
def decrypt_file(path, password)
|
81
|
+
file_name = File.basename(path)
|
82
|
+
tmp_folder = Dir.mktmpdir('ruby-ooxml-parser')
|
83
|
+
decrypted_path = "#{tmp_folder}/#{file_name}"
|
84
|
+
binary_password = password.encode('utf-16le').bytes.pack('c*').encode('binary')
|
85
|
+
OoxmlDecrypt::EncryptedFile.decrypt_to_file(path, binary_password, decrypted_path)
|
86
|
+
|
87
|
+
decrypted_path
|
88
|
+
end
|
89
|
+
|
98
90
|
# Unzip specified file
|
99
91
|
# @param path_to_file [String] path to zip file
|
100
92
|
# @param destination [String] folder to extract
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# Check if file is encrypted
|
5
|
+
class EncryptionChecker
|
6
|
+
def initialize(file_path, ignore_system: false)
|
7
|
+
@file_path = file_path
|
8
|
+
@ignore_system = ignore_system
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [Boolean] is file encrypted
|
12
|
+
def encrypted?
|
13
|
+
return false unless compatible_system?
|
14
|
+
|
15
|
+
# Support of Encrypted status in `file` util was introduced in file v5.20
|
16
|
+
# but LTS version of ubuntu before 16.04 uses older `file` and it return `Composite Document`
|
17
|
+
# https://github.com/file/file/blob/0eb7c1b83341cc954620b45d2e2d65ee7df1a4e7/ChangeLog#L623
|
18
|
+
if mime_type.include?('encrypted') ||
|
19
|
+
mime_type.include?('Composite Document File V2 Document, No summary info') ||
|
20
|
+
mime_type.include?('application/CDFV2-corrupt')
|
21
|
+
warn("File #{@file_path} is encrypted. Can't parse it")
|
22
|
+
return true
|
23
|
+
end
|
24
|
+
false
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
# Check if system is compatible with `file` utility
|
30
|
+
# @return [Boolean] Result of check
|
31
|
+
def compatible_system?
|
32
|
+
return true if !Gem.win_platform? && !@ignore_system
|
33
|
+
|
34
|
+
warn 'Checking file for encryption is not supported on Windows'
|
35
|
+
false
|
36
|
+
end
|
37
|
+
|
38
|
+
# @return [String] mime type of file
|
39
|
+
def mime_type
|
40
|
+
@mime_type ||= `file -b --mime "#{@file_path}"`
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative 'parser/encryption_checker'
|
4
|
+
|
3
5
|
module OoxmlParser
|
4
6
|
# Basic class for OoxmlParser
|
5
7
|
class Parser
|
@@ -7,7 +9,7 @@ module OoxmlParser
|
|
7
9
|
# @param path_to_file [String] file
|
8
10
|
# @return [CommonDocumentStructure] structure of doc
|
9
11
|
def self.parse_format(path_to_file)
|
10
|
-
return nil if
|
12
|
+
return nil if EncryptionChecker.new(path_to_file).encrypted?
|
11
13
|
|
12
14
|
path_to_zip_file = OOXMLDocumentObject.copy_file_and_rename_to_zip(path_to_file)
|
13
15
|
OOXMLDocumentObject.path_to_folder = path_to_zip_file.sub(File.basename(path_to_zip_file), '')
|
@@ -21,7 +23,8 @@ module OoxmlParser
|
|
21
23
|
# Base method to parse document of any type
|
22
24
|
# @param path_to_file [String] file
|
23
25
|
# @return [CommonDocumentStructure] structure of doc
|
24
|
-
def self.parse(path_to_file)
|
26
|
+
def self.parse(path_to_file, password: nil)
|
27
|
+
path_to_file = OOXMLDocumentObject.decrypt_file(path_to_file, password) if password
|
25
28
|
Parser.parse_format(path_to_file) do
|
26
29
|
format = Parser.recognize_folder_format
|
27
30
|
case format
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'common_parser/common_data/ooxml_document_object'
|
4
|
+
require_relative 'common_parser/common_data/color'
|
5
|
+
require_relative 'common_parser/common_data/coordinates'
|
6
|
+
require_relative 'common_parser/common_data/font_style'
|
7
|
+
require_relative 'common_parser/common_data/borders_properties'
|
8
|
+
require_relative 'common_parser/common_data/hyperlink'
|
9
|
+
require_relative 'common_parser/common_data/paragraph'
|
10
|
+
require_relative 'common_parser/common_data/alternate_content/alternate_content'
|
11
|
+
require_relative 'common_parser/common_data/colors/presentation_fill'
|
12
|
+
require_relative 'common_parser/common_data/table'
|
13
|
+
require_relative 'common_parser/common_data/relationships'
|
14
|
+
require_relative 'common_parser/parser'
|
15
|
+
require_relative 'common_parser/common_document_structure'
|
File without changes
|
data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/comments.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/numbering.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/ooxml_parser/docx_parser/{docx_data/document_structure → document_structure}/styles.rb
RENAMED
File without changes
|
File without changes
|
@@ -1,8 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative '
|
4
|
-
require_relative '
|
5
|
-
require_relative 'docx_data/document_structure'
|
3
|
+
require_relative 'common_parser/common_data/valued_child'
|
4
|
+
require_relative 'docx_parser/document_structure'
|
6
5
|
|
7
6
|
module OoxmlParser
|
8
7
|
# Basic class for DocxParser
|
File without changes
|
data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/comment_authors.rb
RENAMED
File without changes
|
File without changes
|
data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_comments.rb
RENAMED
File without changes
|
data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_helpers.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/presentation_theme.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/background.rb
RENAMED
File without changes
|
File without changes
|
data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/common_slide_data.rb
RENAMED
File without changes
|
data/lib/ooxml_parser/pptx_parser/{pptx_data/presentation → presentation}/slide/connection_shape.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|