openxml-drawingml 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/lib/openxml/drawingml.rb +11 -0
- data/lib/openxml/drawingml/elements.rb +1 -1
- data/lib/openxml/drawingml/elements/adjust_values_list.rb +2 -2
- data/lib/openxml/drawingml/elements/blip.rb +3 -3
- data/lib/openxml/drawingml/elements/blip_fill.rb +1 -2
- data/lib/openxml/drawingml/elements/children_extents.rb +2 -1
- data/lib/openxml/drawingml/elements/children_offset.rb +2 -1
- data/lib/openxml/drawingml/elements/extension.rb +2 -1
- data/lib/openxml/drawingml/elements/extension_list.rb +2 -2
- data/lib/openxml/drawingml/elements/extents.rb +2 -1
- data/lib/openxml/drawingml/elements/fill_rectangle.rb +2 -1
- data/lib/openxml/drawingml/elements/graphic.rb +4 -1
- data/lib/openxml/drawingml/elements/graphic_data.rb +3 -1
- data/lib/openxml/drawingml/elements/graphic_frame_locks.rb +3 -1
- data/lib/openxml/drawingml/elements/head_end.rb +3 -1
- data/lib/openxml/drawingml/elements/line_break.rb +89 -0
- data/lib/openxml/drawingml/elements/no_autofit.rb +2 -2
- data/lib/openxml/drawingml/elements/no_fill.rb +3 -1
- data/lib/openxml/drawingml/elements/non_visual_drawing_properties.rb +1 -1
- data/lib/openxml/drawingml/elements/non_visual_picture_drawing_properties.rb +1 -2
- data/lib/openxml/drawingml/elements/non_visual_picture_properties.rb +1 -2
- data/lib/openxml/drawingml/elements/non_visual_shape_drawing_properties.rb +1 -2
- data/lib/openxml/drawingml/elements/offset.rb +1 -1
- data/lib/openxml/drawingml/elements/outline.rb +2 -2
- data/lib/openxml/drawingml/elements/paragraph.rb +78 -0
- data/lib/openxml/drawingml/elements/picture.rb +1 -2
- data/lib/openxml/drawingml/elements/picture_locks.rb +1 -1
- data/lib/openxml/drawingml/elements/picture_shape_properties.rb +1 -2
- data/lib/openxml/drawingml/elements/preset_geometry.rb +2 -2
- data/lib/openxml/drawingml/elements/preset_text_warp.rb +1 -2
- data/lib/openxml/drawingml/elements/round.rb +4 -1
- data/lib/openxml/drawingml/elements/run.rb +85 -0
- data/lib/openxml/drawingml/elements/shape_guide.rb +1 -1
- data/lib/openxml/drawingml/elements/solid_fill.rb +3 -1
- data/lib/openxml/drawingml/elements/source_rectangle.rb +1 -1
- data/lib/openxml/drawingml/elements/srgb_color.rb +2 -1
- data/lib/openxml/drawingml/elements/stretch.rb +2 -2
- data/lib/openxml/drawingml/elements/tail_end.rb +3 -1
- data/lib/openxml/drawingml/elements/text.rb +21 -0
- data/lib/openxml/drawingml/elements/theme_elements.rb +4 -1
- data/lib/openxml/drawingml/elements/transform_effect.rb +1 -2
- data/lib/openxml/drawingml/parts.rb +10 -0
- data/lib/openxml/drawingml/parts/theme.rb +46 -0
- data/lib/openxml/drawingml/properties.rb +24 -0
- data/lib/openxml/drawingml/properties/audio_cd.rb +16 -0
- data/lib/openxml/drawingml/properties/audio_cd_end.rb +13 -0
- data/lib/openxml/drawingml/properties/audio_cd_start.rb +13 -0
- data/lib/openxml/drawingml/properties/audio_cd_time_property.rb +11 -0
- data/lib/openxml/drawingml/properties/audio_file.rb +13 -0
- data/lib/openxml/drawingml/properties/autofit_none.rb +11 -0
- data/lib/openxml/drawingml/properties/autofit_normal.rb +14 -0
- data/lib/openxml/drawingml/properties/autofit_shape.rb +11 -0
- data/lib/openxml/drawingml/properties/background_fill_style_list.rb +14 -0
- data/lib/openxml/drawingml/properties/blip.rb +27 -0
- data/lib/openxml/drawingml/properties/body_properties.rb +81 -0
- data/lib/openxml/drawingml/properties/bullet_color.rb +13 -0
- data/lib/openxml/drawingml/properties/bullet_color_text.rb +11 -0
- data/lib/openxml/drawingml/properties/bullet_font.rb +13 -0
- data/lib/openxml/drawingml/properties/bullet_font_text.rb +11 -0
- data/lib/openxml/drawingml/properties/bullet_size_percent.rb +20 -0
- data/lib/openxml/drawingml/properties/bullet_size_points.rb +20 -0
- data/lib/openxml/drawingml/properties/bullet_size_text.rb +11 -0
- data/lib/openxml/drawingml/properties/bullet_style_auto_numbered.rb +27 -0
- data/lib/openxml/drawingml/properties/bullet_style_blip.rb +12 -0
- data/lib/openxml/drawingml/properties/bullet_style_character.rb +13 -0
- data/lib/openxml/drawingml/properties/bullet_style_none.rb +11 -0
- data/lib/openxml/drawingml/properties/child_extent.rb +13 -0
- data/lib/openxml/drawingml/properties/child_offset.rb +13 -0
- data/lib/openxml/drawingml/properties/color_component_rgb.rb +17 -0
- data/lib/openxml/drawingml/properties/color_container_property.rb +17 -0
- data/lib/openxml/drawingml/properties/color_hex_rgb.rb +20 -0
- data/lib/openxml/drawingml/properties/color_hsl.rb +17 -0
- data/lib/openxml/drawingml/properties/color_mapping.rb +31 -0
- data/lib/openxml/drawingml/properties/color_mapping_override.rb +16 -0
- data/lib/openxml/drawingml/properties/color_mapping_override_map.rb +13 -0
- data/lib/openxml/drawingml/properties/color_mapping_override_master.rb +11 -0
- data/lib/openxml/drawingml/properties/color_preset_color.rb +51 -0
- data/lib/openxml/drawingml/properties/color_property.rb +40 -0
- data/lib/openxml/drawingml/properties/color_scheme.rb +29 -0
- data/lib/openxml/drawingml/properties/color_scheme_accent_five.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_accent_four.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_accent_one.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_accent_six.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_accent_three.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_accent_two.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_color.rb +25 -0
- data/lib/openxml/drawingml/properties/color_scheme_dark_one.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_dark_two.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_followed_hyperlink.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_hyperlink.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_light_one.rb +13 -0
- data/lib/openxml/drawingml/properties/color_scheme_light_two.rb +13 -0
- data/lib/openxml/drawingml/properties/color_system_color.rb +30 -0
- data/lib/openxml/drawingml/properties/color_xform_alpha.rb +19 -0
- data/lib/openxml/drawingml/properties/color_xform_alpha_modulation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_alpha_offset.rb +19 -0
- data/lib/openxml/drawingml/properties/color_xform_blue.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_blue_modulation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_blue_offset.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_complement.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_gamma.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_grayscale.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_green.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_green_modulation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_green_offset.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_hue.rb +20 -0
- data/lib/openxml/drawingml/properties/color_xform_hue_modulation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_hue_offset.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_inverse.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_inverse_gamma.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_luminance.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_luminance_modulation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_luminance_offset.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_red.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_red_modulation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_red_offset.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_saturation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_saturation_modulation.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_saturation_offset.rb +11 -0
- data/lib/openxml/drawingml/properties/color_xform_shade.rb +19 -0
- data/lib/openxml/drawingml/properties/color_xform_tint.rb +19 -0
- data/lib/openxml/drawingml/properties/complex_script_font.rb +13 -0
- data/lib/openxml/drawingml/properties/connection.rb +11 -0
- data/lib/openxml/drawingml/properties/connection_end.rb +13 -0
- data/lib/openxml/drawingml/properties/connection_shape_locks.rb +24 -0
- data/lib/openxml/drawingml/properties/connection_start.rb +13 -0
- data/lib/openxml/drawingml/properties/custom_color.rb +13 -0
- data/lib/openxml/drawingml/properties/custom_color_list.rb +14 -0
- data/lib/openxml/drawingml/properties/custom_dash_style.rb +14 -0
- data/lib/openxml/drawingml/properties/custom_geometry.rb +18 -0
- data/lib/openxml/drawingml/properties/dash_stop.rb +14 -0
- data/lib/openxml/drawingml/properties/default_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/default_run_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/default_shape_properties.rb +15 -0
- data/lib/openxml/drawingml/properties/east_asian_font.rb +13 -0
- data/lib/openxml/drawingml/properties/effect_dag.rb +20 -0
- data/lib/openxml/drawingml/properties/effect_list.rb +17 -0
- data/lib/openxml/drawingml/properties/effect_reference.rb +13 -0
- data/lib/openxml/drawingml/properties/effect_style.rb +18 -0
- data/lib/openxml/drawingml/properties/effect_style_list.rb +14 -0
- data/lib/openxml/drawingml/properties/embedded_sound_file.rb +14 -0
- data/lib/openxml/drawingml/properties/extension.rb +14 -0
- data/lib/openxml/drawingml/properties/extension_list.rb +14 -0
- data/lib/openxml/drawingml/properties/extent.rb +29 -0
- data/lib/openxml/drawingml/properties/external_media_file.rb +15 -0
- data/lib/openxml/drawingml/properties/extra_color_scheme.rb +14 -0
- data/lib/openxml/drawingml/properties/extra_color_scheme_list.rb +14 -0
- data/lib/openxml/drawingml/properties/fill_blip.rb +22 -0
- data/lib/openxml/drawingml/properties/fill_gradient.rb +24 -0
- data/lib/openxml/drawingml/properties/fill_group.rb +11 -0
- data/lib/openxml/drawingml/properties/fill_none.rb +11 -0
- data/lib/openxml/drawingml/properties/fill_pattern.rb +23 -0
- data/lib/openxml/drawingml/properties/fill_rectangle.rb +13 -0
- data/lib/openxml/drawingml/properties/fill_reference.rb +13 -0
- data/lib/openxml/drawingml/properties/fill_solid.rb +13 -0
- data/lib/openxml/drawingml/properties/fill_style_list.rb +19 -0
- data/lib/openxml/drawingml/properties/fill_to_rectangle.rb +13 -0
- data/lib/openxml/drawingml/properties/flat_text.rb +39 -0
- data/lib/openxml/drawingml/properties/font_collection_property.rb +16 -0
- data/lib/openxml/drawingml/properties/font_property.rb +29 -0
- data/lib/openxml/drawingml/properties/font_reference.rb +13 -0
- data/lib/openxml/drawingml/properties/font_scheme.rb +18 -0
- data/lib/openxml/drawingml/properties/format_scheme.rb +19 -0
- data/lib/openxml/drawingml/properties/geometry_guide.rb +14 -0
- data/lib/openxml/drawingml/properties/geometry_guide_list.rb +14 -0
- data/lib/openxml/drawingml/properties/gradient_line.rb +14 -0
- data/lib/openxml/drawingml/properties/gradient_path.rb +16 -0
- data/lib/openxml/drawingml/properties/gradient_stop.rb +13 -0
- data/lib/openxml/drawingml/properties/gradient_stop_list.rb +14 -0
- data/lib/openxml/drawingml/properties/graphic.rb +13 -0
- data/lib/openxml/drawingml/properties/graphic_data.rb +14 -0
- data/lib/openxml/drawingml/properties/graphic_frame_locks.rb +20 -0
- data/lib/openxml/drawingml/properties/group_shape_locks.rb +22 -0
- data/lib/openxml/drawingml/properties/group_transform.rb +16 -0
- data/lib/openxml/drawingml/properties/head_end.rb +13 -0
- data/lib/openxml/drawingml/properties/highlight.rb +13 -0
- data/lib/openxml/drawingml/properties/hyperlink_click.rb +13 -0
- data/lib/openxml/drawingml/properties/hyperlink_hover.rb +13 -0
- data/lib/openxml/drawingml/properties/hyperlink_mouse_over.rb +13 -0
- data/lib/openxml/drawingml/properties/hyperlink_property.rb +22 -0
- data/lib/openxml/drawingml/properties/integer_property.rb +12 -0
- data/lib/openxml/drawingml/properties/latin_font.rb +13 -0
- data/lib/openxml/drawingml/properties/level1_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level2_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level3_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level4_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level5_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level6_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level7_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level8_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/level9_paragraph_properties.rb +13 -0
- data/lib/openxml/drawingml/properties/line_default.rb +13 -0
- data/lib/openxml/drawingml/properties/line_end_properties.rb +12 -0
- data/lib/openxml/drawingml/properties/line_join_bevel.rb +11 -0
- data/lib/openxml/drawingml/properties/line_join_miter.rb +31 -0
- data/lib/openxml/drawingml/properties/line_join_round.rb +11 -0
- data/lib/openxml/drawingml/properties/line_property.rb +43 -0
- data/lib/openxml/drawingml/properties/line_spacing.rb +16 -0
- data/lib/openxml/drawingml/properties/line_style_list.rb +14 -0
- data/lib/openxml/drawingml/properties/list_style.rb +24 -0
- data/lib/openxml/drawingml/properties/major_font.rb +13 -0
- data/lib/openxml/drawingml/properties/minor_font.rb +13 -0
- data/lib/openxml/drawingml/properties/object_defaults.rb +17 -0
- data/lib/openxml/drawingml/properties/offset.rb +29 -0
- data/lib/openxml/drawingml/properties/outline.rb +13 -0
- data/lib/openxml/drawingml/properties/outline_reference.rb +13 -0
- data/lib/openxml/drawingml/properties/paragraph_properties.rb +78 -0
- data/lib/openxml/drawingml/properties/path.rb +49 -0
- data/lib/openxml/drawingml/properties/path_list.rb +14 -0
- data/lib/openxml/drawingml/properties/percentage_property.rb +17 -0
- data/lib/openxml/drawingml/properties/picture_locks.rb +25 -0
- data/lib/openxml/drawingml/properties/positive_integer_property.rb +12 -0
- data/lib/openxml/drawingml/properties/positive_percentage_property.rb +17 -0
- data/lib/openxml/drawingml/properties/preset_dash_style.rb +16 -0
- data/lib/openxml/drawingml/properties/preset_geometry.rb +59 -0
- data/lib/openxml/drawingml/properties/preset_text_warp.rb +25 -0
- data/lib/openxml/drawingml/properties/quick_time_file.rb +17 -0
- data/lib/openxml/drawingml/properties/relative_rectangle_property.rb +13 -0
- data/lib/openxml/drawingml/properties/right_to_left.rb +11 -0
- data/lib/openxml/drawingml/properties/run_properties.rb +93 -0
- data/lib/openxml/drawingml/properties/scene_3d.rb +17 -0
- data/lib/openxml/drawingml/properties/shape_adjustment_list.rb +14 -0
- data/lib/openxml/drawingml/properties/shape_default.rb +13 -0
- data/lib/openxml/drawingml/properties/shape_locks.rb +25 -0
- data/lib/openxml/drawingml/properties/shape_properties.rb +46 -0
- data/lib/openxml/drawingml/properties/shape_style.rb +16 -0
- data/lib/openxml/drawingml/properties/simple_boolean_property.rb +16 -0
- data/lib/openxml/drawingml/properties/simple_property_container_property.rb +14 -0
- data/lib/openxml/drawingml/properties/source_rectangle.rb +13 -0
- data/lib/openxml/drawingml/properties/space_after.rb +22 -0
- data/lib/openxml/drawingml/properties/space_before.rb +22 -0
- data/lib/openxml/drawingml/properties/spacing_percent.rb +11 -0
- data/lib/openxml/drawingml/properties/spacing_points.rb +20 -0
- data/lib/openxml/drawingml/properties/stretch.rb +13 -0
- data/lib/openxml/drawingml/properties/style_matrix_reference_property.rb +20 -0
- data/lib/openxml/drawingml/properties/supplemental_font.rb +14 -0
- data/lib/openxml/drawingml/properties/symbol_font.rb +13 -0
- data/lib/openxml/drawingml/properties/tab_list.rb +14 -0
- data/lib/openxml/drawingml/properties/tab_stop.rb +29 -0
- data/lib/openxml/drawingml/properties/tail_end.rb +13 -0
- data/lib/openxml/drawingml/properties/text_body.rb +15 -0
- data/lib/openxml/drawingml/properties/text_default.rb +13 -0
- data/lib/openxml/drawingml/properties/theme_elements.rb +16 -0
- data/lib/openxml/drawingml/properties/tile.rb +35 -0
- data/lib/openxml/drawingml/properties/tile_rectangle.rb +13 -0
- data/lib/openxml/drawingml/properties/transform.rb +19 -0
- data/lib/openxml/drawingml/properties/underline.rb +13 -0
- data/lib/openxml/drawingml/properties/underline_fill.rb +20 -0
- data/lib/openxml/drawingml/properties/underline_fill_text.rb +11 -0
- data/lib/openxml/drawingml/properties/underline_text.rb +11 -0
- data/lib/openxml/drawingml/properties/value_property.rb +12 -0
- data/lib/openxml/drawingml/properties/video_file.rb +13 -0
- data/lib/openxml/drawingml/properties/wav_audio_file.rb +13 -0
- data/lib/openxml/drawingml/version.rb +1 -1
- data/openxml-drawingml.gemspec +3 -3
- metadata +222 -5
- data/lib/openxml/drawingml/element.rb +0 -9
@@ -0,0 +1,17 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class Scene3d < SimplePropertyContainerProperty
|
5
|
+
include HasChildren
|
6
|
+
name "scene_3d"
|
7
|
+
namespace :a
|
8
|
+
tag :scene3d
|
9
|
+
|
10
|
+
# TODO: Implement various 3d scene components: `camera`, `lightRig`, `backdrop`
|
11
|
+
|
12
|
+
property :extension_list
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "openxml/drawingml/properties/geometry_guide"
|
2
|
+
|
3
|
+
module OpenXml
|
4
|
+
module DrawingML
|
5
|
+
module Properties
|
6
|
+
class ShapeAdjustmentList < OpenXml::Properties::ContainerProperty
|
7
|
+
namespace :a
|
8
|
+
tag :avLst
|
9
|
+
child_class :geometry_guide
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class ShapeLocks < OpenXml::Properties::ComplexProperty
|
5
|
+
include OpenXml::ContainsProperties
|
6
|
+
namespace :a
|
7
|
+
tag :spLocks
|
8
|
+
|
9
|
+
attribute :disable_text_editing, displays_as: :noTextEdit, expects: :boolean
|
10
|
+
attribute :disable_grouping, displays_as: :noGrp, expects: :boolean
|
11
|
+
attribute :disable_selection, displays_as: :noSelect, expects: :boolean
|
12
|
+
attribute :disable_rotation, displays_as: :noRot, expects: :boolean
|
13
|
+
attribute :disable_aspect_ratio_change, displays_as: :noChangeAspect, expects: :boolean
|
14
|
+
attribute :disable_moving, displays_as: :noMove, expects: :boolean
|
15
|
+
attribute :disable_resizing, displays_as: :noResize, expects: :boolean
|
16
|
+
attribute :disable_edit_points, displays_as: :noEditPoints, expects: :boolean
|
17
|
+
attribute :disable_adjustment_handles, displays_as: :noAdjustHandles, expects: :boolean
|
18
|
+
attribute :disable_change_arrowheads, displays_as: :noChangeArrowheads, expects: :boolean
|
19
|
+
|
20
|
+
property :extension_list
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class ShapeProperties < OpenXml::Properties::ComplexProperty
|
5
|
+
include OpenXml::ContainsProperties
|
6
|
+
namespace :a
|
7
|
+
tag :spPr
|
8
|
+
|
9
|
+
BLACK_AND_WHITE_MODES = %i{
|
10
|
+
auto black blackGray blackWhite clr gray grayWhite hidden invGray ltGray white
|
11
|
+
}.freeze
|
12
|
+
|
13
|
+
attribute :bw_mode, displays_as: :bwMode, one_of: BLACK_AND_WHITE_MODES
|
14
|
+
|
15
|
+
property :transform
|
16
|
+
|
17
|
+
property_choice do
|
18
|
+
property :custom_geometry
|
19
|
+
property :preset_geometry
|
20
|
+
end
|
21
|
+
|
22
|
+
property_choice do
|
23
|
+
value_property :no_fill, as: :fill_none
|
24
|
+
property :solid_fill, as: :fill_solid
|
25
|
+
property :gradient_fill, as: :fill_gradient
|
26
|
+
property :pattern_fill, as: :fill_pattern
|
27
|
+
property :blip_fill, as: :fill_blip
|
28
|
+
value_property :inherit_group_fill, as: :fill_group
|
29
|
+
end
|
30
|
+
|
31
|
+
property :outline
|
32
|
+
|
33
|
+
property_choice do
|
34
|
+
property :effect_list
|
35
|
+
property :effect_dag
|
36
|
+
end
|
37
|
+
|
38
|
+
property :scene_3d
|
39
|
+
# property :shape_3d # TODO: sp3d
|
40
|
+
|
41
|
+
property :extension_list
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class ShapeStyle < SimplePropertyContainerProperty
|
5
|
+
namespace :a
|
6
|
+
tag :style
|
7
|
+
|
8
|
+
property :outline_reference, required: true
|
9
|
+
property :fill_reference, required: true
|
10
|
+
property :effect_reference, required: true
|
11
|
+
property :font_reference, required: true
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class SimpleBooleanProperty < OpenXml::Properties::BooleanProperty
|
5
|
+
|
6
|
+
def to_xml(xml)
|
7
|
+
return unless value
|
8
|
+
apply_namespace(xml).public_send(tag) do
|
9
|
+
yield xml if block_given?
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class SpaceAfter < SimplePropertyContainerProperty
|
5
|
+
namespace :a
|
6
|
+
tag :spcAft
|
7
|
+
|
8
|
+
property_choice do
|
9
|
+
value_property :spacing_percent
|
10
|
+
value_property :spacing_points
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize(value)
|
14
|
+
super()
|
15
|
+
target_property = value =~ /%/ ? :spacing_percent= : :spacing_points=
|
16
|
+
public_send(target_property, value)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class SpaceBefore < SimplePropertyContainerProperty
|
5
|
+
namespace :a
|
6
|
+
tag :spcBef
|
7
|
+
|
8
|
+
property_choice do
|
9
|
+
value_property :spacing_percent
|
10
|
+
value_property :spacing_points
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize(value)
|
14
|
+
super()
|
15
|
+
target_property = value =~ /%/ ? :spacing_percent= : :spacing_points=
|
16
|
+
public_send(target_property, value)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class SpacingPoints < IntegerProperty
|
5
|
+
namespace :a
|
6
|
+
tag :spcPts
|
7
|
+
|
8
|
+
def valid?
|
9
|
+
# Value range taken from OpenXml Spec Part 1, section 20.1.10.77
|
10
|
+
super && (0..158_400).cover?(value)
|
11
|
+
end
|
12
|
+
|
13
|
+
def invalid_message
|
14
|
+
"Invalid spacing_points: must be a point value between 0 and 158,400"
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class StyleMatrixReferenceProperty < OpenXml::Properties::ComplexProperty
|
5
|
+
include OpenXml::ContainsProperties
|
6
|
+
attribute :index, displays_as: :idx, expects: :positive_integer, required: true
|
7
|
+
|
8
|
+
property_choice required: true do
|
9
|
+
property :component_rgb, as: :color_component_rgb
|
10
|
+
value_property :rgb, as: :color_hex_rgb
|
11
|
+
property :hsl, as: :color_hsl
|
12
|
+
value_property :system_color, as: :color_system_color
|
13
|
+
value_property :scheme_color, as: :color_scheme_color
|
14
|
+
value_property :preset_color, as: :color_preset_color
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class SupplementalFont < OpenXml::Properties::ComplexProperty
|
5
|
+
namespace :a
|
6
|
+
tag :font
|
7
|
+
|
8
|
+
attribute :script, expects: :string
|
9
|
+
attribute :typeface, expects: :string
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class TabStop < OpenXml::Properties::ComplexProperty
|
5
|
+
namespace :a
|
6
|
+
tag :tab
|
7
|
+
|
8
|
+
attribute :alignment, displays_as: :algn, one_of: %i{ ctr dec l r }
|
9
|
+
attribute :position, displays_as: :pos, expects: :coordinate
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def coordinate(value)
|
14
|
+
message = "Invalid coordinate: Must be an integer or include a unit measure"
|
15
|
+
raise ArgumentError, message unless integer?(value) || universal_measure?(value)
|
16
|
+
end
|
17
|
+
|
18
|
+
def universal_measure?(value)
|
19
|
+
value.is_a?(String) && value =~ OpenXml::DrawingML::ST_UniversalMeasure
|
20
|
+
end
|
21
|
+
|
22
|
+
def integer?(value)
|
23
|
+
value.is_a?(Integer)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class TextBody < SimplePropertyContainerProperty
|
5
|
+
include OpenXml::HasChildren
|
6
|
+
namespace :a
|
7
|
+
tag :txBody
|
8
|
+
|
9
|
+
property :body_properties, required: true
|
10
|
+
property :list_style
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module OpenXml
|
2
|
+
module DrawingML
|
3
|
+
module Properties
|
4
|
+
class ThemeElements < SimplePropertyContainerProperty
|
5
|
+
namespace :a
|
6
|
+
tag :themeElements
|
7
|
+
|
8
|
+
property :color_scheme, required: true
|
9
|
+
property :font_scheme, required: true
|
10
|
+
property :format_scheme, required: true
|
11
|
+
property :extension_list
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|