aspose_slides_cloud 22.2.0 → 22.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/TestData/test.pptx +0 -0
  3. data/lib/aspose_slides_cloud/api/slides_api.rb +192 -13
  4. data/lib/aspose_slides_cloud/models/axis.rb +22 -2
  5. data/lib/aspose_slides_cloud/models/chart_lines_format.rb +221 -0
  6. data/lib/aspose_slides_cloud/models/export_options.rb +13 -1
  7. data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +243 -0
  8. data/lib/aspose_slides_cloud/models/gif_export_options.rb +2 -1
  9. data/lib/aspose_slides_cloud/models/html5_export_options.rb +2 -1
  10. data/lib/aspose_slides_cloud/models/html_export_options.rb +2 -1
  11. data/lib/aspose_slides_cloud/models/image_export_options.rb +2 -1
  12. data/lib/aspose_slides_cloud/models/legend.rb +12 -2
  13. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +2 -1
  14. data/lib/aspose_slides_cloud/models/portion.rb +32 -2
  15. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +2 -1
  16. data/lib/aspose_slides_cloud/models/shape_type.rb +54 -0
  17. data/lib/aspose_slides_cloud/models/slide_comment.rb +32 -48
  18. data/lib/aspose_slides_cloud/models/slide_comment_base.rb +286 -0
  19. data/lib/aspose_slides_cloud/models/slide_comments.rb +1 -1
  20. data/lib/aspose_slides_cloud/models/slide_modern_comment.rb +269 -0
  21. data/lib/aspose_slides_cloud/models/svg_export_options.rb +2 -1
  22. data/lib/aspose_slides_cloud/models/swf_export_options.rb +2 -1
  23. data/lib/aspose_slides_cloud/models/text_bounds.rb +261 -0
  24. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +2 -1
  25. data/lib/aspose_slides_cloud/models/video_export_options.rb +2 -1
  26. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +2 -1
  27. data/lib/aspose_slides_cloud/models/xps_export_options.rb +2 -1
  28. data/lib/aspose_slides_cloud/models/zoom_object.rb +1 -0
  29. data/lib/aspose_slides_cloud/type_registry.rb +9 -1
  30. data/lib/aspose_slides_cloud/version.rb +1 -1
  31. data/lib/aspose_slides_cloud.rb +7 -1
  32. data/spec/api/slides_api_spec.rb +585 -33
  33. data/spec/use_cases/merge_spec.rb +0 -1
  34. data/spec/use_cases/shape_spec.rb +0 -2
  35. data/testRules.json +5 -3
  36. metadata +8 -2
@@ -292,6 +292,7 @@ module AsposeSlidesCloud
292
292
  default_regular_font == o.default_regular_font &&
293
293
  height == o.height &&
294
294
  width == o.width &&
295
+ font_fallback_rules == o.font_fallback_rules &&
295
296
  format == o.format &&
296
297
  show_hidden_slides == o.show_hidden_slides &&
297
298
  compressed == o.compressed &&
@@ -324,7 +325,7 @@ module AsposeSlidesCloud
324
325
  # Calculates hash code according to all attributes.
325
326
  # @return [Fixnum] Hash code
326
327
  def hash
