ooxml_parser 0.14.1-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/alternate_content/chart_style.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/alternate_content/choice/math_text/math_paragraph.rb +21 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/alternate_content/choice/math_text.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/alternate_content/choice.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/alternate_content.rb +42 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats/pivot_format.rb +26 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats.rb +33 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area/common_chart_data.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/plot_area.rb +67 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/number_string_reference.rb +27 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb +36 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache/point/text_value.rb +17 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache/point.rb +38 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/x_y_values.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb +52 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/view_3d.rb +34 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart.rb +174 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_axis/scaling.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_axis.rb +48 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_axis_title.rb +42 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_cells_range.rb +30 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_legend.rb +39 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart_point.rb +13 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/display_labels_properties.rb +43 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/docx_drawing/doc_properties.rb +26 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/docx_drawing.rb +46 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_distance_from_text.rb +27 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_position.rb +30 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_drawing_properties.rb +63 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/docx_wrap_drawing.rb +44 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/ooxml_coordinates.rb +46 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/ooxml_size.rb +116 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/size_relative/picture_dimension.rb +19 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/size_relative_horizontal.rb +33 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/size_relative_vertical.rb +32 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/docx_graphic.rb +37 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip/file_reference.rb +43 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb +29 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_picture.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/common_non_visual_properties.rb +40 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/non_visual_properties/shape_placeholder.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties/non_visual_properties.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/non_visual_shape_properties.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/ooxml_text_box.rb +29 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/fill_reference.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/font_reference.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/line_reference.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style.rb +38 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/text_body.rb +28 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape.rb +49 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_body_properties/ooxml_shape_body_properties/preset_text_warp.rb +21 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_body_properties/ooxml_shape_body_properties.rb +49 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/color/docx_color_scheme.rb +43 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/color/docx_pattern_fill.rb +24 -0
- 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 +39 -0
- 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 +34 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb +29 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_color.rb +42 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_line.rb +63 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/blip_fill/blip/alpha_mod_fix.rb +21 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/blip_fill/blip.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/blip_fill.rb +26 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list/shape_guide.rb +26 -0
- 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 +33 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry.rb +26 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/text_box.rb +26 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties.rb +59 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_size.rb +52 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/line/line_end.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/group/old_docx_group.rb +35 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/group/old_docx_group_element.rb +12 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/group/old_docx_group_properties.rb +8 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/old_docx_picture.rb +28 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb +29 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape_fill.rb +32 -0
- data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape_properties.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/borders_properties.rb +73 -0
- data/lib/ooxml_parser/common_parser/common_data/color/color_helper.rb +59 -0
- data/lib/ooxml_parser/common_parser/common_data/color/color_indexes.list +66 -0
- data/lib/ooxml_parser/common_parser/common_data/color/ooxml_color.rb +66 -0
- data/lib/ooxml_parser/common_parser/common_data/color.rb +308 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/color_alpha_channel.rb +17 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/color_properties.rb +34 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/hsl_color.rb +67 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/image_fill.rb +33 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/gradient_color/gradient_stop.rb +30 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/gradient_color/linear_gradient.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/gradient_color.rb +36 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/presentation_pattern.rb +30 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill.rb +41 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/scheme_color.rb +19 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/theme_colors.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/colors/tile.rb +27 -0
- data/lib/ooxml_parser/common_parser/common_data/content_types/content_type_default.rb +26 -0
- data/lib/ooxml_parser/common_parser/common_data/content_types/content_type_override.rb +26 -0
- data/lib/ooxml_parser/common_parser/common_data/content_types.rb +45 -0
- data/lib/ooxml_parser/common_parser/common_data/coordinates.rb +155 -0
- data/lib/ooxml_parser/common_parser/common_data/font_style.rb +42 -0
- data/lib/ooxml_parser/common_parser/common_data/hyperlink.rb +89 -0
- data/lib/ooxml_parser/common_parser/common_data/ooxml_document_object/ooxml_document_object_helper.rb +117 -0
- data/lib/ooxml_parser/common_parser/common_data/ooxml_document_object/ooxml_object_attribute_helper.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/ooxml_document_object.rb +144 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_properties.rb +109 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/position.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/run_spacing.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/run_style.rb +27 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/shade.rb +60 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/size.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties.rb +148 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/text.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run.rb +63 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering_properties.rb +41 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/paragraph_borders.rb +57 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/paragraph_spacing.rb +38 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/paragraph_stlye_ref.rb +27 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/spacing/line_spacing.rb +33 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/spacing.rb +100 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/tabs/tab.rb +42 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/tabs.rb +38 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph/text_field.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/paragraph.rb +46 -0
- data/lib/ooxml_parser/common_parser/common_data/relationships/relationship.rb +30 -0
- data/lib/ooxml_parser/common_parser/common_data/relationships.rb +68 -0
- data/lib/ooxml_parser/common_parser/common_data/table/margins/paragraph_margins.rb +33 -0
- data/lib/ooxml_parser/common_parser/common_data/table/margins/table_margins.rb +54 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_element.rb +23 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_layout.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_look.rb +48 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_position.rb +50 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb +61 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style_column_band_size.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style_properties/table_style_properties_helper.rb +45 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style_properties.rb +57 -0
- data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style_row_band_size.rb +25 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/cell/cell.rb +52 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/cell/cell_properties.rb +89 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/cell/grid_span.rb +29 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/border.rb +29 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/borders.rb +96 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line/line_join.rb +21 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/cell/properties/table_cell_line.rb +43 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/row/table_row_properties/table_row_height.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/row/table_row_properties.rb +34 -0
- data/lib/ooxml_parser/common_parser/common_data/table/row/row.rb +40 -0
- data/lib/ooxml_parser/common_parser/common_data/table/table_grid/grid_column.rb +22 -0
- data/lib/ooxml_parser/common_parser/common_data/table/table_grid.rb +38 -0
- data/lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb +42 -0
- data/lib/ooxml_parser/common_parser/common_data/table/table_properties.rb +104 -0
- data/lib/ooxml_parser/common_parser/common_data/table.rb +52 -0
- data/lib/ooxml_parser/common_parser/common_data/underline.rb +50 -0
- data/lib/ooxml_parser/common_parser/common_data/valued_child.rb +31 -0
- data/lib/ooxml_parser/common_parser/common_document_structure.rb +25 -0
- data/lib/ooxml_parser/common_parser/parser.rb +49 -0
- data/lib/ooxml_parser/configuration.rb +13 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/comments/comment.rb +37 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/comments.rb +36 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/comments_extended/comment_extended.rb +26 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/comments_extended.rb +42 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_background.rb +35 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_properties.rb +33 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_settings.rb +25 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_structure_helpers.rb +19 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_style/document_style_helper.rb +39 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_style.rb +98 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/bookmark_end.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/bookmark_start.rb +26 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/comment_range_end.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/comment_range_start.rb +27 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/accent.rb +27 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/argument_properties/argument_size.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/argument_properties.rb +23 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/bar.rb +32 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/box.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/delimeter.rb +35 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/fraction.rb +23 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/function.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/group_char.rb +31 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/index.rb +24 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/limit.rb +28 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/math_run/math_run_properties.rb +27 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/math_run.rb +27 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/matrix/matrix_row.rb +13 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/matrix.rb +45 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/nary/nary_properties/nary_grow.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/nary/nary_properties/nary_limit_location.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/nary/nary_properties.rb +28 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/nary.rb +33 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/pre_sub_superscript.rb +32 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/radical.rb +27 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula.rb +75 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_helper.rb +20 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/docx_paragraph_run_helpers.rb +111 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/object/ole_object.rb +25 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/object.rb +23 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shape_properties/shape_margins.rb +14 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shape_properties/shape_size.rb +13 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shape_properties/stroke.rb +13 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shape_properties.rb +19 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape.rb +77 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/text_fill.rb +16 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/text_outline.rb +29 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run.rb +147 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/field_simple.rb +41 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/frame_properties.rb +51 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/indents.rb +51 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/inserted.rb +57 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_content.rb +46 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb +30 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/structured_document_tag.rb +28 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb +30 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph.rb +273 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/header_footer.rb +63 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/multilevel_type.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/numbering_level/level_justification.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/numbering_level/level_text.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/numbering_level/numbering_format.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/numbering_level/suffix.rb +33 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering/numbering_level.rb +66 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering.rb +44 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/numbering_definition.rb +32 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering.rb +56 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/columns/column.rb +23 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/columns.rb +56 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/document_grid.rb +25 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb +34 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/note.rb +52 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_margins.rb +45 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_properties.rb +83 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_size.rb +62 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/styles/document_defaults/paragraph_properties_default.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/styles/document_defaults/run_properties_default.rb +22 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/styles/document_defaults.rb +28 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/styles.rb +32 -0
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure.rb +290 -0
- data/lib/ooxml_parser/docx_parser/docx_parser.rb +19 -0
- data/lib/ooxml_parser/helpers/string_helper.rb +24 -0
- data/lib/ooxml_parser/name.rb +9 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/comment_authors/comment_author.rb +38 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/comment_authors.rb +39 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_comments/presentation_comment.rb +39 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_comments.rb +33 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_helpers.rb +16 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme/font_scheme/font_collection/text_font.rb +22 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme/font_scheme/font_collection.rb +31 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme/font_scheme.rb +36 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme/theme_color.rb +47 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme.rb +54 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/background/background_properties/stretch.rb +13 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/background/background_properties.rb +23 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/background.rb +35 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/common_slide_data/shape_tree.rb +35 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/common_slide_data.rb +28 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/connection_shape.rb +7 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/graphic_frame/graphic_frame.rb +50 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb +27 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_notes.rb +23 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/shapes_grouping.rb +38 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb +30 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/set_time_node/behavior/behavior.rb +33 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/set_time_node/behavior/target_element.rb +28 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/set_time_node/set_time_node.rb +23 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing/codition_list/condition.rb +23 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing/condition_list.rb +27 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb +44 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node.rb +59 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing.rb +29 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide_helper.rb +68 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb +25 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action.rb +22 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition.rb +36 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties/wheel.rb +22 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb +30 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide.rb +85 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_size.rb +25 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/table_styles.rb +38 -0
- data/lib/ooxml_parser/pptx_parser/pptx_data/presentation.rb +62 -0
- data/lib/ooxml_parser/pptx_parser/pptx_parser.rb +17 -0
- data/lib/ooxml_parser/version.rb +9 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/chartsheet.rb +33 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/defined_name.rb +33 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb +42 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field.rb +37 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition/cache_fields.rb +43 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition/cache_source/worksheet_source.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition/cache_source.rb +33 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition.rb +43 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache.rb +41 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/column_row_items/column_row_item.rb +22 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/column_row_items.rb +43 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb +34 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_fields/pivot_field/items.rb +43 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_fields/pivot_field.rb +37 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_fields.rb +43 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_table_style_info.rb +42 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition.rb +114 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/shared_string_table/string_index.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/shared_string_table.rb +46 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/cell_xfs/cell_style/alignment.rb +35 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/cell_xfs/xf.rb +150 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/cell_xfs.rb +37 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fills/fill/pattern_fill.rb +35 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fills/fill.rb +49 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fills.rb +40 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fonts/font.rb +44 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fonts.rb +40 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/number_formats/number_format.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/number_formats.rb +44 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/xlsx_borders/xlsx_border.rb +34 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/xlsx_borders.rb +37 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet.rb +50 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/workbook_helpers.rb +14 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/author.rb +16 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/comment_list.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment.rb +31 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments.rb +44 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/ole_objects.rb +20 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/page_setup.rb +105 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_format_properties.rb +23 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_view/pane.rb +27 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/sheet_view.rb +41 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column/custom_filters/custom_filter.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column/custom_filters.rb +42 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column.rb +40 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter.rb +36 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/data_validations/data_validation/data_validation_formula.rb +22 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/data_validations/data_validation.rb +88 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/data_validations.rb +47 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group.rb +115 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/sparkline_groups.rb +33 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/x14_table.rb +26 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension.rb +33 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list.rb +32 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_columns/table_column.rb +34 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_columns.rb +42 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_style_info.rb +43 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part.rb +50 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/worksheet_helper.rb +14 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_column_properties.rb +54 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb +27 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb +40 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_header_footer/header_footer_child.rb +56 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_header_footer.rb +64 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row/xlsx_cell/formula.rb +39 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row/xlsx_cell.rb +84 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row.rb +43 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet.rb +152 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook.rb +165 -0
- data/lib/ooxml_parser/xlsx_parser/xlsx_parser.rb +17 -0
- data/lib/ooxml_parser.rb +40 -0
- metadata +572 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# Class Header Footer classes
|
5
|
+
class HeaderFooter < OOXMLDocumentObject
|
6
|
+
# @return [Integer] id of header-footer
|
7
|
+
attr_reader :id
|
8
|
+
# @return [Array<OOXMLDocumentObject>] list of elements if object
|
9
|
+
attr_reader :elements
|
10
|
+
# @return [Symbol] `:header` or `:footer`
|
11
|
+
attr_reader :type
|
12
|
+
# @return [String] suffix for object files
|
13
|
+
attr_reader :path_suffix
|
14
|
+
|
15
|
+
def initialize(type = :header, parent: nil)
|
16
|
+
@type = type
|
17
|
+
@elements = []
|
18
|
+
super(parent: parent)
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [String] string for search of xpath
|
22
|
+
def xpath_for_search
|
23
|
+
"//w:#{path_suffix}"
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [String] string with xml path
|
27
|
+
def xml_path
|
28
|
+
"word/#{path_suffix}s.xml"
|
29
|
+
end
|
30
|
+
|
31
|
+
# Parse type and path suffix by node type
|
32
|
+
# @param [Nokogiri::XML:Node] node with HeaderFooter
|
33
|
+
def parse_type(node)
|
34
|
+
case node.name
|
35
|
+
when 'footnoteReference'
|
36
|
+
@path_suffix = 'footnote'
|
37
|
+
@type = :header
|
38
|
+
when 'endnoteReference'
|
39
|
+
@path_suffix = 'endnote'
|
40
|
+
@type = :footer
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Parse HeaderFooter
|
45
|
+
# @param [Nokogiri::XML:Node] node with HeaderFooter
|
46
|
+
# @return [HeaderFooter] result of parsing
|
47
|
+
def parse(node)
|
48
|
+
@id = node.attribute('id').value.to_i
|
49
|
+
parse_type(node)
|
50
|
+
doc = parse_xml(OOXMLDocumentObject.path_to_folder + xml_path)
|
51
|
+
doc.search(xpath_for_search).each do |footnote|
|
52
|
+
next unless footnote.attribute('id').value.to_i == @id
|
53
|
+
|
54
|
+
paragraph_number = 0
|
55
|
+
footnote.xpath('w:p').each do |paragraph|
|
56
|
+
@elements << DocumentStructure.default_paragraph_style.dup.parse(paragraph, paragraph_number, DocumentStructure.default_run_style, parent: self)
|
57
|
+
paragraph_number += 1
|
58
|
+
end
|
59
|
+
end
|
60
|
+
self
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# This element specifies the type of numbering defined by a given abstract numbering type
|
5
|
+
class MultilevelType < OOXMLDocumentObject
|
6
|
+
# @return [String] value of Multilevel Type
|
7
|
+
attr_accessor :value
|
8
|
+
|
9
|
+
# Parse MultilevelType
|
10
|
+
# @param [Nokogiri::XML:Node] node with MultilevelType
|
11
|
+
# @return [MultilevelType] result of parsing
|
12
|
+
def parse(node)
|
13
|
+
node.attributes.each do |key, value|
|
14
|
+
case key
|
15
|
+
when 'val'
|
16
|
+
@value = value_to_symbol(value)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
self
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# Class for storing Level Justification, `lvlJc` tag
|
5
|
+
class LevelJustification < OOXMLDocumentObject
|
6
|
+
# @return [String] value of start
|
7
|
+
attr_accessor :value
|
8
|
+
|
9
|
+
# Parse LevelJustification
|
10
|
+
# @param [Nokogiri::XML:Node] node with LevelJustification
|
11
|
+
# @return [LevelJustification] result of parsing
|
12
|
+
def parse(node)
|
13
|
+
node.attributes.each do |key, value|
|
14
|
+
case key
|
15
|
+
when 'val'
|
16
|
+
@value = value.value.to_s
|
17
|
+
end
|
18
|
+
end
|
19
|
+
self
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# Class for storing Level Text, `lvlText` tag
|
5
|
+
class LevelText < OOXMLDocumentObject
|
6
|
+
# @return [String] value of start
|
7
|
+
attr_accessor :value
|
8
|
+
|
9
|
+
# Parse LevelText
|
10
|
+
# @param [Nokogiri::XML:Node] node with LevelText
|
11
|
+
# @return [LevelText] result of parsing
|
12
|
+
def parse(node)
|
13
|
+
node.attributes.each do |key, value|
|
14
|
+
case key
|
15
|
+
when 'val'
|
16
|
+
@value = value.value.to_s
|
17
|
+
end
|
18
|
+
end
|
19
|
+
self
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# Class for storing Numbering Format data, `numFmt` tag
|
5
|
+
class NumberingFormat < OOXMLDocumentObject
|
6
|
+
# @return [String] value of start
|
7
|
+
attr_accessor :value
|
8
|
+
|
9
|
+
# Parse NumberingFormat
|
10
|
+
# @param [Nokogiri::XML:Node] node with NumberingFormat
|
11
|
+
# @return [NumberingFormat] result of parsing
|
12
|
+
def parse(node)
|
13
|
+
node.attributes.each do |key, value|
|
14
|
+
case key
|
15
|
+
when 'val'
|
16
|
+
@value = value.value.to_s
|
17
|
+
end
|
18
|
+
end
|
19
|
+
self
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# Class for storing Suffix `w:suff`
|
5
|
+
# This element specifies the content which
|
6
|
+
# shall be added between a given numbering level's text and the text of
|
7
|
+
# every numbered paragraph which references that numbering level.
|
8
|
+
# If this element is omitted, then its value shall be assumed to be tab.
|
9
|
+
# >ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference 17.9.29.
|
10
|
+
class Suffix < OOXMLDocumentObject
|
11
|
+
# @return [String] value of suffix
|
12
|
+
attr_accessor :value
|
13
|
+
|
14
|
+
def initialize(value = :tab,
|
15
|
+
parent: nil)
|
16
|
+
@value = value
|
17
|
+
super(parent: parent)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Parse Suffix
|
21
|
+
# @param [Nokogiri::XML:Node] node with Suffix
|
22
|
+
# @return [Suffix] result of parsing
|
23
|
+
def parse(node)
|
24
|
+
node.attributes.each do |key, value|
|
25
|
+
case key
|
26
|
+
when 'val'
|
27
|
+
@value = value.value.to_sym
|
28
|
+
end
|
29
|
+
end
|
30
|
+
self
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'numbering_level/level_justification'
|
4
|
+
require_relative 'numbering_level/level_text'
|
5
|
+
require_relative 'numbering_level/numbering_format'
|
6
|
+
require_relative 'numbering_level/suffix'
|
7
|
+
module OoxmlParser
|
8
|
+
# This element specifies the appearance and behavior of a numbering level
|
9
|
+
# within a given abstract numbering
|
10
|
+
class NumberingLevel < OOXMLDocumentObject
|
11
|
+
# @return [Integer] level id
|
12
|
+
attr_accessor :ilvl
|
13
|
+
# @return [Start] start data
|
14
|
+
attr_accessor :start
|
15
|
+
# @return [NumberingFormat] numbering format data
|
16
|
+
attr_accessor :numbering_format
|
17
|
+
# @return [LevelText] level text
|
18
|
+
attr_accessor :text
|
19
|
+
# @return [LevelJustification] justification of level
|
20
|
+
attr_accessor :justification
|
21
|
+
# @return [ParagraphProperties] properties of paragraph
|
22
|
+
attr_accessor :paragraph_properties
|
23
|
+
# @return [RunProperties] properties of run
|
24
|
+
attr_accessor :run_properties
|
25
|
+
# @return [Suffix] value of Suffix
|
26
|
+
attr_accessor :suffix
|
27
|
+
|
28
|
+
def initialize(parent: nil)
|
29
|
+
@suffix = Suffix.new(parent: self)
|
30
|
+
super
|
31
|
+
end
|
32
|
+
|
33
|
+
# Parse Numbering Level data
|
34
|
+
# @param [Nokogiri::XML:Element] node with Numbering Level data
|
35
|
+
# @return [NumberingLevel] value of Numbering Level data
|
36
|
+
def parse(node)
|
37
|
+
node.attributes.each do |key, value|
|
38
|
+
case key
|
39
|
+
when 'ilvl'
|
40
|
+
@ilvl = value.value.to_f
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
node.xpath('*').each do |num_level_child|
|
45
|
+
case num_level_child.name
|
46
|
+
when 'start'
|
47
|
+
@start = ValuedChild.new(:integer, parent: self).parse(num_level_child)
|
48
|
+
when 'numFmt'
|
49
|
+
@numbering_format = NumberingFormat.new(parent: self).parse(num_level_child)
|
50
|
+
when 'lvlText'
|
51
|
+
@text = LevelText.new(parent: self).parse(num_level_child)
|
52
|
+
when 'lvlJc'
|
53
|
+
@justification = LevelJustification.new(parent: self).parse(num_level_child)
|
54
|
+
when 'pPr'
|
55
|
+
@paragraph_properties = ParagraphProperties.new(parent: self).parse(num_level_child)
|
56
|
+
when 'rPr'
|
57
|
+
@run_properties = RunProperties.new(parent: self).parse(num_level_child)
|
58
|
+
when 'suff'
|
59
|
+
@suffix = @suffix.parse(num_level_child)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
self
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/abstract_numbering.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'abstract_numbering/multilevel_type'
|
4
|
+
require_relative 'abstract_numbering/numbering_level'
|
5
|
+
module OoxmlParser
|
6
|
+
# This element specifies a set of properties which shall dictate the appearance and
|
7
|
+
# behavior of a set of numbered
|
8
|
+
# paragraphs in a WordprocessingML document.
|
9
|
+
class AbstractNumbering < OOXMLDocumentObject
|
10
|
+
# @return [Integer] abstruct numbering id
|
11
|
+
attr_accessor :id
|
12
|
+
# @return [MultilevelType] myltylevel type
|
13
|
+
attr_accessor :multilevel_type
|
14
|
+
# @return [Array, NumberingLevel] numbering level data list
|
15
|
+
attr_accessor :level_list
|
16
|
+
|
17
|
+
def initialize(parent: nil)
|
18
|
+
@level_list = []
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
# Parse Abstract Numbering data
|
23
|
+
# @param [Nokogiri::XML:Element] node with Abstract Numbering data
|
24
|
+
# @return [AbstractNumbering] value of Abstract Numbering data
|
25
|
+
def parse(node)
|
26
|
+
node.attributes.each do |key, value|
|
27
|
+
case key
|
28
|
+
when 'abstractNumId'
|
29
|
+
@id = value.value.to_f
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
node.xpath('*').each do |numbering_child_node|
|
34
|
+
case numbering_child_node.name
|
35
|
+
when 'multiLevelType'
|
36
|
+
@multilevel_type = MultilevelType.new(parent: self).parse(numbering_child_node)
|
37
|
+
when 'lvl'
|
38
|
+
@level_list << NumberingLevel.new(parent: self).parse(numbering_child_node)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
self
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/ooxml_parser/docx_parser/docx_data/document_structure/numbering/numbering_definition.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# This element specifies a unique instance of numbering information that can be referenced by zero or more
|
5
|
+
# paragraphs within the parent WordprocessingML document.
|
6
|
+
class NumberingDefinition < OOXMLDocumentObject
|
7
|
+
# @return [Integer] num id
|
8
|
+
attr_accessor :id
|
9
|
+
# @return [ValuedChild] abstract numbering id
|
10
|
+
attr_accessor :abstract_numbering_id
|
11
|
+
|
12
|
+
# Parse NumberingDefinition data
|
13
|
+
# @param [Nokogiri::XML:Element] node with NumberingDefinition data
|
14
|
+
# @return [NumberingDefinition] value of Abstract Numbering data
|
15
|
+
def parse(node)
|
16
|
+
node.attributes.each do |key, value|
|
17
|
+
case key
|
18
|
+
when 'numId'
|
19
|
+
@id = value.value.to_f
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
node.xpath('*').each do |numbering_child_node|
|
24
|
+
case numbering_child_node.name
|
25
|
+
when 'abstractNumId'
|
26
|
+
@abstract_numbering_id = ValuedChild.new(:integer, parent: self).parse(numbering_child_node)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
self
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'numbering/abstract_numbering'
|
4
|
+
require_relative 'numbering/numbering_definition'
|
5
|
+
|
6
|
+
module OoxmlParser
|
7
|
+
# Class for data of Numbering
|
8
|
+
class Numbering < OOXMLDocumentObject
|
9
|
+
# @return [Array, AbstractNumbering] abstract numbering list
|
10
|
+
attr_accessor :abstract_numbering_list
|
11
|
+
# @return [Array, NumberingDefinition] numbering definition list
|
12
|
+
attr_accessor :numbering_definition_list
|
13
|
+
|
14
|
+
def initialize(parent: nil)
|
15
|
+
@abstract_numbering_list = []
|
16
|
+
@numbering_definition_list = []
|
17
|
+
super
|
18
|
+
end
|
19
|
+
|
20
|
+
# Get properties by number id
|
21
|
+
# @param num_id [Integer] index of number id
|
22
|
+
# @return [nil, AbstractNumbering] result of search
|
23
|
+
def properties_by_num_id(num_id)
|
24
|
+
abstract_num_id = nil
|
25
|
+
@numbering_definition_list.each do |num_def|
|
26
|
+
next unless num_id == num_def.id
|
27
|
+
|
28
|
+
abstract_num_id = num_def.abstract_numbering_id.value
|
29
|
+
break
|
30
|
+
end
|
31
|
+
return nil if abstract_num_id.nil?
|
32
|
+
|
33
|
+
@abstract_numbering_list.each do |abstract_num_item|
|
34
|
+
return abstract_num_item if abstract_num_id == abstract_num_item.id
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Parse Numbering data
|
39
|
+
# @return [Numbering] result of parse
|
40
|
+
def parse
|
41
|
+
numbering_xml = "#{OOXMLDocumentObject.path_to_folder}word/numbering.xml"
|
42
|
+
return nil unless File.exist?(numbering_xml)
|
43
|
+
|
44
|
+
node = parse_xml(File.open(numbering_xml))
|
45
|
+
node.xpath('w:numbering/*').each do |numbering_child_node|
|
46
|
+
case numbering_child_node.name
|
47
|
+
when 'abstractNum'
|
48
|
+
@abstract_numbering_list << AbstractNumbering.new(parent: self).parse(numbering_child_node)
|
49
|
+
when 'num'
|
50
|
+
@numbering_definition_list << NumberingDefinition.new(parent: self).parse(numbering_child_node)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
self
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/columns/column.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OoxmlParser
|
4
|
+
# Class for parsing `w:col` object
|
5
|
+
class Column < OOXMLDocumentObject
|
6
|
+
attr_accessor :width, :space, :separator
|
7
|
+
|
8
|
+
# Parse Column
|
9
|
+
# @param [Nokogiri::XML:Node] node with Column
|
10
|
+
# @return [Column] result of parsing
|
11
|
+
def parse(node)
|
12
|
+
node.attributes.each do |key, value|
|
13
|
+
case key
|
14
|
+
when 'w'
|
15
|
+
@width = OoxmlSize.new(value.value.to_f)
|
16
|
+
when 'space'
|
17
|
+
@space = OoxmlSize.new(value.value.to_f)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
self
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'columns/column'
|
4
|
+
module OoxmlParser
|
5
|
+
# Class for data of Columns
|
6
|
+
class Columns < OOXMLDocumentObject
|
7
|
+
# @return [Integer] count of columns
|
8
|
+
attr_accessor :count
|
9
|
+
# @return [True, False] is columns are equal width
|
10
|
+
attr_accessor :equal_width
|
11
|
+
alias equal_width? equal_width
|
12
|
+
# @return [Array<Column>] list of colujmns
|
13
|
+
attr_accessor :column_array
|
14
|
+
# @return [Boolean] Draw Line Between Columns
|
15
|
+
attr_reader :separator
|
16
|
+
# @return [OoxmlSize] space between columns
|
17
|
+
attr_accessor :space
|
18
|
+
|
19
|
+
def initialize(columns_count = 0)
|
20
|
+
@count = columns_count
|
21
|
+
@column_array = []
|
22
|
+
super(parent: nil)
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [Array, Column] accessor
|
26
|
+
def [](key)
|
27
|
+
@column_array[key]
|
28
|
+
end
|
29
|
+
|
30
|
+
# Parse Columns data
|
31
|
+
# @param [Nokogiri::XML:Element] node with Columns data
|
32
|
+
# @return [Columns] value of Columns data
|
33
|
+
def parse(node)
|
34
|
+
node.attributes.each do |key, value|
|
35
|
+
case key
|
36
|
+
when 'num'
|
37
|
+
@count = value.value.to_i
|
38
|
+
when 'sep'
|
39
|
+
@separator = option_enabled?(node, 'sep')
|
40
|
+
when 'equalWidth'
|
41
|
+
@equal_width = option_enabled?(node, 'equalWidth')
|
42
|
+
when 'space'
|
43
|
+
@space = OoxmlSize.new(value.value.to_f)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
node.xpath('*').each do |column_node|
|
48
|
+
case column_node.name
|
49
|
+
when 'col'
|
50
|
+
@column_array << Column.new(parent: self).parse(column_node)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
self
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|