aspose_slides_cloud 23.3.0 → 23.4.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.
@@ -79,6 +79,12 @@ module AsposeSlidesCloud
79
79
  # Cell row index
80
80
  attr_accessor :row_index
81
81
 
82
+ # Returns TextFrame's formatting properties.
83
+ attr_accessor :text_frame_format
84
+
85
+ # Get or sets list to paragraphs list
86
+ attr_accessor :paragraphs
87
+
82
88
  class EnumAttributeValidator
83
89
  attr_reader :datatype
84
90
  attr_reader :allowable_values
@@ -122,6 +128,8 @@ module AsposeSlidesCloud
122
128
  :'border_diagonal_down' => :'BorderDiagonalDown',
123
129
  :'column_index' => :'ColumnIndex',
124
130
  :'row_index' => :'RowIndex',
131
+ :'text_frame_format' => :'TextFrameFormat',
132
+ :'paragraphs' => :'Paragraphs',
125
133
  }
126
134
  end
127
135
 
@@ -146,6 +154,8 @@ module AsposeSlidesCloud
146
154
  :'border_diagonal_down' => :'LineFormat',
147
155
  :'column_index' => :'Integer',
148
156
  :'row_index' => :'Integer',
157
+ :'text_frame_format' => :'TextFrameFormat',
158
+ :'paragraphs' => :'ResourceUri',
149
159
  }
150
160
  end
151
161
 
@@ -228,6 +238,14 @@ module AsposeSlidesCloud
228
238
  if attributes.has_key?(:'RowIndex')
229
239
  self.row_index = attributes[:'RowIndex']
230
240
  end
241
+
242
+ if attributes.has_key?(:'TextFrameFormat')
243
+ self.text_frame_format = attributes[:'TextFrameFormat']
244
+ end
245
+
246
+ if attributes.has_key?(:'Paragraphs')
247
+ self.paragraphs = attributes[:'Paragraphs']
248
+ end
231
249
  end
232
250
 
233
251
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -289,7 +307,9 @@ module AsposeSlidesCloud
289
307
  border_diagonal_up == o.border_diagonal_up &&
290
308
  border_diagonal_down == o.border_diagonal_down &&
291
309
  column_index == o.column_index &&
292
- row_index == o.row_index
310
+ row_index == o.row_index &&
311
+ text_frame_format == o.text_frame_format &&
312
+ paragraphs == o.paragraphs
293
313
  end
294
314
 
295
315
  # @see the `==` method
@@ -301,7 +321,7 @@ module AsposeSlidesCloud
301
321
  # Calculates hash code according to all attributes.
302
322
  # @return [Fixnum] Hash code
303
323
  def hash
304
- [text, row_span, col_span, margin_top, margin_right, margin_left, margin_bottom, text_anchor_type, text_vertical_type, fill_format, border_top, border_right, border_left, border_bottom, border_diagonal_up, border_diagonal_down, column_index, row_index].hash
324
+ [text, row_span, col_span, margin_top, margin_right, margin_left, margin_bottom, text_anchor_type, text_vertical_type, fill_format, border_top, border_right, border_left, border_bottom, border_diagonal_up, border_diagonal_down, column_index, row_index, text_frame_format, paragraphs].hash
305
325
  end
306
326
 
307
327
  # Builds the object from hash