327
- [default_regular_font, height, width, format, show_hidden_slides, compressed, viewer_included, show_page_border, show_full_screen, show_page_stepper, show_search, show_top_pane, show_bottom_pane, show_left_pane, start_open_left_pane, enable_context_menu, logo_image, logo_link, jpeg_quality, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
328
+ [default_regular_font, height, width, font_fallback_rules, format, show_hidden_slides, compressed, viewer_included, show_page_border, show_full_screen, show_page_stepper, show_search, show_top_pane, show_bottom_pane, show_left_pane, start_open_left_pane, enable_context_menu, logo_image, logo_link, jpeg_quality, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
328
329
  end
329
330
 
330
331
  # Builds the object from hash
@@ -0,0 +1,261 @@
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 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Represents text bounds within a paragraph or portion.
27
+ class TextBounds
28
+ # X coordinate of the text bounds.
29
+ attr_accessor :x
30
+
31
+ # X coordinate of the text bounds.
32
+ attr_accessor :y
33
+
34
+ # Width of the text bounds.
35
+ attr_accessor :width
36
+
37
+ # Height of the text bounds.
38
+ attr_accessor :height
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'x' => :'X',
44
+ :'y' => :'Y',
45
+ :'width' => :'Width',
46
+ :'height' => :'Height',
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'x' => :'Float',
54
+ :'y' => :'Float',
55
+ :'width' => :'Float',
56
+ :'height' => :'Float',
57
+ }
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ return unless attributes.is_a?(Hash)
64
+
65
+ # convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
67
+
68
+ if attributes.has_key?(:'X')
69
+ self.x = attributes[:'X']
70
+ end
71
+
72
+ if attributes.has_key?(:'Y')
73
+ self.y = attributes[:'Y']
74
+ end
75
+
76
+ if attributes.has_key?(:'Width')
77
+ self.width = attributes[:'Width']
78
+ end
79
+
80
+ if attributes.has_key?(:'Height')
81
+ self.height = attributes[:'Height']
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ if @x.nil?
90
+ invalid_properties.push('invalid value for "x", x cannot be nil.')
91
+ end
92
+
93
+ if @y.nil?
94
+ invalid_properties.push('invalid value for "y", y cannot be nil.')
95
+ end
96
+
97
+ if @width.nil?
98
+ invalid_properties.push('invalid value for "width", width cannot be nil.')
99
+ end
100
+
101
+ if @height.nil?
102
+ invalid_properties.push('invalid value for "height", height cannot be nil.')
103
+ end
104
+
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ return false if @x.nil?
112
+ return false if @y.nil?
113
+ return false if @width.nil?
114
+ return false if @height.nil?
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ x == o.x &&
124
+ y == o.y &&
125
+ width == o.width &&
126
+ height == o.height
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Fixnum] Hash code
137
+ def hash
138
+ [x, y, width, height].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ self.class.swagger_types.each_pair do |key, type|
147
+ mapKey = self.class.attribute_map[key]
148
+ if !mapKey.nil?
149
+ val = attributes[mapKey]
150
+ if val.nil?
151
+ mapKeyString = mapKey.to_s
152
+ mapKeyString[0] = mapKeyString[0].downcase
153
+ mapKey = mapKeyString.to_sym
154
+ val = attributes[mapKey]
155
+ end
156
+ if !val.nil?
157
+ if type =~ /\AArray<(.*)>/i
158
+ # check to ensure the input is an array given that the the attribute
159
+ # is documented as an array but the input is not
160
+ if val.is_a?(Array)
161
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
162
+ end
163
+ else
164
+ self.send("#{key}=", _deserialize(type, val))
165
+ end
166
+ end
167
+ end
168
+ end
169
+
170
+ self
171
+ end
172
+
173
+ # Deserializes the data based on type
174
+ # @param string type Data type
175
+ # @param string value Value to be deserialized
176
+ # @return [Object] Deserialized data
177
+ def _deserialize(type, value)
178
+ case type.to_sym
179
+ when :DateTime
180
+ DateTime.parse(value)
181
+ when :Date
182
+ Date.parse(value)
183
+ when :String
184
+ value.to_s
185
+ when :Integer
186
+ value.to_i
187
+ when :Float
188
+ value.to_f
189
+ when :BOOLEAN
190
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
191
+ true
192
+ else
193
+ false
194
+ end
195
+ when :Object
196
+ # generic object (usually a Hash), return directly
197
+ value
198
+ when /\AArray<(?<inner_type>.+)>\z/
199
+ inner_type = Regexp.last_match[:inner_type]
200
+ value.map { |v| _deserialize(inner_type, v) }
201
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
202
+ k_type = Regexp.last_match[:k_type]
203
+ v_type = Regexp.last_match[:v_type]
204
+ {}.tap do |hash|
205
+ value.each do |k, v|
206
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
207
+ end
208
+ end
209
+ else # model
210
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
211
+ if registry_type
212
+ type = registry_type
213
+ end
214
+ temp_model = AsposeSlidesCloud.const_get(type).new
215
+ temp_model.build_from_hash(value)
216
+ end
217
+ end
218
+
219
+ # Returns the string representation of the object
220
+ # @return [String] String presentation of the object
221
+ def to_s
222
+ to_hash.to_s
223
+ end
224
+
225
+ # to_body is an alias to to_hash (backward compatibility)
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_body
228
+ to_hash
229
+ end
230
+
231
+ # Returns the object in the form of hash
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_hash
234
+ hash = {}
235
+ self.class.attribute_map.each_pair do |attr, param|
236
+ value = self.send(attr)
237
+ next if value.nil?
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+ end
261
+ end
@@ -226,6 +226,7 @@ module AsposeSlidesCloud
226
226
  default_regular_font == o.default_regular_font &&
227
227
  height == o.height &&
228
228
  width == o.width &&
229
+ font_fallback_rules == o.font_fallback_rules &&
229
230
  format == o.format &&
230
231
  compression == o.compression &&
231
232
  dpi_x == o.dpi_x &&
@@ -248,7 +249,7 @@ module AsposeSlidesCloud
248
249
  # Calculates hash code according to all attributes.
249
250
  # @return [Fixnum] Hash code
250
251
  def hash
