openxml-docx 0.10.6 → 0.11.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/Gemfile +7 -1
- data/Gemfile.lock +33 -30
- data/README.md +34 -8
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/openxml/docx.rb +5 -2
- data/lib/openxml/docx/element.rb +9 -0
- data/lib/openxml/docx/elements.rb +2 -2
- data/lib/openxml/docx/elements/absolute_position_tab.rb +1 -1
- data/lib/openxml/docx/elements/background.rb +3 -2
- data/lib/openxml/docx/elements/bidi_embed.rb +3 -1
- data/lib/openxml/docx/elements/bidi_override.rb +3 -1
- data/lib/openxml/docx/elements/book_fold_printing.rb +1 -1
- data/lib/openxml/docx/elements/book_fold_printing_sheets.rb +1 -1
- data/lib/openxml/docx/elements/book_fold_reverse_printing.rb +1 -1
- data/lib/openxml/docx/elements/break.rb +1 -1
- data/lib/openxml/docx/elements/carriage_return.rb +1 -1
- data/lib/openxml/docx/elements/compatibility_setting.rb +3 -1
- data/lib/openxml/docx/elements/compatibility_settings.rb +3 -1
- data/lib/openxml/docx/elements/content_part.rb +1 -1
- data/lib/openxml/docx/elements/control.rb +1 -1
- data/lib/openxml/docx/elements/dirty.rb +1 -1
- data/lib/openxml/docx/elements/drawing.rb +4 -1
- data/lib/openxml/docx/elements/embed_bold.rb +1 -1
- data/lib/openxml/docx/elements/embed_bold_italic.rb +1 -1
- data/lib/openxml/docx/elements/embed_italic.rb +1 -1
- data/lib/openxml/docx/elements/embed_regular.rb +1 -1
- data/lib/openxml/docx/elements/embed_system_fonts.rb +1 -1
- data/lib/openxml/docx/elements/embed_true_type_fonts.rb +1 -1
- data/lib/openxml/docx/elements/even_and_odd_headers.rb +1 -1
- data/lib/openxml/docx/elements/family.rb +1 -1
- data/lib/openxml/docx/elements/font.rb +3 -1
- data/lib/openxml/docx/elements/font_alternate_name.rb +1 -1
- data/lib/openxml/docx/elements/font_character_set.rb +1 -1
- data/lib/openxml/docx/elements/font_panose_one.rb +1 -1
- data/lib/openxml/docx/elements/font_pitch.rb +1 -1
- data/lib/openxml/docx/elements/font_sig.rb +1 -1
- data/lib/openxml/docx/elements/grid_column.rb +1 -1
- data/lib/openxml/docx/elements/group_shape.rb +3 -1
- data/lib/openxml/docx/elements/last_rendered_page_break.rb +1 -1
- data/lib/openxml/docx/elements/long_day.rb +1 -1
- data/lib/openxml/docx/elements/long_month.rb +1 -1
- data/lib/openxml/docx/elements/long_year.rb +1 -1
- data/lib/openxml/docx/elements/markup_compatibility_alternate_content.rb +4 -1
- data/lib/openxml/docx/elements/markup_compatibility_choice.rb +3 -1
- data/lib/openxml/docx/elements/markup_compatibility_fallback.rb +4 -1
- data/lib/openxml/docx/elements/nonbreaking_hyphen.rb +1 -1
- data/lib/openxml/docx/elements/optional_hyphen.rb +1 -1
- data/lib/openxml/docx/elements/page_number.rb +1 -1
- data/lib/openxml/docx/elements/paragraph.rb +3 -1
- data/lib/openxml/docx/elements/ruby.rb +2 -1
- data/lib/openxml/docx/elements/run.rb +3 -1
- data/lib/openxml/docx/elements/save_subset_fonts.rb +1 -1
- data/lib/openxml/docx/elements/section_properties.rb +4 -1
- data/lib/openxml/docx/elements/short_day.rb +1 -1
- data/lib/openxml/docx/elements/short_month.rb +1 -1
- data/lib/openxml/docx/elements/short_year.rb +1 -1
- data/lib/openxml/docx/elements/symbol.rb +1 -1
- data/lib/openxml/docx/elements/tab.rb +1 -1
- data/lib/openxml/docx/elements/table.rb +3 -1
- data/lib/openxml/docx/elements/table_cell.rb +3 -1
- data/lib/openxml/docx/elements/table_grid.rb +3 -1
- data/lib/openxml/docx/elements/table_row.rb +3 -1
- data/lib/openxml/docx/elements/text.rb +1 -1
- data/lib/openxml/docx/elements/textbox_content.rb +4 -1
- data/lib/openxml/docx/elements/title_page.rb +1 -1
- data/lib/openxml/docx/elements/vml_container.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_anchor.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_effect_extent.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_extent.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_inline.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_nv_graphic_frame_properties.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_object_nv_properties.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_position_h.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_position_offset.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_position_v.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_simple_position.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_none.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_polygon.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_square.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_through.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_tight.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_top_and_bottom.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_groups_group_shape_properties.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_groups_nv_shape_drawing_properties.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_shapes_body_properties.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_shapes_nv_drawing_properties.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_shapes_shape.rb +4 -1
- data/lib/openxml/docx/elements/word_processing_shapes_shape_properties.rb +3 -1
- data/lib/openxml/docx/elements/word_processing_shapes_textual_contents.rb +3 -1
- data/lib/openxml/docx/elements/wordprocessing_shape_group.rb +3 -1
- data/lib/openxml/docx/{property_builder.rb → has_properties.rb} +13 -2
- data/lib/openxml/docx/properties/border.rb +2 -2
- data/lib/openxml/docx/properties/color.rb +1 -1
- data/lib/openxml/docx/properties/complex_property.rb +3 -1
- data/lib/openxml/docx/properties/container_property.rb +3 -1
- data/lib/openxml/docx/properties/shading.rb +2 -2
- data/lib/openxml/docx/properties/table_border.rb +2 -2
- data/lib/openxml/docx/properties/table_cell_border.rb +2 -2
- data/lib/openxml/docx/properties/underline.rb +1 -1
- data/lib/openxml/docx/section.rb +1 -1
- data/lib/openxml/docx/style.rb +3 -2
- data/lib/openxml/docx/version.rb +1 -1
- data/lib/openxml/vml.rb +1 -2
- data/lib/openxml/vml/elements.rb +2 -2
- data/lib/openxml/vml/elements/group.rb +3 -1
- data/lib/openxml/vml/elements/rectangle.rb +3 -1
- data/lib/openxml/vml/elements/rounded_rectangle.rb +3 -1
- data/openxml-docx.gemspec +29 -22
- metadata +47 -347
- data/lib/openxml/docx/attribute_builder.rb +0 -327
- data/lib/openxml/docx/elements/container.rb +0 -37
- data/lib/openxml/docx/elements/element.rb +0 -65
- data/lib/openxml/drawingml.rb +0 -17
- data/lib/openxml/drawingml/elements.rb +0 -13
- data/lib/openxml/drawingml/elements/adjust_values_list.rb +0 -11
- data/lib/openxml/drawingml/elements/blip.rb +0 -18
- data/lib/openxml/drawingml/elements/blip_fill.rb +0 -14
- data/lib/openxml/drawingml/elements/children_extents.rb +0 -14
- data/lib/openxml/drawingml/elements/children_offset.rb +0 -14
- data/lib/openxml/drawingml/elements/extension.rb +0 -13
- data/lib/openxml/drawingml/elements/extension_list.rb +0 -11
- data/lib/openxml/drawingml/elements/extents.rb +0 -14
- data/lib/openxml/drawingml/elements/fill_rectangle.rb +0 -16
- data/lib/openxml/drawingml/elements/graphic.rb +0 -10
- data/lib/openxml/drawingml/elements/graphic_data.rb +0 -12
- data/lib/openxml/drawingml/elements/graphic_frame_locks.rb +0 -17
- data/lib/openxml/drawingml/elements/head_end.rb +0 -28
- data/lib/openxml/drawingml/elements/no_autofit.rb +0 -10
- data/lib/openxml/drawingml/elements/no_fill.rb +0 -10
- data/lib/openxml/drawingml/elements/non_visual_drawing_properties.rb +0 -17
- data/lib/openxml/drawingml/elements/non_visual_picture_drawing_properties.rb +0 -12
- data/lib/openxml/drawingml/elements/non_visual_picture_properties.rb +0 -10
- data/lib/openxml/drawingml/elements/non_visual_shape_drawing_properties.rb +0 -12
- data/lib/openxml/drawingml/elements/offset.rb +0 -14
- data/lib/openxml/drawingml/elements/outline.rb +0 -36
- data/lib/openxml/drawingml/elements/picture.rb +0 -10
- data/lib/openxml/drawingml/elements/picture_locks.rb +0 -23
- data/lib/openxml/drawingml/elements/picture_shape_properties.rb +0 -13
- data/lib/openxml/drawingml/elements/preset_geometry.rb +0 -210
- data/lib/openxml/drawingml/elements/preset_text_warp.rb +0 -25
- data/lib/openxml/drawingml/elements/round.rb +0 -10
- data/lib/openxml/drawingml/elements/shape_guide.rb +0 -40
- data/lib/openxml/drawingml/elements/solid_fill.rb +0 -10
- data/lib/openxml/drawingml/elements/source_rectangle.rb +0 -16
- data/lib/openxml/drawingml/elements/srgb_color.rb +0 -14
- data/lib/openxml/drawingml/elements/stretch.rb +0 -10
- data/lib/openxml/drawingml/elements/tail_end.rb +0 -28
- data/lib/openxml/drawingml/elements/transform_effect.rb +0 -18
- data/spec/elements/absolute_position_tab_spec.rb +0 -58
- data/spec/elements/background_spec.rb +0 -52
- data/spec/elements/bidi_embed_spec.rb +0 -35
- data/spec/elements/bidi_override_spec.rb +0 -35
- data/spec/elements/book_fold_printing_sheets_spec.rb +0 -27
- data/spec/elements/book_fold_printing_spec.rb +0 -19
- data/spec/elements/book_fold_reverse_printing_spec.rb +0 -19
- data/spec/elements/break_spec.rb +0 -34
- data/spec/elements/carriage_return_spec.rb +0 -12
- data/spec/elements/compatibility_setting_spec.rb +0 -41
- data/spec/elements/compatibility_settings_spec.rb +0 -8
- data/spec/elements/content_part_spec.rb +0 -18
- data/spec/elements/control_spec.rb +0 -41
- data/spec/elements/deleted_text_spec.rb +0 -24
- data/spec/elements/dirty_spec.rb +0 -12
- data/spec/elements/drawing_spec.rb +0 -11
- data/spec/elements/drawingml/adjust_values_list_spec.rb +0 -8
- data/spec/elements/drawingml/blip_fill_spec.rb +0 -44
- data/spec/elements/drawingml/blip_spec.rb +0 -47
- data/spec/elements/drawingml/extension_list_spec.rb +0 -8
- data/spec/elements/drawingml/extension_spec.rb +0 -19
- data/spec/elements/drawingml/extents_spec.rb +0 -33
- data/spec/elements/drawingml/fill_rectangle_spec.rb +0 -76
- data/spec/elements/drawingml/graphic_data_spec.rb +0 -19
- data/spec/elements/drawingml/graphic_frame_locks_spec.rb +0 -107
- data/spec/elements/drawingml/graphic_spec.rb +0 -8
- data/spec/elements/drawingml/head_end_spec.rb +0 -48
- data/spec/elements/drawingml/no_autofit_spec.rb +0 -8
- data/spec/elements/drawingml/no_fill_spec.rb +0 -8
- data/spec/elements/drawingml/non_visual_drawing_properties_spec.rb +0 -68
- data/spec/elements/drawingml/non_visual_picture_drawing_properties_spec.rb +0 -23
- data/spec/elements/drawingml/non_visual_picture_properties_spec.rb +0 -8
- data/spec/elements/drawingml/non_visual_shape_drawing_properties_spec.rb +0 -24
- data/spec/elements/drawingml/offset_spec.rb +0 -42
- data/spec/elements/drawingml/outline_spec.rb +0 -64
- data/spec/elements/drawingml/picture_locks_spec.rb +0 -122
- data/spec/elements/drawingml/picture_shape_properties_spec.rb +0 -21
- data/spec/elements/drawingml/picture_spec.rb +0 -8
- data/spec/elements/drawingml/preset_geometry_spec.rb +0 -19
- data/spec/elements/drawingml/preset_text_warp_spec.rb +0 -36
- data/spec/elements/drawingml/round_spec.rb +0 -8
- data/spec/elements/drawingml/shape_guide_spec.rb +0 -53
- data/spec/elements/drawingml/solid_fill_spec.rb +0 -8
- data/spec/elements/drawingml/source_rectangle_spec.rb +0 -76
- data/spec/elements/drawingml/srgb_color_spec.rb +0 -19
- data/spec/elements/drawingml/stretch_spec.rb +0 -8
- data/spec/elements/drawingml/tail_end_spec.rb +0 -47
- data/spec/elements/drawingml/transform_effect_spec.rb +0 -102
- data/spec/elements/embed_system_fonts_spec.rb +0 -19
- data/spec/elements/embed_true_type_fonts_spec.rb +0 -19
- data/spec/elements/even_and_odd_headers_spec.rb +0 -23
- data/spec/elements/font_alternate_name_spec.rb +0 -19
- data/spec/elements/font_character_set_spec.rb +0 -19
- data/spec/elements/font_panose_one_spec.rb +0 -19
- data/spec/elements/font_pitch_spec.rb +0 -21
- data/spec/elements/font_sig_spec.rb +0 -74
- data/spec/elements/grid_column_spec.rb +0 -15
- data/spec/elements/group_shape_spec.rb +0 -11
- data/spec/elements/last_rendered_page_break_spec.rb +0 -12
- data/spec/elements/long_day_spec.rb +0 -12
- data/spec/elements/long_month_spec.rb +0 -12
- data/spec/elements/long_year_spec.rb +0 -12
- data/spec/elements/markup_compatibility_alternate_content_spec.rb +0 -11
- data/spec/elements/markup_compatibility_choice_spec.rb +0 -22
- data/spec/elements/markup_compatibility_fallback_spec.rb +0 -11
- data/spec/elements/nonbreaking_hyphen_spec.rb +0 -12
- data/spec/elements/optional_hyphen_spec.rb +0 -12
- data/spec/elements/page_number_spec.rb +0 -12
- data/spec/elements/paragraph_spec.rb +0 -60
- data/spec/elements/ruby_spec.rb +0 -66
- data/spec/elements/run_spec.rb +0 -15
- data/spec/elements/save_subset_fonts_spec.rb +0 -19
- data/spec/elements/section_properties_spec.rb +0 -12
- data/spec/elements/short_day_spec.rb +0 -12
- data/spec/elements/short_month_spec.rb +0 -12
- data/spec/elements/short_year_spec.rb +0 -12
- data/spec/elements/symbol_spec.rb +0 -31
- data/spec/elements/tab_spec.rb +0 -12
- data/spec/elements/table_cell_spec.rb +0 -15
- data/spec/elements/table_grid_spec.rb +0 -17
- data/spec/elements/table_row_spec.rb +0 -18
- data/spec/elements/table_spec.rb +0 -21
- data/spec/elements/text_spec.rb +0 -24
- data/spec/elements/textbox_content_spec.rb +0 -8
- data/spec/elements/title_page_spec.rb +0 -23
- data/spec/elements/vml/group_spec.rb +0 -534
- data/spec/elements/vml/rectangle_spec.rb +0 -729
- data/spec/elements/vml/rounded_rectangle_spec.rb +0 -784
- data/spec/elements/vml_container_spec.rb +0 -11
- data/spec/elements/word_processing_drawing_anchor_spec.rb +0 -122
- data/spec/elements/word_processing_drawing_effect_extent_spec.rb +0 -77
- data/spec/elements/word_processing_drawing_extent_spec.rb +0 -34
- data/spec/elements/word_processing_drawing_nv_graphic_frame_properties_spec.rb +0 -11
- data/spec/elements/word_processing_drawing_object_nv_properties_spec.rb +0 -67
- data/spec/elements/word_processing_drawing_position_h_spec.rb +0 -22
- data/spec/elements/word_processing_drawing_position_v_spec.rb +0 -22
- data/spec/elements/word_processing_drawing_simple_position_spec.rb +0 -44
- data/spec/elements/word_processing_drawing_wrap_coordinate_spec.rb +0 -40
- data/spec/elements/word_processing_drawing_wrap_none_spec.rb +0 -12
- data/spec/elements/word_processing_drawing_wrap_polygon_spec.rb +0 -23
- data/spec/elements/word_processing_drawing_wrap_square_spec.rb +0 -65
- data/spec/elements/word_processing_drawing_wrap_through_spec.rb +0 -43
- data/spec/elements/word_processing_drawing_wrap_tight_spec.rb +0 -43
- data/spec/elements/word_processing_drawing_wrap_top_and_bottom_spec.rb +0 -30
- data/spec/elements/word_processing_groups_group_shape_properties_spec.rb +0 -21
- data/spec/elements/word_processing_groups_nv_shape_drawing_properties_spec.rb +0 -8
- data/spec/elements/word_processing_shapes_body_properties_spec.rb +0 -232
- data/spec/elements/word_processing_shapes_nv_drawing_properties_spec.rb +0 -64
- data/spec/elements/word_processing_shapes_shape_properties_spec.rb +0 -22
- data/spec/elements/word_processing_shapes_shape_spec.rb +0 -23
- data/spec/elements/word_processing_shapes_textual_content_spec.rb +0 -23
- data/spec/elements/wordprocessing_shape_group_spec.rb +0 -12
- data/spec/package_spec.rb +0 -36
- data/spec/parts/document_spec.rb +0 -95
- data/spec/parts/footer_spec.rb +0 -33
- data/spec/parts/header_spec.rb +0 -33
- data/spec/parts/settings_spec.rb +0 -19
- data/spec/parts/styles_spec.rb +0 -27
- data/spec/properties/alignment_spec.rb +0 -58
- data/spec/properties/auto_adjust_right_indent_spec.rb +0 -23
- data/spec/properties/auto_space_de_spec.rb +0 -23
- data/spec/properties/auto_space_dn_spec.rb +0 -23
- data/spec/properties/bidi_spec.rb +0 -22
- data/spec/properties/bold_spec.rb +0 -22
- data/spec/properties/border_spec.rb +0 -82
- data/spec/properties/cant_split_spec.rb +0 -22
- data/spec/properties/caps_spec.rb +0 -22
- data/spec/properties/character_spacing_spec.rb +0 -26
- data/spec/properties/color_spec.rb +0 -29
- data/spec/properties/column_spec.rb +0 -30
- data/spec/properties/columns_spec.rb +0 -164
- data/spec/properties/complex_bold_spec.rb +0 -22
- data/spec/properties/complex_font_size_spec.rb +0 -24
- data/spec/properties/complex_italics_spec.rb +0 -22
- data/spec/properties/complex_script_formatting_spec.rb +0 -22
- data/spec/properties/compress_punctuation_spec.rb +0 -32
- data/spec/properties/conditional_formatting_spec.rb +0 -64
- data/spec/properties/contextual_spacing_spec.rb +0 -22
- data/spec/properties/div_id_spec.rb +0 -17
- data/spec/properties/document_grid_spec.rb +0 -37
- data/spec/properties/double_strikethrough_spec.rb +0 -23
- data/spec/properties/east_asian_layout_spec.rb +0 -55
- data/spec/properties/effect_spec.rb +0 -43
- data/spec/properties/emboss_spec.rb +0 -22
- data/spec/properties/emphasis_spec.rb +0 -37
- data/spec/properties/even_and_odd_headers_spec.rb +0 -22
- data/spec/properties/expansion_spec.rb +0 -34
- data/spec/properties/font_size_spec.rb +0 -24
- data/spec/properties/font_spec.rb +0 -70
- data/spec/properties/footer_reference_spec.rb +0 -32
- data/spec/properties/form_protection_spec.rb +0 -22
- data/spec/properties/frame_spec.rb +0 -101
- data/spec/properties/grid_after_spec.rb +0 -26
- data/spec/properties/grid_before_spec.rb +0 -26
- data/spec/properties/grid_span_spec.rb +0 -24
- data/spec/properties/header_reference_spec.rb +0 -32
- data/spec/properties/header_spec.rb +0 -17
- data/spec/properties/headers_spec.rb +0 -39
- data/spec/properties/hidden_spec.rb +0 -22
- data/spec/properties/hidden_style_spec.rb +0 -22
- data/spec/properties/hidden_text_spec.rb +0 -22
- data/spec/properties/hide_mark_spec.rb +0 -22
- data/spec/properties/highlight_spec.rb +0 -97
- data/spec/properties/imprint_spec.rb +0 -22
- data/spec/properties/indentation_spec.rb +0 -100
- data/spec/properties/italics_spec.rb +0 -22
- data/spec/properties/keep_lines_spec.rb +0 -22
- data/spec/properties/keep_next_spec.rb +0 -22
- data/spec/properties/kerning_spec.rb +0 -24
- data/spec/properties/kinsoku_spec.rb +0 -32
- data/spec/properties/language_spec.rb +0 -20
- data/spec/properties/latent_styles_exception_spec.rb +0 -68
- data/spec/properties/latent_styles_spec.rb +0 -323
- data/spec/properties/line_numbering_spec.rb +0 -43
- data/spec/properties/linked_style_spec.rb +0 -17
- data/spec/properties/manual_width_spec.rb +0 -30
- data/spec/properties/math_spec.rb +0 -22
- data/spec/properties/mirror_indent_spec.rb +0 -22
- data/spec/properties/next_style_spec.rb +0 -17
- data/spec/properties/no_proof_spec.rb +0 -23
- data/spec/properties/no_wrap_spec.rb +0 -22
- data/spec/properties/numbering_spec.rb +0 -37
- data/spec/properties/outline_level_spec.rb +0 -20
- data/spec/properties/outline_spec.rb +0 -23
- data/spec/properties/overflow_punctuation_spec.rb +0 -23
- data/spec/properties/page_borders_spec.rb +0 -129
- data/spec/properties/page_break_before_spec.rb +0 -22
- data/spec/properties/page_margins_spec.rb +0 -64
- data/spec/properties/page_numbering_spec.rb +0 -54
- data/spec/properties/page_size_spec.rb +0 -43
- data/spec/properties/paper_source_spec.rb +0 -30
- data/spec/properties/paragraph_borders_spec.rb +0 -66
- data/spec/properties/paragraph_style_spec.rb +0 -12
- data/spec/properties/parent_style_spec.rb +0 -17
- data/spec/properties/personal_compose_spec.rb +0 -23
- data/spec/properties/personal_reply_spec.rb +0 -23
- data/spec/properties/personal_spec.rb +0 -23
- data/spec/properties/phonetic_guide_alignment_spec.rb +0 -42
- data/spec/properties/phonetic_guide_base_font_size_spec.rb +0 -25
- data/spec/properties/phonetic_guide_font_size_raise_spec.rb +0 -25
- data/spec/properties/phonetic_guide_font_size_spec.rb +0 -25
- data/spec/properties/phonetic_guide_language_spec.rb +0 -12
- data/spec/properties/position_spec.rb +0 -26
- data/spec/properties/primary_style_spec.rb +0 -22
- data/spec/properties/right_to_left_spec.rb +0 -22
- data/spec/properties/rtl_gutter_spec.rb +0 -23
- data/spec/properties/run_style_spec.rb +0 -12
- data/spec/properties/section_type_spec.rb +0 -33
- data/spec/properties/semi_hidden_spec.rb +0 -22
- data/spec/properties/shading_spec.rb +0 -64
- data/spec/properties/shadow_property_spec.rb +0 -23
- data/spec/properties/small_caps_spec.rb +0 -22
- data/spec/properties/snap_to_grid_spec.rb +0 -32
- data/spec/properties/spacing_spec.rb +0 -67
- data/spec/properties/spec_vanish_spec.rb +0 -22
- data/spec/properties/strikethrough_spec.rb +0 -23
- data/spec/properties/style_aliases_spec.rb +0 -22
- data/spec/properties/style_auto_redefinition_spec.rb +0 -22
- data/spec/properties/style_lock_spec.rb +0 -22
- data/spec/properties/style_name_spec.rb +0 -17
- data/spec/properties/supress_auto_hyphens_spec.rb +0 -22
- data/spec/properties/supress_line_numbers_spec.rb +0 -22
- data/spec/properties/supress_overlap_spec.rb +0 -22
- data/spec/properties/tab_spec.rb +0 -45
- data/spec/properties/table_border_spec.rb +0 -119
- data/spec/properties/table_borders_spec.rb +0 -41
- data/spec/properties/table_caption_spec.rb +0 -17
- data/spec/properties/table_cell_border_spec.rb +0 -119
- data/spec/properties/table_cell_borders_spec.rb +0 -40
- data/spec/properties/table_cell_cell_margin_spec.rb +0 -46
- data/spec/properties/table_cell_fit_text_spec.rb +0 -23
- data/spec/properties/table_cell_margin_spec.rb +0 -40
- data/spec/properties/table_cell_margins_spec.rb +0 -46
- data/spec/properties/table_cell_spacing_spec.rb +0 -21
- data/spec/properties/table_cell_width_spec.rb +0 -21
- data/spec/properties/table_description_spec.rb +0 -17
- data/spec/properties/table_header_spec.rb +0 -22
- data/spec/properties/table_indent_spec.rb +0 -43
- data/spec/properties/table_layout_spec.rb +0 -24
- data/spec/properties/table_look_spec.rb +0 -43
- data/spec/properties/table_overlap_spec.rb +0 -22
- data/spec/properties/table_p_pr_spec.rb +0 -68
- data/spec/properties/table_row_height_spec.rb +0 -20
- data/spec/properties/table_style_spec.rb +0 -17
- data/spec/properties/table_width_spec.rb +0 -21
- data/spec/properties/tabs_spec.rb +0 -39
- data/spec/properties/text_alignment_spec.rb +0 -33
- data/spec/properties/text_direction_spec.rb +0 -47
- data/spec/properties/textbox_tight_wrap_spec.rb +0 -33
- data/spec/properties/title_page_spec.rb +0 -22
- data/spec/properties/ui_priority_spec.rb +0 -22
- data/spec/properties/underline_spec.rb +0 -45
- data/spec/properties/unhide_when_used_spec.rb +0 -22
- data/spec/properties/valign_spec.rb +0 -19
- data/spec/properties/vertical_alignment_spec.rb +0 -26
- data/spec/properties/vertical_merge_spec.rb +0 -22
- data/spec/properties/vertical_text_alignment_spec.rb +0 -28
- data/spec/properties/wafter_spec.rb +0 -21
- data/spec/properties/wbefore_spec.rb +0 -21
- data/spec/properties/web_hidden_spec.rb +0 -22
- data/spec/properties/widow_control_spec.rb +0 -33
- data/spec/properties/word_wrap_spec.rb +0 -33
- data/spec/section_spec.rb +0 -48
- data/spec/spec_helper.rb +0 -16
- data/spec/style_spec.rb +0 -108
- data/spec/support/data/elements/break_element.xml +0 -4
- data/spec/support/data/elements/break_with_attributes_element.xml +0 -4
- data/spec/support/data/elements/grid_column_element.xml +0 -4
- data/spec/support/data/elements/paragraph_element.xml +0 -8
- data/spec/support/data/elements/paragraph_with_runs_element.xml +0 -14
- data/spec/support/data/elements/paragraph_with_section_properties_element.xml +0 -13
- data/spec/support/data/elements/run_element.xml +0 -8
- data/spec/support/data/elements/symbol_element.xml +0 -4
- data/spec/support/data/elements/table_cell_element.xml +0 -8
- data/spec/support/data/elements/table_element.xml +0 -18
- data/spec/support/data/elements/table_grid_element.xml +0 -6
- data/spec/support/data/elements/table_row_element.xml +0 -13
- data/spec/support/data/elements/text_element.xml +0 -4
- data/spec/support/data/parts/content_types_part.xml +0 -1
- data/spec/support/data/parts/document_with_children_part.xml +0 -2
- data/spec/support/data/parts/document_with_multiple_sections_part.xml +0 -24
- data/spec/support/data/parts/document_with_one_section_part.xml +0 -16
- data/spec/support/data/parts/empty_document_part.xml +0 -1
- data/spec/support/data/parts/empty_footer_part.xml +0 -1
- data/spec/support/data/parts/empty_header_part.xml +0 -1
- data/spec/support/data/parts/footer_with_children_part.xml +0 -1
- data/spec/support/data/parts/global_rels_part.xml +0 -1
- data/spec/support/data/parts/header_with_children_part.xml +0 -1
- data/spec/support/data/parts/rels_part.xml +0 -1
- data/spec/support/data/parts/settings_part.xml +0 -1
- data/spec/support/data/parts/styles_part.xml +0 -1
- data/spec/support/data/parts/styles_with_custom_style_part.xml +0 -20
- data/spec/support/data/styles/character_styles.xml +0 -15
- data/spec/support/data/styles/paragraph_styles.xml +0 -11
- data/spec/support/element_test_macros.rb +0 -242
- data/spec/support/part_test_macros.rb +0 -27
- data/spec/support/property_test_macros.rb +0 -177
- data/spec/support/style_test_macros.rb +0 -33
- data/spec/support/value_property_test_macros.rb +0 -69
@@ -1,32 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Properties::Kinsoku do
|
4
|
-
include ValuePropertyTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :kinsoku, name: "kinsoku", value: true
|
7
|
-
|
8
|
-
with_value(true) do
|
9
|
-
it_should_work
|
10
|
-
it_should_output "<w:kinsoku/>"
|
11
|
-
end
|
12
|
-
|
13
|
-
with_value(false) do
|
14
|
-
it_should_work
|
15
|
-
it_should_output "<w:kinsoku w:val=\"false\"/>"
|
16
|
-
end
|
17
|
-
|
18
|
-
with_value(:on) do
|
19
|
-
it_should_work
|
20
|
-
it_should_output "<w:kinsoku w:val=\"on\"/>"
|
21
|
-
end
|
22
|
-
|
23
|
-
with_value(:off) do
|
24
|
-
it_should_work
|
25
|
-
it_should_output "<w:kinsoku w:val=\"off\"/>"
|
26
|
-
end
|
27
|
-
|
28
|
-
with_value(nil) do
|
29
|
-
it_should_not_work
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Properties::Language do
|
4
|
-
include PropertyTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :lang, name: "language"
|
7
|
-
|
8
|
-
for_attribute(:bidi) do
|
9
|
-
it_should_assign_and_output_xml "en-US"
|
10
|
-
end
|
11
|
-
|
12
|
-
for_attribute(:east_asia) do
|
13
|
-
it_should_assign_and_output_xml "ko-KR"
|
14
|
-
end
|
15
|
-
|
16
|
-
for_attribute(:latin) do
|
17
|
-
it_should_assign_and_output_xml "fr-CA"
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
@@ -1,68 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Properties::LatentStylesException do
|
4
|
-
include PropertyTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :lsdException, name: "latent_styles_exception", value: "StyleName"
|
7
|
-
|
8
|
-
for_attribute(:locked) do
|
9
|
-
with_value(true) do
|
10
|
-
it_should_assign_successfully "StyleName"
|
11
|
-
it_should_output "<w:lsdException w:locked=\"true\" w:name=\"StyleName\"/>", "StyleName"
|
12
|
-
end
|
13
|
-
|
14
|
-
it_should_not_allow_integers
|
15
|
-
end
|
16
|
-
|
17
|
-
for_attribute(:style_name) do
|
18
|
-
with_value("NewStyleName") do
|
19
|
-
it_should_assign_successfully "StyleName"
|
20
|
-
it_should_output "<w:lsdException w:name=\"NewStyleName\"/>", "StyleName"
|
21
|
-
end
|
22
|
-
|
23
|
-
it_should_not_allow_nil
|
24
|
-
end
|
25
|
-
|
26
|
-
for_attribute(:qFormat) do
|
27
|
-
with_value(true) do
|
28
|
-
it_should_assign_successfully "StyleName"
|
29
|
-
it_should_output "<w:lsdException w:name=\"StyleName\" w:qFormat=\"true\"/>", "StyleName"
|
30
|
-
end
|
31
|
-
|
32
|
-
it_should_not_allow_integers
|
33
|
-
end
|
34
|
-
|
35
|
-
for_attribute(:semi_hidden) do
|
36
|
-
with_value(true) do
|
37
|
-
it_should_assign_successfully "StyleName"
|
38
|
-
it_should_output "<w:lsdException w:name=\"StyleName\" w:semiHidden=\"true\"/>", "StyleName"
|
39
|
-
end
|
40
|
-
|
41
|
-
it_should_not_allow_integers
|
42
|
-
end
|
43
|
-
|
44
|
-
for_attribute(:ui_priority) do
|
45
|
-
with_value(1) do
|
46
|
-
it_should_assign_successfully "StyleName"
|
47
|
-
it_should_output "<w:lsdException w:name=\"StyleName\" w:uiPriority=\"1\"/>", "StyleName"
|
48
|
-
end
|
49
|
-
|
50
|
-
with_value(-1) do
|
51
|
-
it_should_assign_successfully "StyleName"
|
52
|
-
it_should_output "<w:lsdException w:name=\"StyleName\" w:uiPriority=\"-1\"/>", "StyleName"
|
53
|
-
end
|
54
|
-
|
55
|
-
it_should_not_allow_floats
|
56
|
-
it_should_not_allow_invalid_value
|
57
|
-
end
|
58
|
-
|
59
|
-
for_attribute(:unhide_when_used) do
|
60
|
-
with_value(true) do
|
61
|
-
it_should_assign_successfully "StyleName"
|
62
|
-
it_should_output "<w:lsdException w:name=\"StyleName\" w:unhideWhenUsed=\"true\"/>", "StyleName"
|
63
|
-
end
|
64
|
-
|
65
|
-
it_should_not_allow_integers
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
@@ -1,323 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Properties::LatentStyles do
|
4
|
-
include PropertyTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :latentStyles, name: "latent_styles"
|
7
|
-
|
8
|
-
context "when trying to add exceptions, it" do
|
9
|
-
before(:each) do
|
10
|
-
@instance = described_class.new
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should raise an exception if the exception to be added isn't an exception at all" do
|
14
|
-
expect { instance << [] }.to raise_error(ArgumentError)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
context "when there are no exceptions" do
|
19
|
-
before(:each) do
|
20
|
-
@instance = described_class.new
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should still output its XML" do
|
24
|
-
expect(xml(instance)).to eq("<w:latentStyles/>")
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
context "when there are exceptions" do
|
29
|
-
before(:each) do
|
30
|
-
@instance = described_class.new
|
31
|
-
instance << OpenXml::Docx::Properties::LatentStylesException.new("StyleName1")
|
32
|
-
instance << OpenXml::Docx::Properties::LatentStylesException.new("StyleName2")
|
33
|
-
end
|
34
|
-
|
35
|
-
it "should output the correct XML" do
|
36
|
-
expect(xml(instance)).to eq("<w:latentStyles>\n <w:lsdException w:name=\"StyleName1\"/>\n <w:lsdException w:name=\"StyleName2\"/>\n </w:latentStyles>")
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
for_attribute(:count) do
|
41
|
-
before(:each) do
|
42
|
-
@instance = described_class.new
|
43
|
-
end
|
44
|
-
|
45
|
-
context "when the value is 1" do
|
46
|
-
before(:each) do
|
47
|
-
@value = 1
|
48
|
-
end
|
49
|
-
|
50
|
-
it "should accept the value" do
|
51
|
-
expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
52
|
-
end
|
53
|
-
|
54
|
-
it "should output the correct value" do
|
55
|
-
instance.send("#{attribute}=", value)
|
56
|
-
expect(xml(instance)).to eq("<w:latentStyles w:count=\"1\"/>")
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
it_should_not_allow_negative_numbers
|
61
|
-
it_should_not_allow_floats
|
62
|
-
it_should_not_allow_invalid_value
|
63
|
-
end
|
64
|
-
|
65
|
-
for_attribute(:default_locked_state) do
|
66
|
-
before(:each) do
|
67
|
-
@instance = described_class.new
|
68
|
-
end
|
69
|
-
|
70
|
-
context "when the value is true" do
|
71
|
-
before(:each) do
|
72
|
-
@value = true
|
73
|
-
end
|
74
|
-
|
75
|
-
it "should accept the value" do
|
76
|
-
expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
77
|
-
end
|
78
|
-
|
79
|
-
it "should output the correct value" do
|
80
|
-
instance.send("#{attribute}=", value)
|
81
|
-
expect(xml(instance)).to eq("<w:latentStyles w:defLockedState=\"true\"/>")
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
for_attribute(:default_qformat) do
|
87
|
-
before(:each) do
|
88
|
-
@instance = described_class.new
|
89
|
-
end
|
90
|
-
|
91
|
-
context "when the value is true" do
|
92
|
-
before(:each) do
|
93
|
-
@value = true
|
94
|
-
end
|
95
|
-
|
96
|
-
it "should accept the value" do
|
97
|
-
expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
98
|
-
end
|
99
|
-
|
100
|
-
it "should output the correct value" do
|
101
|
-
instance.send("#{attribute}=", value)
|
102
|
-
expect(xml(instance)).to eq("<w:latentStyles w:defQFormat=\"true\"/>")
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
for_attribute(:default_semi_hidden) do
|
108
|
-
before(:each) do
|
109
|
-
@instance = described_class.new
|
110
|
-
end
|
111
|
-
|
112
|
-
context "when the value is true" do
|
113
|
-
before(:each) do
|
114
|
-
@value = true
|
115
|
-
end
|
116
|
-
|
117
|
-
it "should accept the value" do
|
118
|
-
expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
119
|
-
end
|
120
|
-
|
121
|
-
it "should output the correct value" do
|
122
|
-
instance.send("#{attribute}=", value)
|
123
|
-
expect(xml(instance)).to eq("<w:latentStyles w:defSemiHidden=\"true\"/>")
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
for_attribute(:default_ui_priority) do
|
129
|
-
before(:each) do
|
130
|
-
@instance = described_class.new
|
131
|
-
end
|
132
|
-
|
133
|
-
context "when the value is 1" do
|
134
|
-
before(:each) do
|
135
|
-
@value = 1
|
136
|
-
end
|
137
|
-
|
138
|
-
it "should accept the value" do
|
139
|
-
expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
140
|
-
end
|
141
|
-
|
142
|
-
it "should output the correct value" do
|
143
|
-
instance.send("#{attribute}=", value)
|
144
|
-
expect(xml(instance)).to eq("<w:latentStyles w:defUIPriority=\"1\"/>")
|
145
|
-
end
|
146
|
-
end
|
147
|
-
|
148
|
-
context "when the value is -1" do
|
149
|
-
before(:each) do
|
150
|
-
@value = -1
|
151
|
-
end
|
152
|
-
|
153
|
-
it "should accept the value" do
|
154
|
-
expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
155
|
-
end
|
156
|
-
|
157
|
-
it "should output the correct value" do
|
158
|
-
instance.send("#{attribute}=", value)
|
159
|
-
expect(xml(instance)).to eq("<w:latentStyles w:defUIPriority=\"-1\"/>")
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
it_should_not_allow_floats
|
164
|
-
it_should_not_allow_invalid_value
|
165
|
-
end
|
166
|
-
|
167
|
-
for_attribute(:default_unhide_when_used) do
|
168
|
-
before(:each) do
|
169
|
-
@instance = described_class.new
|
170
|
-
end
|
171
|
-
|
172
|
-
context "when the value is true" do
|
173
|
-
before(:each) do
|
174
|
-
@value = true
|
175
|
-
end
|
176
|
-
|
177
|
-
it "should accept the value" do
|
178
|
-
expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
179
|
-
end
|
180
|
-
|
181
|
-
it "should output the correct value" do
|
182
|
-
instance.send("#{attribute}=", value)
|
183
|
-
expect(xml(instance)).to eq("<w:latentStyles w:defUnhideWhenUsed=\"true\"/>")
|
184
|
-
end
|
185
|
-
end
|
186
|
-
end
|
187
|
-
|
188
|
-
# for_attribute(:equal_width) do
|
189
|
-
# before(:each) do
|
190
|
-
# @instance = described_class.new
|
191
|
-
# @instance << OpenXml::Docx::Properties::Column.new(1, 1)
|
192
|
-
# end
|
193
|
-
#
|
194
|
-
# context "when the value is true" do
|
195
|
-
# before(:each) do
|
196
|
-
# @value = true
|
197
|
-
# end
|
198
|
-
#
|
199
|
-
# it "should accept the value" do
|
200
|
-
# expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
201
|
-
# end
|
202
|
-
#
|
203
|
-
# it "should output the correct value" do
|
204
|
-
# instance.send("#{attribute}=", value)
|
205
|
-
# expect(xml(instance)).to eq("<w:cols w:equalWidth=\"true\">\n <w:col w:space=\"1\" w:w=\"1\"/>\n </w:cols>")
|
206
|
-
# end
|
207
|
-
# end
|
208
|
-
#
|
209
|
-
# for_attribute(:number) do
|
210
|
-
# before(:each) do
|
211
|
-
# @instance = described_class.new
|
212
|
-
# @instance << OpenXml::Docx::Properties::Column.new(1, 1)
|
213
|
-
# end
|
214
|
-
#
|
215
|
-
# context "when the value is 1" do
|
216
|
-
# before(:each) do
|
217
|
-
# @value = 1
|
218
|
-
# end
|
219
|
-
#
|
220
|
-
# it "should accept the value" do
|
221
|
-
# expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
222
|
-
# end
|
223
|
-
#
|
224
|
-
# it "should output the correct value" do
|
225
|
-
# instance.send("#{attribute}=", value)
|
226
|
-
# expect(xml(instance)).to eq("<w:cols w:num=\"1\">\n <w:col w:space=\"1\" w:w=\"1\"/>\n </w:cols>")
|
227
|
-
# end
|
228
|
-
# end
|
229
|
-
#
|
230
|
-
# context "when the value is -1" do
|
231
|
-
# before(:each) do
|
232
|
-
# @value = -1
|
233
|
-
# end
|
234
|
-
#
|
235
|
-
# it "should accept the value" do
|
236
|
-
# expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
237
|
-
# end
|
238
|
-
#
|
239
|
-
# it "should output the correct value" do
|
240
|
-
# instance.send("#{attribute}=", value)
|
241
|
-
# expect(xml(instance)).to eq("<w:cols w:num=\"-1\">\n <w:col w:space=\"1\" w:w=\"1\"/>\n </w:cols>")
|
242
|
-
# end
|
243
|
-
# end
|
244
|
-
#
|
245
|
-
# with_value(1.3) do
|
246
|
-
# it_should_raise_an_exception
|
247
|
-
# end
|
248
|
-
#
|
249
|
-
# with_value(:a_lot) do
|
250
|
-
# it_should_raise_an_exception
|
251
|
-
# end
|
252
|
-
# end
|
253
|
-
#
|
254
|
-
# for_attribute(:separator) do
|
255
|
-
# before(:each) do
|
256
|
-
# @instance = described_class.new
|
257
|
-
# @instance << OpenXml::Docx::Properties::Column.new(1, 1)
|
258
|
-
# end
|
259
|
-
#
|
260
|
-
# context "when the value is true" do
|
261
|
-
# before(:each) do
|
262
|
-
# @value = true
|
263
|
-
# end
|
264
|
-
#
|
265
|
-
# it "should accept the value" do
|
266
|
-
# expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
267
|
-
# end
|
268
|
-
#
|
269
|
-
# it "should output the correct value" do
|
270
|
-
# instance.send("#{attribute}=", value)
|
271
|
-
# expect(xml(instance)).to eq("<w:cols w:sep=\"true\">\n <w:col w:space=\"1\" w:w=\"1\"/>\n </w:cols>")
|
272
|
-
# end
|
273
|
-
# end
|
274
|
-
# end
|
275
|
-
#
|
276
|
-
# for_attribute(:space) do
|
277
|
-
# before(:each) do
|
278
|
-
# @instance = described_class.new
|
279
|
-
# @instance << OpenXml::Docx::Properties::Column.new(1, 1)
|
280
|
-
# end
|
281
|
-
#
|
282
|
-
# context "when the value is 1" do
|
283
|
-
# before(:each) do
|
284
|
-
# @value = 1
|
285
|
-
# end
|
286
|
-
#
|
287
|
-
# it "should accept the value" do
|
288
|
-
# expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
289
|
-
# end
|
290
|
-
#
|
291
|
-
# it "should output the correct value" do
|
292
|
-
# instance.send("#{attribute}=", value)
|
293
|
-
# expect(xml(instance)).to eq("<w:cols w:space=\"1\">\n <w:col w:space=\"1\" w:w=\"1\"/>\n </w:cols>")
|
294
|
-
# end
|
295
|
-
# end
|
296
|
-
#
|
297
|
-
# context "when the value is -1" do
|
298
|
-
# before(:each) do
|
299
|
-
# @value = -1
|
300
|
-
# end
|
301
|
-
#
|
302
|
-
# it "should accept the value" do
|
303
|
-
# expect { instance.send("#{attribute}=", value) }.to_not raise_error
|
304
|
-
# end
|
305
|
-
#
|
306
|
-
# it "should output the correct value" do
|
307
|
-
# instance.send("#{attribute}=", value)
|
308
|
-
# expect(xml(instance)).to eq("<w:cols w:space=\"-1\">\n <w:col w:space=\"1\" w:w=\"1\"/>\n </w:cols>")
|
309
|
-
# end
|
310
|
-
# end
|
311
|
-
#
|
312
|
-
# with_value(1.3) do
|
313
|
-
# it_should_raise_an_exception
|
314
|
-
# end
|
315
|
-
#
|
316
|
-
# with_value(:a_lot) do
|
317
|
-
# it_should_raise_an_exception
|
318
|
-
# end
|
319
|
-
# end
|
320
|
-
|
321
|
-
# end
|
322
|
-
|
323
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Properties::LineNumbering do
|
4
|
-
include PropertyTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :lnNumType, name: "line_numbering"
|
7
|
-
|
8
|
-
for_attribute(:count_by) do
|
9
|
-
values = [5, -5]
|
10
|
-
it_should_assign_and_output_xml values
|
11
|
-
it_should_not_allow_floats
|
12
|
-
it_should_not_allow_invalid_value
|
13
|
-
end
|
14
|
-
|
15
|
-
for_attribute(:distance) do
|
16
|
-
it_should_assign_and_output_xml 720
|
17
|
-
it_should_not_allow_negative_numbers
|
18
|
-
it_should_not_allow_floats
|
19
|
-
it_should_not_allow_invalid_value
|
20
|
-
end
|
21
|
-
|
22
|
-
for_attribute(:restart) do
|
23
|
-
values = %i(continuous newPage newSection)
|
24
|
-
it_should_assign_and_output_xml values
|
25
|
-
it_should_not_allow_invalid_value
|
26
|
-
end
|
27
|
-
|
28
|
-
for_attribute(:start) do
|
29
|
-
values = [5, -5]
|
30
|
-
it_should_assign_and_output_xml values
|
31
|
-
it_should_not_allow_floats
|
32
|
-
it_should_not_allow_invalid_value
|
33
|
-
end
|
34
|
-
|
35
|
-
with_no_attributes_set do
|
36
|
-
it_should_output "", assign: false
|
37
|
-
end
|
38
|
-
|
39
|
-
with_these_attributes_set(start: 3, count_by: 5) do
|
40
|
-
it_should_output "<w:lnNumType w:countBy=\"5\" w:start=\"3\"/>", assign: false
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|