@@ -0,0 +1,280 @@
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
+ # Table cells merge options
27
+ class TableCellMergeOptions
28
+ # Row index of the first cell
29
+ attr_accessor :first_row_index
30
+
31
+ # First cell index in the row
32
+ attr_accessor :first_cell_index
33
+
34
+ # Row index of the last cell
35
+ attr_accessor :last_row_index
36
+
37
+ # Last cell index in the row
38
+ attr_accessor :last_cell_index
39
+
40
+ # Allow splitting
41
+ attr_accessor :allow_splitting
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'first_row_index' => :'FirstRowIndex',
47
+ :'first_cell_index' => :'FirstCellIndex',
48
+ :'last_row_index' => :'LastRowIndex',
49
+ :'last_cell_index' => :'LastCellIndex',
50
+ :'allow_splitting' => :'AllowSplitting',
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'first_row_index' => :'Integer',
58
+ :'first_cell_index' => :'Integer',
59
+ :'last_row_index' => :'Integer',
60
+ :'last_cell_index' => :'Integer',
61
+ :'allow_splitting' => :'BOOLEAN',
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ return unless attributes.is_a?(Hash)
69
+
70
+ # convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
72
+
73
+ if attributes.has_key?(:'FirstRowIndex')
74
+ self.first_row_index = attributes[:'FirstRowIndex']
75
+ end
76
+
77
+ if attributes.has_key?(:'FirstCellIndex')
78
+ self.first_cell_index = attributes[:'FirstCellIndex']
79
+ end
80
+
81
+ if attributes.has_key?(:'LastRowIndex')
82
+ self.last_row_index = attributes[:'LastRowIndex']
83
+ end
84
+
85
+ if attributes.has_key?(:'LastCellIndex')
86
+ self.last_cell_index = attributes[:'LastCellIndex']
87
+ end
88
+
89
+ if attributes.has_key?(:'AllowSplitting')
90
+ self.allow_splitting = attributes[:'AllowSplitting']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ invalid_properties = Array.new
98
+ if @first_row_index.nil?
99
+ invalid_properties.push('invalid value for "first_row_index", first_row_index cannot be nil.')
100
+ end
101
+
102
+ if @first_cell_index.nil?
103
+ invalid_properties.push('invalid value for "first_cell_index", first_cell_index cannot be nil.')
104
+ end
105
+
106
+ if @last_row_index.nil?
107
+ invalid_properties.push('invalid value for "last_row_index", last_row_index cannot be nil.')
108
+ end
109
+
110
+ if @last_cell_index.nil?
111
+ invalid_properties.push('invalid value for "last_cell_index", last_cell_index cannot be nil.')
112
+ end
113
+
114
+ if @allow_splitting.nil?
115
+ invalid_properties.push('invalid value for "allow_splitting", allow_splitting cannot be nil.')
116
+ end
117
+
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ return false if @first_row_index.nil?
125
+ return false if @first_cell_index.nil?
126
+ return false if @last_row_index.nil?
127
+ return false if @last_cell_index.nil?
128
+ return false if @allow_splitting.nil?
129
+ true
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param [Object] Object to be compared
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ first_row_index == o.first_row_index &&
138
+ first_cell_index == o.first_cell_index &&
139
+ last_row_index == o.last_row_index &&
140
+ last_cell_index == o.last_cell_index &&
141
+ allow_splitting == o.allow_splitting
142
+ end
143
+
144
+ # @see the `==` method
145
+ # @param [Object] Object to be compared
146
+ def eql?(o)
147
+ self == o
148
+ end
149
+
150
+ # Calculates hash code according to all attributes.
151
+ # @return [Fixnum] Hash code
152
+ def hash
153
+ [first_row_index, first_cell_index, last_row_index, last_cell_index, allow_splitting].hash
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ self.class.swagger_types.each_pair do |key, type|
162
+ mapKey = self.class.attribute_map[key]
163
+ if !mapKey.nil?
164
+ val = attributes[mapKey]
165
+ if val.nil?
166
+ mapKeyString = mapKey.to_s
167
+ mapKeyString[0] = mapKeyString[0].downcase
168
+ mapKey = mapKeyString.to_sym
169
+ val = attributes[mapKey]
170
+ end
171
+ if !val.nil?
172
+ if type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the the attribute
174
+ # is documented as an array but the input is not
175
+ if val.is_a?(Array)
176
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
177
+ end
178
+ else
179
+ self.send("#{key}=", _deserialize(type, val))
180
+ end
181
+ end
182
+ end
183
+ end
184
+
185
+ self
186
+ end
187
+
188
+ # Deserializes the data based on type
189
+ # @param string type Data type
190
+ # @param string value Value to be deserialized
191
+ # @return [Object] Deserialized data
192
+ def _deserialize(type, value)
193
+ if value.nil?
194
+ nil
195
+ else
196
+ case type.to_sym
197
+ when :DateTime
198
+ DateTime.parse(value)
199
+ when :Date
200
+ Date.parse(value)
201
+ when :String
202
+ value.to_s
203
+ when :Integer
204
+ value.to_i
205
+ when :Float
206
+ value.to_f
207
+ when :BOOLEAN
208
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
+ true
210
+ else
211
+ false
212
+ end
213
+ when :Object
214
+ # generic object (usually a Hash), return directly
215
+ value
216
+ when /\AArray<(?<inner_type>.+)>\z/
217
+ inner_type = Regexp.last_match[:inner_type]
218
+ value.map { |v| _deserialize(inner_type, v) }
219
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
+ k_type = Regexp.last_match[:k_type]
221
+ v_type = Regexp.last_match[:v_type]
222
+ {}.tap do |hash|
223
+ value.each do |k, v|
224
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
+ end
226
+ end
227
+ else # model
228
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
229
+ if registry_type
230
+ type = registry_type
231
+ end
232
+ temp_model = AsposeSlidesCloud.const_get(type).new
233
+ temp_model.build_from_hash(value)
234
+ end
235
+ end
236
+ end
237
+
238
+ # Returns the string representation of the object
239
+ # @return [String] String presentation of the object
240
+ def to_s
241
+ to_hash.to_s
242
+ end
243
+
244
+ # to_body is an alias to to_hash (backward compatibility)
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_body
247
+ to_hash
248
+ end
249
+
250
+ # Returns the object in the form of hash
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ next if value.nil?
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map { |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+ end
280
+ end
@@ -0,0 +1,42 @@
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
+ class TableCellSplitType
27
+
28
+ SPLIT_BY_WIDTH = 'SplitByWidth'.freeze
29
+ SPLIT_BY_HEIGHT = 'SplitByHeight'.freeze
30
+ SPLIT_BY_COL_SPAN = 'SplitByColSpan'.freeze
31
+ SPLIT_BY_ROW_SPAN = 'SplitByRowSpan'.freeze
32
+
33
+ # Builds the enum from string
34
+ # @param [String] The enum value in the form of the string
35
+ # @return [String] The enum value
36
+ def build_from_hash(value)
37
+ constantValues = TableCellSplitType.constants.select { |c| TableCellSplitType::const_get(c) == value }
38
+ raise "Invalid ENUM value #{value} for class #TableCellSplitType" if constantValues.empty?
39
+ value
40
+ end
41
+ end
42
+ end
@@ -451,6 +451,8 @@ module AsposeSlidesCloud
451
451
  :'SwfExportOptions' => { :'Format' => 'swf', },
452
452
  :'Table' => { :'Type' => 'Table', },
453
453
  :'TableCell' => { },
454
+ :'TableCellMergeOptions' => { },
455
+ :'TableCellSplitType' => { },
454
456
  :'TableColumn' => { },
455
457
  :'TableRow' => { },
456
458
  :'TextBounds' => { },
@@ -21,5 +21,5 @@ SOFTWARE.
21
21
  =end
22
22
 
23
23
  module AsposeSlidesCloud
24
- VERSION = '23.3.0'
24
+ VERSION = '23.4.0'
25
25
  end
@@ -251,6 +251,8 @@ require 'aspose_slides_cloud/models/svg_export_options'
251
251
  require 'aspose_slides_cloud/models/swf_export_options'
252
252
  require 'aspose_slides_cloud/models/table'
253
253
  require 'aspose_slides_cloud/models/table_cell'
254
+ require 'aspose_slides_cloud/models/table_cell_merge_options'
255
+ require 'aspose_slides_cloud/models/table_cell_split_type'
254
256
  require 'aspose_slides_cloud/models/table_column'
255
257
  require 'aspose_slides_cloud/models/table_row'
256
258
  require 'aspose_slides_cloud/models/text_bounds'