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
data/spec/elements/run_spec.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::Run do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
context "after creation" do
|
7
|
-
before(:each) do
|
8
|
-
@instance = described_class.new
|
9
|
-
instance.italics = true
|
10
|
-
end
|
11
|
-
|
12
|
-
it_should_output_correct_xml
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::SaveSubsetFonts do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :saveSubsetFonts, name: "save_subset_fonts"
|
7
|
-
|
8
|
-
for_attribute(:value) do
|
9
|
-
with_value(true) do
|
10
|
-
it_should_assign_successfully
|
11
|
-
it_should_output "<w:saveSubsetFonts w:val=\"true\"/>"
|
12
|
-
end
|
13
|
-
|
14
|
-
with_value(:somethingElse) do
|
15
|
-
it_should_raise_an_exception
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::SectionProperties do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :sectPr, name: "section_properties"
|
7
|
-
|
8
|
-
with_no_attributes_set do
|
9
|
-
it_should_output "<w:sectPr/>", assign: false
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::Symbol do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :sym, name: "symbol"
|
7
|
-
|
8
|
-
for_attribute(:font) do
|
9
|
-
with_value("Wingdings") do
|
10
|
-
it_should_assign_successfully
|
11
|
-
it_should_output "<w:sym w:font=\"Wingdings\"/>"
|
12
|
-
end
|
13
|
-
|
14
|
-
with_value(123) do
|
15
|
-
it_should_raise_an_exception
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
for_attribute(:character) do
|
20
|
-
with_value("43FD") do
|
21
|
-
it_should_assign_successfully
|
22
|
-
it_should_output "<w:sym w:char=\"43FD\"/>"
|
23
|
-
end
|
24
|
-
|
25
|
-
with_value("43gg") do
|
26
|
-
it_should_raise_an_exception
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
data/spec/elements/tab_spec.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::TableCell do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
context "after creation" do
|
7
|
-
before(:each) do
|
8
|
-
@instance = described_class.new
|
9
|
-
instance.no_wrap = true
|
10
|
-
end
|
11
|
-
|
12
|
-
it_should_output_correct_xml
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::TableGrid do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
context "after creation" do
|
7
|
-
before(:each) do
|
8
|
-
@instance = described_class.new
|
9
|
-
column = OpenXml::Docx::Elements::GridColumn.new
|
10
|
-
column.w = 1
|
11
|
-
instance << column
|
12
|
-
end
|
13
|
-
|
14
|
-
it_should_output_correct_xml
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::TableRow do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
context "after creation" do
|
7
|
-
before(:each) do
|
8
|
-
@instance = described_class.new
|
9
|
-
instance.hidden = true
|
10
|
-
cell = OpenXml::Docx::Elements::TableCell.new
|
11
|
-
cell.no_wrap = true
|
12
|
-
instance << cell
|
13
|
-
end
|
14
|
-
|
15
|
-
it_should_output_correct_xml
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
data/spec/elements/table_spec.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::Table do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :tbl, name: "table"
|
7
|
-
|
8
|
-
before(:each) do
|
9
|
-
@instance = described_class.new
|
10
|
-
instance.cant_split = true
|
11
|
-
row = OpenXml::Docx::Elements::TableRow.new
|
12
|
-
row.hidden = true
|
13
|
-
cell = OpenXml::Docx::Elements::TableCell.new
|
14
|
-
cell.no_wrap = true
|
15
|
-
row << cell
|
16
|
-
instance << row
|
17
|
-
end
|
18
|
-
|
19
|
-
it_should_output_correct_xml
|
20
|
-
|
21
|
-
end
|
data/spec/elements/text_spec.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::Text do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :t, name: "text"
|
7
|
-
|
8
|
-
for_attribute(:space, with_namespace: :xml) do
|
9
|
-
with_value(nil) do
|
10
|
-
it_should_assign_successfully
|
11
|
-
it_should_output "<w:t/>"
|
12
|
-
end
|
13
|
-
|
14
|
-
with_value(:preserve) do
|
15
|
-
it_should_assign_successfully
|
16
|
-
it_should_output "<w:t xml:space=\"preserve\"/>"
|
17
|
-
end
|
18
|
-
|
19
|
-
with_value(:the_final_frontier) do
|
20
|
-
it_should_raise_an_exception
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Docx::Elements::TitlePage do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :titlePg, name: "title_page"
|
7
|
-
|
8
|
-
with_no_attributes_set do
|
9
|
-
it_should_output "<w:titlePg/>", assign: false
|
10
|
-
end
|
11
|
-
|
12
|
-
for_attribute(:value) do
|
13
|
-
with_value(true) do
|
14
|
-
it_should_assign_successfully
|
15
|
-
it_should_output "<w:titlePg w:val=\"true\"/>"
|
16
|
-
end
|
17
|
-
|
18
|
-
with_value(:somethingElse) do
|
19
|
-
it_should_raise_an_exception
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
@@ -1,534 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe OpenXml::Vml::Elements::Group do
|
4
|
-
include ElementTestMacros
|
5
|
-
|
6
|
-
it_should_use tag: :group, name: "group"
|
7
|
-
|
8
|
-
|
9
|
-
describe "HR Align Attribute" do
|
10
|
-
for_attribute(:hr_align, displays_as: :hralign, with_namespace: :o) do
|
11
|
-
%i(center left right).each do |value|
|
12
|
-
with_value(value) do
|
13
|
-
it_should_assign_successfully
|
14
|
-
it_should_output "<v:group o:hralign=\"#{value}\"/>"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
with_values([:justified, 4, "overThere"]) do
|
19
|
-
it_should_raise_an_exception
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe "Inset Mode Attribute" do
|
25
|
-
for_attribute(:inset_mode, displays_as: :insetmode, with_namespace: :o) do
|
26
|
-
with_value(:auto) do
|
27
|
-
it_should_assign_successfully
|
28
|
-
it_should_output "<v:group o:insetmode=\"auto\"/>"
|
29
|
-
end
|
30
|
-
|
31
|
-
with_value(:custom) do
|
32
|
-
it_should_assign_successfully
|
33
|
-
it_should_output "<v:group o:insetmode=\"custom\"/>"
|
34
|
-
end
|
35
|
-
|
36
|
-
with_values([:left, "right", 0]) do
|
37
|
-
it_should_raise_an_exception
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
describe "Edit As Attribute" do
|
43
|
-
for_attribute(:edit_as, displays_as: :editas) do
|
44
|
-
%i(bullseye canvas cycle orgchart radial stacked venn).each do |value|
|
45
|
-
with_value(value) do
|
46
|
-
it_should_assign_successfully
|
47
|
-
it_should_output "<v:group editas=\"#{value}\"/>"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
with_values([:piechart, 4, "amazingGraph"]) do
|
52
|
-
it_should_raise_an_exception
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
describe "Coordinate-based Attributes" do
|
58
|
-
good_coord_values = [ "100,100", "-100,-100", "100,-100", "100, 100", "-100, -100", "100, -100" ]
|
59
|
-
bad_coord_values = [ "100 100", "x:10,y:10", :over_there ]
|
60
|
-
|
61
|
-
for_attribute(:coordinate_origin, displays_as: :coordorigin) do
|
62
|
-
good_coord_values.each do |good_value|
|
63
|
-
with_value(good_value) do
|
64
|
-
it_should_assign_successfully
|
65
|
-
it_should_output "<v:group coordorigin=\"#{good_value}\"/>"
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
with_values(bad_coord_values) do
|
70
|
-
it_should_raise_an_exception
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
for_attribute(:coordinate_size, displays_as: :coordsize) do
|
75
|
-
good_coord_values.each do |good_value|
|
76
|
-
with_value(good_value) do
|
77
|
-
it_should_assign_successfully
|
78
|
-
it_should_output "<v:group coordsize=\"#{good_value}\"/>"
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
with_values(bad_coord_values) do
|
83
|
-
it_should_raise_an_exception
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
describe "Color-based Attributes" do
|
89
|
-
good_color_values = [ "#FFFFFF", :red, "palateEntry [0]", "palateEntry" ]
|
90
|
-
bad_color_values = [ 54, 0 ]
|
91
|
-
|
92
|
-
for_attribute(:fill_color, displays_as: :fillcolor) do
|
93
|
-
good_color_values.each do |good_value|
|
94
|
-
with_value(good_value) do
|
95
|
-
it_should_assign_successfully
|
96
|
-
it_should_output "<v:group fillcolor=\"#{good_value}\"/>"
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
with_values(bad_color_values) do
|
101
|
-
it_should_raise_an_exception
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
describe "Diagram Layout-based Attributes" do
|
107
|
-
good_diagram_layout_values = (0..3)
|
108
|
-
bad_diagram_layout_values = [ -1, 4, "Five is Right Out" ]
|
109
|
-
|
110
|
-
for_attribute(:diagram_node_layout, displays_as: :dgmlayout, with_namespace: :o) do
|
111
|
-
good_diagram_layout_values.each do |good_value|
|
112
|
-
with_value(good_value) do
|
113
|
-
it_should_assign_successfully
|
114
|
-
it_should_output "<v:group o:dgmlayout=\"#{good_value}\"/>"
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
with_values(bad_diagram_layout_values) do
|
119
|
-
it_should_raise_an_exception
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
for_attribute(:diagram_node_recent_layout, displays_as: :dgmlayoutmru, with_namespace: :o) do
|
124
|
-
good_diagram_layout_values.each do |good_value|
|
125
|
-
with_value(good_value) do
|
126
|
-
it_should_assign_successfully
|
127
|
-
it_should_output "<v:group o:dgmlayoutmru=\"#{good_value}\"/>"
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
with_values(bad_diagram_layout_values) do
|
132
|
-
it_should_raise_an_exception
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
describe "Integer-based Attributes" do
|
138
|
-
good_integer_values = [1, -1, 0]
|
139
|
-
bad_integer_values = [2.5, :five, "five"]
|
140
|
-
|
141
|
-
for_attribute(:diagram_node_kind, displays_as: :dgmnodekind, with_namespace: :o) do
|
142
|
-
good_integer_values.each do |good_value|
|
143
|
-
with_value(good_value) do
|
144
|
-
it_should_assign_successfully
|
145
|
-
it_should_output "<v:group o:dgmnodekind=\"#{good_value}\"/>"
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
with_values(bad_integer_values) do
|
150
|
-
it_should_raise_an_exception
|
151
|
-
end
|
152
|
-
end
|
153
|
-
|
154
|
-
for_attribute(:hr_percent, displays_as: :hrpct, with_namespace: :o) do
|
155
|
-
good_integer_values.each do |good_value|
|
156
|
-
with_value(good_value) do
|
157
|
-
it_should_assign_successfully
|
158
|
-
it_should_output "<v:group o:hrpct=\"#{good_value}\"/>"
|
159
|
-
end
|
160
|
-
end
|
161
|
-
|
162
|
-
with_values(bad_integer_values) do
|
163
|
-
it_should_raise_an_exception
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
for_attribute(:regroup_id, displays_as: :regroupid, with_namespace: :o) do
|
168
|
-
good_integer_values.each do |good_value|
|
169
|
-
with_value(good_value) do
|
170
|
-
it_should_assign_successfully
|
171
|
-
it_should_output "<v:group o:regroupid=\"#{good_value}\"/>"
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
with_values(bad_integer_values) do
|
176
|
-
it_should_raise_an_exception
|
177
|
-
end
|
178
|
-
end
|
179
|
-
end
|
180
|
-
|
181
|
-
describe "String-based Attributes" do
|
182
|
-
bad_string_values = [0, :nope, false]
|
183
|
-
|
184
|
-
for_attribute(:alt) do
|
185
|
-
with_value("String") do
|
186
|
-
it_should_assign_successfully
|
187
|
-
it_should_output "<v:group alt=\"String\"/>"
|
188
|
-
end
|
189
|
-
|
190
|
-
with_value("000001f") do
|
191
|
-
it_should_assign_successfully
|
192
|
-
it_should_output "<v:group alt=\"000001f\"/>"
|
193
|
-
end
|
194
|
-
|
195
|
-
|
196
|
-
with_values(bad_string_values) do
|
197
|
-
it_should_raise_an_exception
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
for_attribute(:css_class, displays_as: :class) do
|
202
|
-
with_value("String") do
|
203
|
-
it_should_assign_successfully
|
204
|
-
it_should_output "<v:group class=\"String\"/>"
|
205
|
-
end
|
206
|
-
|
207
|
-
with_values(bad_string_values) do
|
208
|
-
it_should_raise_an_exception
|
209
|
-
end
|
210
|
-
end
|
211
|
-
|
212
|
-
for_attribute(:href) do
|
213
|
-
with_value("http://something.com") do
|
214
|
-
it_should_assign_successfully
|
215
|
-
it_should_output "<v:group href=\"http://something.com\"/>"
|
216
|
-
end
|
217
|
-
|
218
|
-
with_values(bad_string_values) do
|
219
|
-
it_should_raise_an_exception
|
220
|
-
end
|
221
|
-
end
|
222
|
-
|
223
|
-
for_attribute(:id) do
|
224
|
-
with_value("String") do
|
225
|
-
it_should_assign_successfully
|
226
|
-
it_should_output "<v:group id=\"String\"/>"
|
227
|
-
end
|
228
|
-
|
229
|
-
with_values(bad_string_values) do
|
230
|
-
it_should_raise_an_exception
|
231
|
-
end
|
232
|
-
end
|
233
|
-
|
234
|
-
for_attribute(:style) do
|
235
|
-
with_value("String") do
|
236
|
-
it_should_assign_successfully
|
237
|
-
it_should_output "<v:group style=\"String\"/>"
|
238
|
-
end
|
239
|
-
|
240
|
-
with_values(bad_string_values) do
|
241
|
-
it_should_raise_an_exception
|
242
|
-
end
|
243
|
-
end
|
244
|
-
|
245
|
-
for_attribute(:target) do
|
246
|
-
with_value("String") do
|
247
|
-
it_should_assign_successfully
|
248
|
-
it_should_output "<v:group target=\"String\"/>"
|
249
|
-
end
|
250
|
-
|
251
|
-
with_values(bad_string_values) do
|
252
|
-
it_should_raise_an_exception
|
253
|
-
end
|
254
|
-
end
|
255
|
-
|
256
|
-
for_attribute(:title) do
|
257
|
-
with_value("String") do
|
258
|
-
it_should_assign_successfully
|
259
|
-
it_should_output "<v:group title=\"String\"/>"
|
260
|
-
end
|
261
|
-
|
262
|
-
with_values(bad_string_values) do
|
263
|
-
it_should_raise_an_exception
|
264
|
-
end
|
265
|
-
end
|
266
|
-
|
267
|
-
for_attribute(:wrap_coordinates, displays_as: :wrapcoords) do
|
268
|
-
with_value("String") do
|
269
|
-
it_should_assign_successfully
|
270
|
-
it_should_output "<v:group wrapcoords=\"String\"/>"
|
271
|
-
end
|
272
|
-
|
273
|
-
with_value("0,0,100,100") do
|
274
|
-
it_should_assign_successfully
|
275
|
-
it_should_output "<v:group wrapcoords=\"0,0,100,100\"/>"
|
276
|
-
end
|
277
|
-
|
278
|
-
with_values(bad_string_values) do
|
279
|
-
it_should_raise_an_exception
|
280
|
-
end
|
281
|
-
end
|
282
|
-
|
283
|
-
for_attribute(:border_bottom_color, displays_as: :borderbottomcolor, with_namespace: :o) do
|
284
|
-
with_value("String") do
|
285
|
-
it_should_assign_successfully
|
286
|
-
it_should_output "<v:group o:borderbottomcolor=\"String\"/>"
|
287
|
-
end
|
288
|
-
|
289
|
-
with_values(bad_string_values) do
|
290
|
-
it_should_raise_an_exception
|
291
|
-
end
|
292
|
-
end
|
293
|
-
|
294
|
-
for_attribute(:border_left_color, displays_as: :borderleftcolor, with_namespace: :o) do
|
295
|
-
with_value("String") do
|
296
|
-
it_should_assign_successfully
|
297
|
-
it_should_output "<v:group o:borderleftcolor=\"String\"/>"
|
298
|
-
end
|
299
|
-
|
300
|
-
with_values(bad_string_values) do
|
301
|
-
it_should_raise_an_exception
|
302
|
-
end
|
303
|
-
end
|
304
|
-
|
305
|
-
for_attribute(:border_right_color, displays_as: :borderrightcolor, with_namespace: :o) do
|
306
|
-
with_value("String") do
|
307
|
-
it_should_assign_successfully
|
308
|
-
it_should_output "<v:group o:borderrightcolor=\"String\"/>"
|
309
|
-
end
|
310
|
-
|
311
|
-
with_values(bad_string_values) do
|
312
|
-
it_should_raise_an_exception
|
313
|
-
end
|
314
|
-
end
|
315
|
-
|
316
|
-
for_attribute(:border_top_color, displays_as: :bordertopcolor, with_namespace: :o) do
|
317
|
-
with_value("String") do
|
318
|
-
it_should_assign_successfully
|
319
|
-
it_should_output "<v:group o:bordertopcolor=\"String\"/>"
|
320
|
-
end
|
321
|
-
|
322
|
-
with_values(bad_string_values) do
|
323
|
-
it_should_raise_an_exception
|
324
|
-
end
|
325
|
-
end
|
326
|
-
|
327
|
-
for_attribute(:optional_string, displays_as: :spid, with_namespace: :o) do
|
328
|
-
with_value("String") do
|
329
|
-
it_should_assign_successfully
|
330
|
-
it_should_output "<v:group o:spid=\"String\"/>"
|
331
|
-
end
|
332
|
-
|
333
|
-
with_values(bad_string_values) do
|
334
|
-
it_should_raise_an_exception
|
335
|
-
end
|
336
|
-
end
|
337
|
-
|
338
|
-
for_attribute(:table_limits, displays_as: :tablelimits, with_namespace: :o) do
|
339
|
-
with_value("String") do
|
340
|
-
it_should_assign_successfully
|
341
|
-
it_should_output "<v:group o:tablelimits=\"String\"/>"
|
342
|
-
end
|
343
|
-
|
344
|
-
with_values(bad_string_values) do
|
345
|
-
it_should_raise_an_exception
|
346
|
-
end
|
347
|
-
end
|
348
|
-
|
349
|
-
for_attribute(:table_properties, displays_as: :tableproperties, with_namespace: :o) do
|
350
|
-
with_value("String") do
|
351
|
-
it_should_assign_successfully
|
352
|
-
it_should_output "<v:group o:tableproperties=\"String\"/>"
|
353
|
-
end
|
354
|
-
|
355
|
-
with_values(bad_string_values) do
|
356
|
-
it_should_raise_an_exception
|
357
|
-
end
|
358
|
-
end
|
359
|
-
end
|
360
|
-
|
361
|
-
describe "(Explicitly) True/False-based Attributes" do
|
362
|
-
good_tf_values = [true, false]
|
363
|
-
bad_tf_values = ["yes", "no", "on", "off", 5]
|
364
|
-
|
365
|
-
for_attribute(:filled) do
|
366
|
-
good_tf_values.each do |good_value|
|
367
|
-
with_value(good_value) do
|
368
|
-
it_should_assign_successfully
|
369
|
-
it_should_output "<v:group filled=\"#{good_value}\"/>"
|
370
|
-
end
|
371
|
-
end
|
372
|
-
|
373
|
-
with_values(bad_tf_values) do
|
374
|
-
it_should_raise_an_exception
|
375
|
-
end
|
376
|
-
end
|
377
|
-
|
378
|
-
for_attribute(:print) do
|
379
|
-
good_tf_values.each do |good_value|
|
380
|
-
with_value(good_value) do
|
381
|
-
it_should_assign_successfully
|
382
|
-
it_should_output "<v:group print=\"#{good_value}\"/>"
|
383
|
-
end
|
384
|
-
end
|
385
|
-
|
386
|
-
with_values(bad_tf_values) do
|
387
|
-
it_should_raise_an_exception
|
388
|
-
end
|
389
|
-
end
|
390
|
-
|
391
|
-
for_attribute(:allow_in_cell, displays_as: :allowincell, with_namespace: :o) do
|
392
|
-
good_tf_values.each do |good_value|
|
393
|
-
with_value(good_value) do
|
394
|
-
it_should_assign_successfully
|
395
|
-
it_should_output "<v:group o:allowincell=\"#{good_value}\"/>"
|
396
|
-
end
|
397
|
-
end
|
398
|
-
with_values(bad_tf_values) do
|
399
|
-
it_should_raise_an_exception
|
400
|
-
end
|
401
|
-
end
|
402
|
-
|
403
|
-
for_attribute(:allow_overlap, displays_as: :allowoverlap, with_namespace: :o) do
|
404
|
-
good_tf_values.each do |good_value|
|
405
|
-
with_value(good_value) do
|
406
|
-
it_should_assign_successfully
|
407
|
-
it_should_output "<v:group o:allowoverlap=\"#{good_value}\"/>"
|
408
|
-
end
|
409
|
-
end
|
410
|
-
|
411
|
-
with_values(bad_tf_values) do
|
412
|
-
it_should_raise_an_exception
|
413
|
-
end
|
414
|
-
end
|
415
|
-
|
416
|
-
for_attribute(:bullet, with_namespace: :o) do
|
417
|
-
good_tf_values.each do |good_value|
|
418
|
-
with_value(good_value) do
|
419
|
-
it_should_assign_successfully
|
420
|
-
it_should_output "<v:group o:bullet=\"#{good_value}\"/>"
|
421
|
-
end
|
422
|
-
end
|
423
|
-
|
424
|
-
with_values(bad_tf_values) do
|
425
|
-
it_should_raise_an_exception
|
426
|
-
end
|
427
|
-
end
|
428
|
-
|
429
|
-
for_attribute(:button, with_namespace: :o) do
|
430
|
-
good_tf_values.each do |good_value|
|
431
|
-
with_value(good_value) do
|
432
|
-
it_should_assign_successfully
|
433
|
-
it_should_output "<v:group o:button=\"#{good_value}\"/>"
|
434
|
-
end
|
435
|
-
end
|
436
|
-
|
437
|
-
with_values(bad_tf_values) do
|
438
|
-
it_should_raise_an_exception
|
439
|
-
end
|
440
|
-
end
|
441
|
-
|
442
|
-
for_attribute(:double_click_notify, displays_as: :doubleclicknotify, with_namespace: :o) do
|
443
|
-
good_tf_values.each do |good_value|
|
444
|
-
with_value(good_value) do
|
445
|
-
it_should_assign_successfully
|
446
|
-
it_should_output "<v:group o:doubleclicknotify=\"#{good_value}\"/>"
|
447
|
-
end
|
448
|
-
end
|
449
|
-
|
450
|
-
with_values(bad_tf_values) do
|
451
|
-
it_should_raise_an_exception
|
452
|
-
end
|
453
|
-
end
|
454
|
-
|
455
|
-
for_attribute(:hr, with_namespace: :o) do
|
456
|
-
good_tf_values.each do |good_value|
|
457
|
-
with_value(good_value) do
|
458
|
-
it_should_assign_successfully
|
459
|
-
it_should_output "<v:group o:hr=\"#{good_value}\"/>"
|
460
|
-
end
|
461
|
-
end
|
462
|
-
|
463
|
-
with_values(bad_tf_values) do
|
464
|
-
it_should_raise_an_exception
|
465
|
-
end
|
466
|
-
end
|
467
|
-
|
468
|
-
for_attribute(:hr_no_shade, displays_as: :hrnoshade, with_namespace: :o) do
|
469
|
-
good_tf_values.each do |good_value|
|
470
|
-
with_value(good_value) do
|
471
|
-
it_should_assign_successfully
|
472
|
-
it_should_output "<v:group o:hrnoshade=\"#{good_value}\"/>"
|
473
|
-
end
|
474
|
-
end
|
475
|
-
|
476
|
-
with_values(bad_tf_values) do
|
477
|
-
it_should_raise_an_exception
|
478
|
-
end
|
479
|
-
end
|
480
|
-
|
481
|
-
for_attribute(:hr_standard, displays_as: :hrstd, with_namespace: :o) do
|
482
|
-
good_tf_values.each do |good_value|
|
483
|
-
with_value(good_value) do
|
484
|
-
it_should_assign_successfully
|
485
|
-
it_should_output "<v:group o:hrstd=\"#{good_value}\"/>"
|
486
|
-
end
|
487
|
-
end
|
488
|
-
|
489
|
-
with_values(bad_tf_values) do
|
490
|
-
it_should_raise_an_exception
|
491
|
-
end
|
492
|
-
end
|
493
|
-
|
494
|
-
for_attribute(:hide_extra_handles, displays_as: :oned, with_namespace: :o) do
|
495
|
-
good_tf_values.each do |good_value|
|
496
|
-
with_value(good_value) do
|
497
|
-
it_should_assign_successfully
|
498
|
-
it_should_output "<v:group o:oned=\"#{good_value}\"/>"
|
499
|
-
end
|
500
|
-
end
|
501
|
-
|
502
|
-
with_values(bad_tf_values) do
|
503
|
-
it_should_raise_an_exception
|
504
|
-
end
|
505
|
-
end
|
506
|
-
|
507
|
-
for_attribute(:user_drawn, displays_as: :userdrawn, with_namespace: :o) do
|
508
|
-
good_tf_values.each do |good_value|
|
509
|
-
with_value(good_value) do
|
510
|
-
it_should_assign_successfully
|
511
|
-
it_should_output "<v:group o:userdrawn=\"#{good_value}\"/>"
|
512
|
-
end
|
513
|
-
end
|
514
|
-
|
515
|
-
with_values(bad_tf_values) do
|
516
|
-
it_should_raise_an_exception
|
517
|
-
end
|
518
|
-
end
|
519
|
-
|
520
|
-
for_attribute(:user_hidden, displays_as: :userhidden, with_namespace: :o) do
|
521
|
-
good_tf_values.each do |good_value|
|
522
|
-
with_value(good_value) do
|
523
|
-
it_should_assign_successfully
|
524
|
-
it_should_output "<v:group o:userhidden=\"#{good_value}\"/>"
|
525
|
-
end
|
526
|
-
end
|
527
|
-
|
528
|
-
with_values(bad_tf_values) do
|
529
|
-
it_should_raise_an_exception
|
530
|
-
end
|
531
|
-
end
|
532
|
-
end
|
533
|
-
|
534
|
-
end
|