aspose_slides_cloud 23.3.0 → 23.6.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 +35 -10
- data/README.md +12 -0
- data/TestData/macros.pptm +0 -0
- data/TestData/test.pptx +0 -0
- data/aspose_slides_cloud.gemspec +3 -1
- data/docker-entrypoint.sh +4 -3
- data/lib/aspose_slides_cloud/api/slides_api.rb +3669 -1888
- data/lib/aspose_slides_cloud/api_client.rb +3 -0
- data/lib/aspose_slides_cloud/models/accent_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/access_permissions.rb +1 -125
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/add_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/add_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_bi_level_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_ceiling_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_floor_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_inverse_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_modulate_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_modulate_fixed_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_replace_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/api_info.rb +1 -125
- data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/array_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +1 -147
- data/lib/aspose_slides_cloud/models/audio_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/axes.rb +1 -125
- data/lib/aspose_slides_cloud/models/axis.rb +1 -147
- data/lib/aspose_slides_cloud/models/bar_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/base_object.rb +173 -0
- data/lib/aspose_slides_cloud/models/bi_level_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/block_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/blur_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/blur_image_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/border_box_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/box_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +0 -146
- data/lib/aspose_slides_cloud/models/bubble_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/camera.rb +1 -147
- data/lib/aspose_slides_cloud/models/chart.rb +0 -146
- data/lib/aspose_slides_cloud/models/chart_category.rb +1 -125
- data/lib/aspose_slides_cloud/models/chart_lines_format.rb +1 -125
- data/lib/aspose_slides_cloud/models/chart_series_group.rb +1 -147
- data/lib/aspose_slides_cloud/models/chart_title.rb +1 -125
- data/lib/aspose_slides_cloud/models/chart_wall.rb +1 -147
- data/lib/aspose_slides_cloud/models/close_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/color_change_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/color_replace_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/color_scheme.rb +0 -124
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +1 -125
- data/lib/aspose_slides_cloud/models/connector.rb +0 -146
- data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +1 -125
- data/lib/aspose_slides_cloud/models/data_point.rb +1 -147
- data/lib/aspose_slides_cloud/models/data_source.rb +1 -147
- data/lib/aspose_slides_cloud/models/delimiter_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/disc_usage.rb +1 -125
- data/lib/aspose_slides_cloud/models/document.rb +0 -124
- data/lib/aspose_slides_cloud/models/document_properties.rb +0 -124
- data/lib/aspose_slides_cloud/models/document_property.rb +0 -124
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +0 -124
- data/lib/aspose_slides_cloud/models/duotone_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/effect_format.rb +1 -125
- data/lib/aspose_slides_cloud/models/entity_exists.rb +1 -125
- data/lib/aspose_slides_cloud/models/error.rb +1 -125
- data/lib/aspose_slides_cloud/models/error_details.rb +1 -125
- data/lib/aspose_slides_cloud/models/export_options.rb +1 -125
- data/lib/aspose_slides_cloud/models/file_version.rb +0 -124
- data/lib/aspose_slides_cloud/models/file_versions.rb +1 -125
- data/lib/aspose_slides_cloud/models/files_list.rb +1 -125
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +1 -125
- data/lib/aspose_slides_cloud/models/fill_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/fill_overlay_image_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/font_data.rb +1 -125
- data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +1 -125
- data/lib/aspose_slides_cloud/models/font_scheme.rb +0 -124
- data/lib/aspose_slides_cloud/models/font_set.rb +1 -125
- data/lib/aspose_slides_cloud/models/font_subst_rule.rb +1 -125
- data/lib/aspose_slides_cloud/models/fonts_data.rb +1 -125
- data/lib/aspose_slides_cloud/models/format_scheme.rb +0 -124
- data/lib/aspose_slides_cloud/models/fraction_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/function_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/geometry_path.rb +1 -147
- data/lib/aspose_slides_cloud/models/geometry_paths.rb +1 -125
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/gif_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/glow_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +1 -125
- data/lib/aspose_slides_cloud/models/graphical_object.rb +0 -146
- data/lib/aspose_slides_cloud/models/gray_scale_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/group_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/grouping_character_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/header_footer.rb +0 -124
- data/lib/aspose_slides_cloud/models/hsl_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/html5_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/html_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/hyperlink.rb +1 -147
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +1 -125
- data/lib/aspose_slides_cloud/models/image.rb +0 -124
- data/lib/aspose_slides_cloud/models/image_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/image_export_options_base.rb +0 -124
- data/lib/aspose_slides_cloud/models/image_transform_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/images.rb +0 -124
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/input.rb +1 -125
- data/lib/aspose_slides_cloud/models/input_file.rb +1 -147
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +1 -125
- data/lib/aspose_slides_cloud/models/layout_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/layout_slides.rb +0 -124
- data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/legend.rb +1 -147
- data/lib/aspose_slides_cloud/models/light_rig.rb +1 -147
- data/lib/aspose_slides_cloud/models/limit_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/line_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/literals.rb +0 -146
- data/lib/aspose_slides_cloud/models/luminance_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/master_slide.rb +0 -124
- data/lib/aspose_slides_cloud/models/master_slides.rb +0 -124
- data/lib/aspose_slides_cloud/models/math_element.rb +1 -147
- data/lib/aspose_slides_cloud/models/math_paragraph.rb +1 -147
- data/lib/aspose_slides_cloud/models/matrix_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/merge.rb +0 -146
- data/lib/aspose_slides_cloud/models/merging_source.rb +1 -125
- data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/nary_operator_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/no_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +1 -125
- data/lib/aspose_slides_cloud/models/notes_slide.rb +0 -124
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +0 -124
- data/lib/aspose_slides_cloud/models/object_exist.rb +1 -125
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +0 -146
- data/lib/aspose_slides_cloud/models/one_value_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +1 -125
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/output_file.rb +1 -147
- data/lib/aspose_slides_cloud/models/paragraph.rb +0 -146
- data/lib/aspose_slides_cloud/models/paragraph_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/paragraphs.rb +0 -124
- data/lib/aspose_slides_cloud/models/path_input_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/path_output_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/path_segment.rb +1 -147
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/picture_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/picture_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/pipeline.rb +1 -125
- data/lib/aspose_slides_cloud/models/placeholder.rb +0 -146
- data/lib/aspose_slides_cloud/models/placeholders.rb +0 -124
- data/lib/aspose_slides_cloud/models/plot_area.rb +1 -147
- data/lib/aspose_slides_cloud/models/portion.rb +0 -146
- data/lib/aspose_slides_cloud/models/portion_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/portions.rb +0 -124
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +1 -147
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +1 -125
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/protection_properties.rb +0 -124
- data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/radical_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/remove_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/remove_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/replace_text.rb +0 -146
- data/lib/aspose_slides_cloud/models/request_input_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/reset_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/resource_base.rb +1 -125
- data/lib/aspose_slides_cloud/models/resource_uri.rb +1 -125
- data/lib/aspose_slides_cloud/models/response_output_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/save.rb +0 -146
- data/lib/aspose_slides_cloud/models/save_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/save_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +0 -146
- data/lib/aspose_slides_cloud/models/scatter_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/section.rb +0 -124
- data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/sections.rb +0 -124
- data/lib/aspose_slides_cloud/models/series.rb +1 -147
- data/lib/aspose_slides_cloud/models/series_marker.rb +1 -147
- data/lib/aspose_slides_cloud/models/shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/shape_base.rb +0 -146
- data/lib/aspose_slides_cloud/models/shape_bevel.rb +1 -147
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +1 -147
- data/lib/aspose_slides_cloud/models/shapes.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_animation.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_background.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_comment.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_comment_base.rb +1 -147
- data/lib/aspose_slides_cloud/models/slide_comments.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_modern_comment.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_properties.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_show_properties.rb +0 -146
- data/lib/aspose_slides_cloud/models/slides.rb +0 -124
- data/lib/aspose_slides_cloud/models/smart_art.rb +0 -146
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +1 -147
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/solid_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/split_document_result.rb +0 -124
- data/lib/aspose_slides_cloud/models/storage_exist.rb +1 -125
- data/lib/aspose_slides_cloud/models/storage_file.rb +1 -125
- data/lib/aspose_slides_cloud/models/subscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +0 -146
- data/lib/aspose_slides_cloud/models/superscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/table.rb +0 -146
- data/lib/aspose_slides_cloud/models/table_cell.rb +21 -147
- data/lib/aspose_slides_cloud/models/table_cell_merge_options.rb +156 -0
- data/lib/aspose_slides_cloud/models/table_cell_split_type.rb +42 -0
- data/lib/aspose_slides_cloud/models/table_column.rb +1 -125
- data/lib/aspose_slides_cloud/models/table_row.rb +1 -125
- data/lib/aspose_slides_cloud/models/task.rb +1 -147
- data/lib/aspose_slides_cloud/models/text_bounds.rb +1 -125
- data/lib/aspose_slides_cloud/models/text_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/text_frame_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/text_item.rb +1 -125
- data/lib/aspose_slides_cloud/models/text_items.rb +0 -124
- data/lib/aspose_slides_cloud/models/theme.rb +0 -124
- data/lib/aspose_slides_cloud/models/three_d_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/tint_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/update_background.rb +0 -146
- data/lib/aspose_slides_cloud/models/update_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/vba_module.rb +113 -0
- data/lib/aspose_slides_cloud/models/vba_project.rb +105 -0
- data/lib/aspose_slides_cloud/models/vba_reference.rb +101 -0
- data/lib/aspose_slides_cloud/models/video_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/video_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/view_properties.rb +0 -146
- data/lib/aspose_slides_cloud/models/workbook.rb +0 -146
- data/lib/aspose_slides_cloud/models/xaml_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/xy_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/zoom_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/zoom_object.rb +0 -146
- data/lib/aspose_slides_cloud/type_registry.rb +7 -0
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/lib/aspose_slides_cloud.rb +6 -0
- data/spec/api/slides_api_spec.rb +15105 -9783
- data/spec/spec_utils.rb +1 -1
- data/spec/use_cases/auth_spec.rb +15 -0
- data/spec/use_cases/slide_spec.rb +9 -9
- data/spec/use_cases/table_spec.rb +392 -0
- data/spec/use_cases/vba_spec.rb +94 -0
- data/testConfig.json +2 -2
- data/testRules.json +10 -0
- metadata +57 -6
data/spec/spec_utils.rb
CHANGED
data/spec/use_cases/auth_spec.rb
CHANGED
@@ -87,5 +87,20 @@ describe 'UseCases' do
|
|
87
87
|
expect(c).to eq(200)
|
88
88
|
expect(o).not_to be(nil)
|
89
89
|
end
|
90
|
+
|
91
|
+
it 'expired token' do
|
92
|
+
config = JSON.parse(File.read('testConfig.json'))
|
93
|
+
configuration = AsposeSlidesCloud::Configuration.new
|
94
|
+
configuration.base_url = config["BaseUrl"]
|
95
|
+
configuration.auth_base_url = config["AuthBaseUrl"] ? config["AuthBaseUrl"] : config["BaseUrl"]
|
96
|
+
configuration.app_sid = config["ClientId"]
|
97
|
+
configuration.app_key = config["ClientSecret"]
|
98
|
+
configuration.access_token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2ODYzMzI5ODAsImV4cCI6MTY4NjQxOTM4MCwiaXNzIjoiaHR0cHM6Ly9hcGkuYXNwb3NlLmNsb3VkIiwiYXVkIjpbImh0dHBzOi8vYXBpLmFzcG9zZS5jbG91ZC9yZXNvdXJjZXMiLCJhcGkuYmlsbGluZyIsImFwaS5pZGVudGl0eSIsImFwaS5wcm9kdWN0cyIsImFwaS5zdG9yYWdlIl0sImNsaWVudF9pZCI6ImVhMTFkNzAwLWE3YjAtNDgwMi05YjFjLWRmYWVhNGI2OTA0YSIsImNsaWVudF9kZWZhdWx0X3N0b3JhZ2UiOiIyNDc5NjRmYy04MjIyLTQ4M2EtYmZmMS1kNTYxYzM5MjQ3ZWIiLCJjbGllbnRfaWRlbnRpdHlfdXNlcl9pZCI6Ijc2MjY4MiIsInNjb3BlIjpbImFwaS5iaWxsaW5nIiwiYXBpLmlkZW50aXR5IiwiYXBpLnByb2R1Y3RzIiwiYXBpLnN0b3JhZ2UiXX0.qGRwbpVQNJ7k09FF81bfknBd_9bERkProMukobxkAEzwIhIRSwCDvzgVhhUcA-OMr8s-49XLYtFb6ZtuDT2r3xDsYXWxwjYekFk4MZhEFKeIqLyI9-kSxanL7w4WoKkE_OAXHquChRJcsqz5vhKOOJ9swu4PS0TSRYHfkLFsLpZLXIV4X53Ear8vDosOfeZONq9QPCfikCi1ruSMa3OddD2WE17_V3FzzyuC7d3FQxRznFJhyWoKI2jvOw7a92KatWVt3I78fOl9M-3MkkHR1ip5CXp3arnn139i73D-TfXeRNcAU5UpAGfuYPbIDpTkJ-DirqYWO6I5S7JmchPl1A"
|
99
|
+
configuration.debugging = config["Debug"]
|
100
|
+
api = AsposeSlidesCloud::SlidesApi.new(configuration)
|
101
|
+
o, c, _h = api.get_api_info_with_http_info
|
102
|
+
expect(c).to eq(200)
|
103
|
+
expect(o).not_to be(nil)
|
104
|
+
end
|
90
105
|
end
|
91
106
|
end
|
@@ -30,7 +30,7 @@ describe 'UseCases' do
|
|
30
30
|
password = "password"
|
31
31
|
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
32
32
|
slides = AsposeSlidesCloud::SpecUtils.api.get_slides(file_name, password, folder_name)
|
33
|
-
expect(slides.slide_list.length).to eq(
|
33
|
+
expect(slides.slide_list.length).to eq(9)
|
34
34
|
end
|
35
35
|
|
36
36
|
it "get slide" do
|
@@ -50,9 +50,9 @@ describe 'UseCases' do
|
|
50
50
|
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
51
51
|
|
52
52
|
slides = AsposeSlidesCloud::SpecUtils.api.create_slide(file_name, "layoutSlides/3", 1, password, folder_name)
|
53
|
-
expect(slides.slide_list.length).to eq(9)
|
54
|
-
slides = AsposeSlidesCloud::SpecUtils.api.create_slide(file_name, "layoutSlides/3", nil, password, folder_name)
|
55
53
|
expect(slides.slide_list.length).to eq(10)
|
54
|
+
slides = AsposeSlidesCloud::SpecUtils.api.create_slide(file_name, "layoutSlides/3", nil, password, folder_name)
|
55
|
+
expect(slides.slide_list.length).to eq(11)
|
56
56
|
end
|
57
57
|
|
58
58
|
it "copy slide" do
|
@@ -62,7 +62,7 @@ describe 'UseCases' do
|
|
62
62
|
slide_index = 3
|
63
63
|
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
64
64
|
slides = AsposeSlidesCloud::SpecUtils.api.copy_slide(file_name, slide_index, nil, nil, nil, nil, password, folder_name)
|
65
|
-
expect(slides.slide_list.length).to eq(
|
65
|
+
expect(slides.slide_list.length).to eq(10)
|
66
66
|
end
|
67
67
|
|
68
68
|
it "copy slide from source" do
|
@@ -76,7 +76,7 @@ describe 'UseCases' do
|
|
76
76
|
|
77
77
|
slides = AsposeSlidesCloud::SpecUtils.api.copy_slide(file_name, slide_index, 1, folder_name + "/" + source_file_name,
|
78
78
|
nil, nil, password, folder_name)
|
79
|
-
expect(slides.slide_list.length).to eq(
|
79
|
+
expect(slides.slide_list.length).to eq(10)
|
80
80
|
end
|
81
81
|
|
82
82
|
it "move slide" do
|
@@ -86,7 +86,7 @@ describe 'UseCases' do
|
|
86
86
|
slide_index = 1
|
87
87
|
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
88
88
|
slides = AsposeSlidesCloud::SpecUtils.api.move_slide(file_name, slide_index, 2, password, folder_name)
|
89
|
-
expect(slides.slide_list.length).to eq(
|
89
|
+
expect(slides.slide_list.length).to eq(9)
|
90
90
|
end
|
91
91
|
|
92
92
|
it "reorder slides" do
|
@@ -98,7 +98,7 @@ describe 'UseCases' do
|
|
98
98
|
|
99
99
|
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
100
100
|
slides = AsposeSlidesCloud::SpecUtils.api.reorder_slides(file_name, old_positions, new_positions, password, folder_name)
|
101
|
-
expect(slides.slide_list.length).to eq(
|
101
|
+
expect(slides.slide_list.length).to eq(9)
|
102
102
|
end
|
103
103
|
|
104
104
|
it "update slide" do
|
@@ -132,7 +132,7 @@ describe 'UseCases' do
|
|
132
132
|
password = "password"
|
133
133
|
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
134
134
|
slides = AsposeSlidesCloud::SpecUtils.api.delete_slides(file_name, [1,3,5], password, folder_name)
|
135
|
-
expect(slides.slide_list.length).to eq(
|
135
|
+
expect(slides.slide_list.length).to eq(6)
|
136
136
|
end
|
137
137
|
|
138
138
|
it "delete slide" do
|
@@ -142,7 +142,7 @@ describe 'UseCases' do
|
|
142
142
|
slide_index = 1
|
143
143
|
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
144
144
|
slides = AsposeSlidesCloud::SpecUtils.api.delete_slide(file_name, slide_index, password, folder_name)
|
145
|
-
expect(slides.slide_list.length).to eq(
|
145
|
+
expect(slides.slide_list.length).to eq(8)
|
146
146
|
end
|
147
147
|
|
148
148
|
it "get background" do
|
@@ -0,0 +1,392 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
require 'spec_helper'
|
24
|
+
|
25
|
+
describe 'UseCases' do
|
26
|
+
describe 'Tables' do
|
27
|
+
it 'update table cell' do
|
28
|
+
folder_name = "TempSlidesSDK"
|
29
|
+
file_name = "test.pptx"
|
30
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
31
|
+
|
32
|
+
slide_index = 9
|
33
|
+
shape_index = 1
|
34
|
+
row_index = 2
|
35
|
+
cell_index = 1
|
36
|
+
dto = AsposeSlidesCloud::TableCell.new
|
37
|
+
dto.text = "Test text"
|
38
|
+
result = AsposeSlidesCloud::SpecUtils.api.update_table_cell(file_name, slide_index, shape_index,
|
39
|
+
row_index, cell_index, dto, "password", folder_name)
|
40
|
+
expect(result.text).to eq(dto.text)
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'create table row' do
|
44
|
+
folder_name = "TempSlidesSDK"
|
45
|
+
file_name = "test.pptx"
|
46
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
47
|
+
|
48
|
+
slide_index = 9
|
49
|
+
shape_index = 1
|
50
|
+
cell0 = AsposeSlidesCloud::TableCell.new
|
51
|
+
cell0.text = "Cell 1"
|
52
|
+
cell1 = AsposeSlidesCloud::TableCell.new
|
53
|
+
cell1.text = "Cell 2"
|
54
|
+
cell2 = AsposeSlidesCloud::TableCell.new
|
55
|
+
cell2.text = "Cell 2"
|
56
|
+
cell3 = AsposeSlidesCloud::TableCell.new
|
57
|
+
cell3.text = "Cell 3"
|
58
|
+
|
59
|
+
dto = AsposeSlidesCloud::TableRow.new
|
60
|
+
dto.minimal_height = 30
|
61
|
+
dto.cells = [cell0, cell1, cell2, cell3]
|
62
|
+
|
63
|
+
result = AsposeSlidesCloud::SpecUtils.api.create_table_row(file_name, slide_index, shape_index, dto,
|
64
|
+
nil, "password", folder_name)
|
65
|
+
expect(result.cells.length).to eq(dto.cells.length)
|
66
|
+
expect(result.minimal_height).to eq(dto.minimal_height)
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'delete table row' do
|
70
|
+
folder_name = "TempSlidesSDK"
|
71
|
+
file_name = "test.pptx"
|
72
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
73
|
+
|
74
|
+
slide_index = 9
|
75
|
+
shape_index = 1
|
76
|
+
row_index = 2
|
77
|
+
with_attached_rows = true
|
78
|
+
|
79
|
+
result = AsposeSlidesCloud::SpecUtils.api.delete_table_row(file_name, slide_index, shape_index,
|
80
|
+
row_index, with_attached_rows, "password", folder_name)
|
81
|
+
expect(result.rows.length).to eq(2)
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'update table row' do
|
85
|
+
folder_name = "TempSlidesSDK"
|
86
|
+
file_name = "test.pptx"
|
87
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
88
|
+
|
89
|
+
slide_index = 9
|
90
|
+
shape_index = 1
|
91
|
+
row_index = 1
|
92
|
+
|
93
|
+
dto = AsposeSlidesCloud::TableRow.new
|
94
|
+
dto.minimal_height = 30
|
95
|
+
|
96
|
+
result = AsposeSlidesCloud::SpecUtils.api.update_table_row(file_name, slide_index, shape_index,
|
97
|
+
row_index, dto, "password", folder_name)
|
98
|
+
|
99
|
+
expect(result.minimal_height).to eq(dto.minimal_height)
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'merge table cell' do
|
103
|
+
folder_name = "TempSlidesSDK"
|
104
|
+
file_name = "test.pptx"
|
105
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
106
|
+
|
107
|
+
slide_index = 9
|
108
|
+
shape_index = 1
|
109
|
+
|
110
|
+
dto = AsposeSlidesCloud::TableCellMergeOptions.new
|
111
|
+
dto.first_row_index = 1
|
112
|
+
dto.first_cell_index = 1
|
113
|
+
dto.last_row_index = 2
|
114
|
+
dto.last_cell_index = 2
|
115
|
+
dto.allow_splitting = true
|
116
|
+
|
117
|
+
result = AsposeSlidesCloud::SpecUtils.api.merge_table_cells(file_name, slide_index, shape_index, dto, "password", folder_name)
|
118
|
+
|
119
|
+
expect(result.rows[0].cells[0].col_span).to eq(2)
|
120
|
+
expect(result.rows[0].cells[0].row_span).to eq(2)
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'split table cell by width' do
|
124
|
+
folder_name = "TempSlidesSDK"
|
125
|
+
file_name = "test.pptx"
|
126
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
127
|
+
|
128
|
+
slide_index = 9
|
129
|
+
shape_index = 1
|
130
|
+
row_index = 1
|
131
|
+
cell_index = 1
|
132
|
+
cell_width = 10
|
133
|
+
|
134
|
+
result = AsposeSlidesCloud::SpecUtils.api.split_table_cell(file_name, slide_index, shape_index,
|
135
|
+
row_index, cell_index, "SplitByWidth", cell_width, "password", folder_name)
|
136
|
+
|
137
|
+
expect(result.rows[0].cells.length).to eq(5)
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'split table cell by height' do
|
141
|
+
folder_name = "TempSlidesSDK"
|
142
|
+
file_name = "test.pptx"
|
143
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
144
|
+
|
145
|
+
slide_index = 9
|
146
|
+
shape_index = 1
|
147
|
+
row_index = 1
|
148
|
+
cell_index = 1
|
149
|
+
cell_height = 10
|
150
|
+
|
151
|
+
result = AsposeSlidesCloud::SpecUtils.api.split_table_cell(file_name, slide_index, shape_index,
|
152
|
+
row_index, cell_index, "SplitByHeight", cell_height, "password", folder_name)
|
153
|
+
|
154
|
+
expect(result.rows.length).to eq(5)
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'split table cell by col span' do
|
158
|
+
folder_name = "TempSlidesSDK"
|
159
|
+
file_name = "test.pptx"
|
160
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
161
|
+
|
162
|
+
slide_index = 9
|
163
|
+
shape_index = 1
|
164
|
+
row_index = 3
|
165
|
+
cell_index = 1
|
166
|
+
col_span = 1
|
167
|
+
|
168
|
+
result = AsposeSlidesCloud::SpecUtils.api.split_table_cell(file_name, slide_index, shape_index,
|
169
|
+
row_index, cell_index, "SplitByColSpan", col_span, "password", folder_name)
|
170
|
+
|
171
|
+
expect(result.rows[0].cells[0].col_span).to eq(nil)
|
172
|
+
end
|
173
|
+
|
174
|
+
it 'split table cell by row span' do
|
175
|
+
folder_name = "TempSlidesSDK"
|
176
|
+
file_name = "test.pptx"
|
177
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
178
|
+
|
179
|
+
slide_index = 9
|
180
|
+
shape_index = 1
|
181
|
+
row_index = 2
|
182
|
+
cell_index = 3
|
183
|
+
row_span = 1
|
184
|
+
|
185
|
+
result = AsposeSlidesCloud::SpecUtils.api.split_table_cell(file_name, slide_index, shape_index,
|
186
|
+
row_index, cell_index, "SplitByRowSpan", row_span, "password", folder_name)
|
187
|
+
|
188
|
+
expect(result.rows[1].cells[2].row_span).to eq(nil)
|
189
|
+
end
|
190
|
+
|
191
|
+
it 'get table cell paragraphs' do
|
192
|
+
folder_name = "TempSlidesSDK"
|
193
|
+
file_name = "test.pptx"
|
194
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
195
|
+
|
196
|
+
slide_index = 9
|
197
|
+
shape_index = 1
|
198
|
+
row_index = 1
|
199
|
+
cell_index = 1
|
200
|
+
|
201
|
+
result = AsposeSlidesCloud::SpecUtils.api.get_table_cell_paragraphs(file_name, slide_index, shape_index,
|
202
|
+
row_index, cell_index, "password", folder_name)
|
203
|
+
|
204
|
+
expect(result.paragraph_links.length).to eq(1)
|
205
|
+
end
|
206
|
+
|
207
|
+
it 'get table cell paragraph' do
|
208
|
+
folder_name = "TempSlidesSDK"
|
209
|
+
file_name = "test.pptx"
|
210
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
211
|
+
|
212
|
+
slide_index = 9
|
213
|
+
shape_index = 1
|
214
|
+
row_index = 1
|
215
|
+
cell_index = 1
|
216
|
+
paragraph_index = 1
|
217
|
+
|
218
|
+
result = AsposeSlidesCloud::SpecUtils.api.get_table_cell_paragraph(file_name, slide_index, shape_index,
|
219
|
+
row_index, cell_index, paragraph_index, "password", folder_name)
|
220
|
+
|
221
|
+
expect(result.portion_list.length).to eq(2)
|
222
|
+
end
|
223
|
+
|
224
|
+
it 'create table cell paragraph' do
|
225
|
+
folder_name = "TempSlidesSDK"
|
226
|
+
file_name = "test.pptx"
|
227
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
228
|
+
|
229
|
+
slide_index = 9
|
230
|
+
shape_index = 1
|
231
|
+
row_index = 1
|
232
|
+
cell_index = 1
|
233
|
+
|
234
|
+
portion0 = AsposeSlidesCloud::Portion.new
|
235
|
+
portion0.text = "Portion 1"
|
236
|
+
portion1 = AsposeSlidesCloud::Portion.new
|
237
|
+
portion1.text = "Portion 2"
|
238
|
+
dto = AsposeSlidesCloud::Paragraph.new
|
239
|
+
dto.portion_list = [portion0, portion1]
|
240
|
+
|
241
|
+
|
242
|
+
result = AsposeSlidesCloud::SpecUtils.api.create_table_cell_paragraph(file_name, slide_index, shape_index,
|
243
|
+
row_index, cell_index, dto, "password", folder_name)
|
244
|
+
|
245
|
+
expect(result.portion_list.length).to eq(2)
|
246
|
+
end
|
247
|
+
|
248
|
+
it 'update table cell paragraph' do
|
249
|
+
folder_name = "TempSlidesSDK"
|
250
|
+
file_name = "test.pptx"
|
251
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
252
|
+
|
253
|
+
slide_index = 9
|
254
|
+
shape_index = 1
|
255
|
+
row_index = 1
|
256
|
+
cell_index = 1
|
257
|
+
paragraph_index = 1
|
258
|
+
|
259
|
+
portion0 = AsposeSlidesCloud::Portion.new
|
260
|
+
portion0.text = "Portion 1"
|
261
|
+
portion1 = AsposeSlidesCloud::Portion.new
|
262
|
+
portion1.text = "Portion 2"
|
263
|
+
dto = AsposeSlidesCloud::Paragraph.new
|
264
|
+
dto.portion_list = [portion0, portion1]
|
265
|
+
|
266
|
+
|
267
|
+
result = AsposeSlidesCloud::SpecUtils.api.update_table_cell_paragraph(file_name, slide_index, shape_index,
|
268
|
+
row_index, cell_index, paragraph_index, dto, "password", folder_name)
|
269
|
+
|
270
|
+
expect(result.portion_list.length).to eq(2)
|
271
|
+
end
|
272
|
+
|
273
|
+
it 'delete table cell paragraph' do
|
274
|
+
folder_name = "TempSlidesSDK"
|
275
|
+
file_name = "test.pptx"
|
276
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
277
|
+
|
278
|
+
slide_index = 9
|
279
|
+
shape_index = 1
|
280
|
+
row_index = 1
|
281
|
+
cell_index = 1
|
282
|
+
paragraph_index = 1
|
283
|
+
|
284
|
+
portion0 = AsposeSlidesCloud::Portion.new
|
285
|
+
portion0.text = "Portion 1"
|
286
|
+
portion1 = AsposeSlidesCloud::Portion.new
|
287
|
+
portion1.text = "Portion 2"
|
288
|
+
dto = AsposeSlidesCloud::Paragraph.new
|
289
|
+
dto.portion_list = [portion0, portion1]
|
290
|
+
|
291
|
+
|
292
|
+
result = AsposeSlidesCloud::SpecUtils.api.delete_table_cell_paragraph(file_name, slide_index, shape_index,
|
293
|
+
row_index, cell_index, paragraph_index, "password", folder_name)
|
294
|
+
|
295
|
+
expect(result.paragraph_links.length).to eq(0)
|
296
|
+
end
|
297
|
+
|
298
|
+
it 'get table cell portions' do
|
299
|
+
folder_name = "TempSlidesSDK"
|
300
|
+
file_name = "test.pptx"
|
301
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
302
|
+
|
303
|
+
slide_index = 9
|
304
|
+
shape_index = 1
|
305
|
+
row_index = 1
|
306
|
+
cell_index = 1
|
307
|
+
paragraph_index = 1
|
308
|
+
|
309
|
+
result = AsposeSlidesCloud::SpecUtils.api.get_table_cell_portions(file_name, slide_index, shape_index,
|
310
|
+
row_index, cell_index, paragraph_index, "password", folder_name)
|
311
|
+
|
312
|
+
expect(result.items.length).to eq(2)
|
313
|
+
end
|
314
|
+
|
315
|
+
it 'get table cell portions' do
|
316
|
+
folder_name = "TempSlidesSDK"
|
317
|
+
file_name = "test.pptx"
|
318
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
319
|
+
|
320
|
+
slide_index = 9
|
321
|
+
shape_index = 1
|
322
|
+
row_index = 1
|
323
|
+
cell_index = 1
|
324
|
+
paragraph_index = 1
|
325
|
+
portion_index = 1
|
326
|
+
|
327
|
+
result = AsposeSlidesCloud::SpecUtils.api.get_table_cell_portion(file_name, slide_index, shape_index,
|
328
|
+
row_index, cell_index, paragraph_index, portion_index, "password", folder_name)
|
329
|
+
|
330
|
+
expect(result.text).to eq("Header")
|
331
|
+
end
|
332
|
+
|
333
|
+
it 'create table cell portion' do
|
334
|
+
folder_name = "TempSlidesSDK"
|
335
|
+
file_name = "test.pptx"
|
336
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
337
|
+
|
338
|
+
slide_index = 9
|
339
|
+
shape_index = 1
|
340
|
+
row_index = 1
|
341
|
+
cell_index = 1
|
342
|
+
paragraph_index = 1
|
343
|
+
dto = AsposeSlidesCloud::Portion.new
|
344
|
+
dto.text = "Portion 1"
|
345
|
+
|
346
|
+
result = AsposeSlidesCloud::SpecUtils.api.create_table_cell_portion(file_name, slide_index, shape_index,
|
347
|
+
row_index, cell_index, paragraph_index, dto, "password", folder_name)
|
348
|
+
|
349
|
+
expect(result.text).to eq(dto.text)
|
350
|
+
end
|
351
|
+
|
352
|
+
it 'update table cell portion' do
|
353
|
+
folder_name = "TempSlidesSDK"
|
354
|
+
file_name = "test.pptx"
|
355
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
356
|
+
|
357
|
+
slide_index = 9
|
358
|
+
shape_index = 1
|
359
|
+
row_index = 1
|
360
|
+
cell_index = 1
|
361
|
+
paragraph_index = 1
|
362
|
+
portion_index = 1
|
363
|
+
dto = AsposeSlidesCloud::Portion.new
|
364
|
+
dto.text = "Portion 1"
|
365
|
+
|
366
|
+
result = AsposeSlidesCloud::SpecUtils.api.update_table_cell_portion(file_name, slide_index, shape_index,
|
367
|
+
row_index, cell_index, paragraph_index, portion_index, dto, "password", folder_name)
|
368
|
+
|
369
|
+
expect(result.text).to eq(dto.text)
|
370
|
+
end
|
371
|
+
|
372
|
+
it 'delete table cell portion' do
|
373
|
+
folder_name = "TempSlidesSDK"
|
374
|
+
file_name = "test.pptx"
|
375
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
376
|
+
|
377
|
+
slide_index = 9
|
378
|
+
shape_index = 1
|
379
|
+
row_index = 1
|
380
|
+
cell_index = 1
|
381
|
+
paragraph_index = 1
|
382
|
+
portion_index = 1
|
383
|
+
dto = AsposeSlidesCloud::Portion.new
|
384
|
+
dto.text = "Portion 1"
|
385
|
+
|
386
|
+
result = AsposeSlidesCloud::SpecUtils.api.delete_table_cell_portion(file_name, slide_index, shape_index,
|
387
|
+
row_index, cell_index, paragraph_index, portion_index, "password", folder_name)
|
388
|
+
|
389
|
+
expect(result.items.length).to eq(1)
|
390
|
+
end
|
391
|
+
end
|
392
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
require 'spec_helper'
|
24
|
+
|
25
|
+
describe 'UseCases' do
|
26
|
+
describe 'VBA' do
|
27
|
+
it 'create VBA module' do
|
28
|
+
folder_name = "TempSlidesSDK"
|
29
|
+
file_name = "test.pptx"
|
30
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
31
|
+
|
32
|
+
dto = AsposeSlidesCloud::VbaModule.new
|
33
|
+
dto.name = "Module1"
|
34
|
+
dto.source_code = "Sub Test() MsgBox ""Test"" End Sub"
|
35
|
+
|
36
|
+
reference0 = AsposeSlidesCloud::VbaReference.new
|
37
|
+
reference0.name = "stdole"
|
38
|
+
reference0.lib_id = "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation"
|
39
|
+
reference1 = AsposeSlidesCloud::VbaReference.new
|
40
|
+
reference1.name = "Office"
|
41
|
+
reference1.lib_id = "*\\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.0#0#C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\MSO.DLL#Microsoft Office 14.0 Object Library"
|
42
|
+
dto.references = [reference0, reference1]
|
43
|
+
|
44
|
+
response = AsposeSlidesCloud::SpecUtils.api.create_vba_module(file_name, dto, "password", folder_name)
|
45
|
+
puts "'#{response.name}' has been created \n #{response.self_uri.href}"
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'delete VBA module' do
|
49
|
+
folder_name = "TempSlidesSDK"
|
50
|
+
file_name = "macros.pptm"
|
51
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
52
|
+
|
53
|
+
module_index = 1
|
54
|
+
|
55
|
+
response = AsposeSlidesCloud::SpecUtils.api.delete_vba_module(file_name, module_index, nil, folder_name)
|
56
|
+
puts "VBA project contains: #{response.modules.length} module(s), and #{response.references.length} references"
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'get VBA module' do
|
60
|
+
folder_name = "TempSlidesSDK"
|
61
|
+
file_name = "macros.pptm"
|
62
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
63
|
+
|
64
|
+
module_index = 1
|
65
|
+
|
66
|
+
response = AsposeSlidesCloud::SpecUtils.api.get_vba_module(file_name, module_index, nil, folder_name)
|
67
|
+
puts "#{response.name} \n#{response.source_code}"
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'delete VBA project info' do
|
71
|
+
folder_name = "TempSlidesSDK"
|
72
|
+
file_name = "macros.pptm"
|
73
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
74
|
+
|
75
|
+
module_index = 1
|
76
|
+
|
77
|
+
response = AsposeSlidesCloud::SpecUtils.api.get_vba_project(file_name, nil, folder_name)
|
78
|
+
puts "VBA project contains: #{response.modules.length} module(s), and #{response.references.length} references"
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'update VBA module' do
|
82
|
+
folder_name = "TempSlidesSDK"
|
83
|
+
file_name = "macros.pptm"
|
84
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
85
|
+
|
86
|
+
dto = AsposeSlidesCloud::VbaModule.new
|
87
|
+
dto.source_code = "Sub Test() MsgBox ""Test"" End Sub"
|
88
|
+
module_index = 1
|
89
|
+
|
90
|
+
response = AsposeSlidesCloud::SpecUtils.api.update_vba_module(file_name, module_index, dto, "password", folder_name)
|
91
|
+
puts "'#{response.name}' has been update \n #{response.self_uri.href}"
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
data/testConfig.json
CHANGED