251
- [default_regular_font, height, width, format, compression, dpi_x, dpi_y, show_hidden_slides, pixel_format, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
252
+ [default_regular_font, height, width, font_fallback_rules, format, compression, dpi_x, dpi_y, show_hidden_slides, pixel_format, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
252
253
  end
253
254
 
254
255
  # Builds the object from hash
@@ -118,6 +118,7 @@ module AsposeSlidesCloud
118
118
  default_regular_font == o.default_regular_font &&
119
119
  height == o.height &&
120
120
  width == o.width &&
121
+ font_fallback_rules == o.font_fallback_rules &&
121
122
  format == o.format &&
122
123
  transition_duration == o.transition_duration &&
123
124
  video_resolution_type == o.video_resolution_type
@@ -132,7 +133,7 @@ module AsposeSlidesCloud
132
133
  # Calculates hash code according to all attributes.
133
134
  # @return [Fixnum] Hash code
134
135
  def hash
135
- [default_regular_font, height, width, format, transition_duration, video_resolution_type].hash
136
+ [default_regular_font, height, width, font_fallback_rules, format, transition_duration, video_resolution_type].hash
136
137
  end
137
138
 
138
139
  # Builds the object from hash
@@ -75,6 +75,7 @@ module AsposeSlidesCloud
75
75
  default_regular_font == o.default_regular_font &&
76
76
  height == o.height &&
77
77
  width == o.width &&
78
+ font_fallback_rules == o.font_fallback_rules &&
78
79
  format == o.format &&
79
80
  export_hidden_slides == o.export_hidden_slides
80
81
  end
@@ -88,7 +89,7 @@ module AsposeSlidesCloud
88
89
  # Calculates hash code according to all attributes.
89
90
  # @return [Fixnum] Hash code
90
91
  def hash
91
- [default_regular_font, height, width, format, export_hidden_slides].hash
92
+ [default_regular_font, height, width, font_fallback_rules, format, export_hidden_slides].hash
92
93
  end
93
94
 
94
95
  # Builds the object from hash
@@ -93,6 +93,7 @@ module AsposeSlidesCloud
93
93
  default_regular_font == o.default_regular_font &&
94
94
  height == o.height &&
95
95
  width == o.width &&
96
+ font_fallback_rules == o.font_fallback_rules &&
96
97
  format == o.format &&
97
98
  show_hidden_slides == o.show_hidden_slides &&
98
99
  save_metafiles_as_png == o.save_metafiles_as_png &&
@@ -108,7 +109,7 @@ module AsposeSlidesCloud
108
109
  # Calculates hash code according to all attributes.
109
110
  # @return [Fixnum] Hash code
110
111
  def hash
111
- [default_regular_font, height, width, format, show_hidden_slides, save_metafiles_as_png, draw_slides_frame].hash
112
+ [default_regular_font, height, width, font_fallback_rules, format, show_hidden_slides, save_metafiles_as_png, draw_slides_frame].hash
112
113
  end
113
114
 
114
115
  # Builds the object from hash
@@ -23,6 +23,7 @@ SOFTWARE.
23
23
  require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
+ # Zoom object.
26
27
  class ZoomObject < ShapeBase
27
28
  # Image type of a zoom object.
28
29
  attr_accessor :image_type
@@ -154,7 +154,9 @@ module AsposeSlidesCloud
154
154
  :'Slide' => :'ResourceBase',
155
155
  :'SlideAnimation' => :'ResourceBase',
156
156
  :'SlideBackground' => :'ResourceBase',
157
+ :'SlideComment' => :'SlideCommentBase',
157
158
  :'SlideComments' => :'ResourceBase',
159
+ :'SlideModernComment' => :'SlideCommentBase',
158
160
  :'SlideProperties' => :'ResourceBase',
159
161
  :'Slides' => :'ResourceBase',
160
162
  :'SolidFill' => :'FillFormat',
@@ -213,6 +215,7 @@ module AsposeSlidesCloud
213
215
  :'BlurEffect' => { },
214
216
  :'Camera' => { },
215
217
  :'ChartCategory' => { },
218
+ :'ChartLinesFormat' => { },
216
219
  :'ChartTitle' => { },
217
220
  :'ChartWall' => { },
218
221
  :'CommonSlideViewProperties' => { },
@@ -231,6 +234,7 @@ module AsposeSlidesCloud
231
234
  :'FilesUploadResult' => { },
232
235
  :'FillFormat' => { },
233
236
  :'FillOverlayEffect' => { },
237
+ :'FontFallbackRule' => { },
234
238
  :'FontSet' => { },
235
239
  :'GeometryPath' => { },
236
240
  :'GeometryPaths' => { },
@@ -270,8 +274,9 @@ module AsposeSlidesCloud
270
274
  :'ShapeExportFormat' => { },
271
275
  :'ShapeImageExportOptions' => { },
272
276
  :'ShapeThumbnailBounds' => { },
277
+ :'ShapeType' => { },
273
278
  :'ShapesAlignmentType' => { },
274
- :'SlideComment' => { },
279
+ :'SlideCommentBase' => { },
275
280
  :'SlideExportFormat' => { },
276
281
  :'SmartArtNode' => { },
277
282
  :'SoftEdgeEffect' => { },
@@ -282,6 +287,7 @@ module AsposeSlidesCloud
282
287
  :'TableColumn' => { },
283
288
  :'TableRow' => { },
284
289
  :'Task' => { },
290
+ :'TextBounds' => { },
285
291
  :'TextFrameFormat' => { },
286
292
  :'TextItem' => { },
287
293
  :'ThreeDFormat' => { },
@@ -368,7 +374,9 @@ module AsposeSlidesCloud
368
374
  :'Slide' => { },
369
375
  :'SlideAnimation' => { },
370
376
  :'SlideBackground' => { },
377
+ :'SlideComment' => { :'Type' => "Regular", },
371
378
  :'SlideComments' => { },
379
+ :'SlideModernComment' => { :'Type' => "Modern", },
372
380
  :'SlideProperties' => { },
373
381
  :'Slides' => { },
374
382
  :'SolidFill' => { :'Type' => "Solid", },
@@ -21,5 +21,5 @@ SOFTWARE.
21
21
  =end
22
22
 
23
23
  module AsposeSlidesCloud
24
- VERSION = '22.2.0'
24
+ VERSION = '22.3.0'
25
25
  end
@@ -35,6 +35,7 @@ require 'aspose_slides_cloud/models/axis'
35
35
  require 'aspose_slides_cloud/models/blur_effect'
36
36
  require 'aspose_slides_cloud/models/camera'
37
37
  require 'aspose_slides_cloud/models/chart_category'
38
+ require 'aspose_slides_cloud/models/chart_lines_format'
38
39
  require 'aspose_slides_cloud/models/chart_title'
39
40
  require 'aspose_slides_cloud/models/chart_wall'
40
41
  require 'aspose_slides_cloud/models/common_slide_view_properties'
@@ -53,6 +54,7 @@ require 'aspose_slides_cloud/models/files_list'
53
54
  require 'aspose_slides_cloud/models/files_upload_result'
54
55
  require 'aspose_slides_cloud/models/fill_format'
55
56
  require 'aspose_slides_cloud/models/fill_overlay_effect'
57
+ require 'aspose_slides_cloud/models/font_fallback_rule'
56
58
  require 'aspose_slides_cloud/models/font_set'
57
59
  require 'aspose_slides_cloud/models/geometry_path'
58
60
  require 'aspose_slides_cloud/models/geometry_paths'
@@ -92,8 +94,9 @@ require 'aspose_slides_cloud/models/shape_bevel'
92
94
  require 'aspose_slides_cloud/models/shape_export_format'
93
95
  require 'aspose_slides_cloud/models/shape_image_export_options'
94
96
  require 'aspose_slides_cloud/models/shape_thumbnail_bounds'
97
+ require 'aspose_slides_cloud/models/shape_type'
95
98
  require 'aspose_slides_cloud/models/shapes_alignment_type'
96
- require 'aspose_slides_cloud/models/slide_comment'
99
+ require 'aspose_slides_cloud/models/slide_comment_base'
97
100
  require 'aspose_slides_cloud/models/slide_export_format'
98
101
  require 'aspose_slides_cloud/models/smart_art_node'
99
102
  require 'aspose_slides_cloud/models/soft_edge_effect'
@@ -104,6 +107,7 @@ require 'aspose_slides_cloud/models/table_cell'
104
107
  require 'aspose_slides_cloud/models/table_column'
105
108
  require 'aspose_slides_cloud/models/table_row'
106
109
  require 'aspose_slides_cloud/models/task'
110
+ require 'aspose_slides_cloud/models/text_bounds'
107
111
  require 'aspose_slides_cloud/models/text_frame_format'
108
112
  require 'aspose_slides_cloud/models/text_item'
109
113
  require 'aspose_slides_cloud/models/three_d_format'
@@ -190,7 +194,9 @@ require 'aspose_slides_cloud/models/shapes'
190
194
  require 'aspose_slides_cloud/models/slide'
191
195
  require 'aspose_slides_cloud/models/slide_animation'
192
196
  require 'aspose_slides_cloud/models/slide_background'
197
+ require 'aspose_slides_cloud/models/slide_comment'
193
198
  require 'aspose_slides_cloud/models/slide_comments'
199
+ require 'aspose_slides_cloud/models/slide_modern_comment'
194
200
  require 'aspose_slides_cloud/models/slide_properties'
195
201
  require 'aspose_slides_cloud/models/slides'
196
202
  require 'aspose_slides_cloud/models/solid_fill'