aspose_slides_cloud 23.1.0 → 23.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +14 -0
- data/lib/aspose_slides_cloud/api/slides_api.rb +70 -8
- data/lib/aspose_slides_cloud/models/effect.rb +12 -2
- data/lib/aspose_slides_cloud/models/hyperlink.rb +12 -2
- data/lib/aspose_slides_cloud/models/image_export_options.rb +12 -2
- data/lib/aspose_slides_cloud/models/paragraph.rb +86 -76
- data/lib/aspose_slides_cloud/models/paragraph_format.rb +533 -0
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +2 -2
- data/lib/aspose_slides_cloud/models/text_frame_format.rb +202 -2
- data/lib/aspose_slides_cloud/type_registry.rb +1 -0
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/lib/aspose_slides_cloud.rb +1 -0
- data/spec/api/slides_api_spec.rb +163 -23
- data/spec/use_cases/shape_spec.rb +10 -0
- data/spec/use_cases/text_format_spec.rb +30 -0
- data/testRules.json +2 -0
- metadata +3 -2
@@ -31,6 +31,48 @@ module AsposeSlidesCloud
|
|
31
31
|
# Gets or sets text wrapping shape.
|
32
32
|
attr_accessor :transform
|
33
33
|
|
34
|
+
# Left margin. Left margin.
|
35
|
+
attr_accessor :margin_left
|
36
|
+
|
37
|
+
# Right margin.
|
38
|
+
attr_accessor :margin_right
|
39
|
+
|
40
|
+
# Top margin.
|
41
|
+
attr_accessor :margin_top
|
42
|
+
|
43
|
+
# Bottom margin.
|
44
|
+
attr_accessor :margin_bottom
|
45
|
+
|
46
|
+
# True if text is wrapped at TextFrame's margins.
|
47
|
+
attr_accessor :wrap_text
|
48
|
+
|
49
|
+
# Returns or sets vertical anchor text in a TextFrame.
|
50
|
+
attr_accessor :anchoring_type
|
51
|
+
|
52
|
+
# If True then text should be centered in box horizontally.
|
53
|
+
attr_accessor :center_text
|
54
|
+
|
55
|
+
# Determines text orientation. The resulted value of visual text rotation summarized from this property and custom angle in property RotationAngle.
|
56
|
+
attr_accessor :text_vertical_type
|
57
|
+
|
58
|
+
# Returns or sets text's auto-fit mode.
|
59
|
+
attr_accessor :autofit_type
|
60
|
+
|
61
|
+
# Returns or sets number of columns in the text area. This value must be a positive number. Otherwise, the value will be set to zero. Value 0 means undefined value.
|
62
|
+
attr_accessor :column_count
|
63
|
+
|
64
|
+
# Returns or sets the space between text columns in the text area (in points). This should only apply when there is more than 1 column present. This value must be a positive number. Otherwise, the value will be set to zero.
|
65
|
+
attr_accessor :column_spacing
|
66
|
+
|
67
|
+
# Returns or set keeping text out of 3D scene entirely.
|
68
|
+
attr_accessor :keep_text_flat
|
69
|
+
|
70
|
+
# Specifies the custom rotation that is being applied to the text within the bounding box.
|
71
|
+
attr_accessor :rotation_angle
|
72
|
+
|
73
|
+
# Default portion format.
|
74
|
+
attr_accessor :default_paragraph_format
|
75
|
+
|
34
76
|
class EnumAttributeValidator
|
35
77
|
attr_reader :datatype
|
36
78
|
attr_reader :allowable_values
|
@@ -58,6 +100,20 @@ module AsposeSlidesCloud
|
|
58
100
|
{
|
59
101
|
:'three_d_format' => :'ThreeDFormat',
|
60
102
|
:'transform' => :'Transform',
|
103
|
+
:'margin_left' => :'MarginLeft',
|
104
|
+
:'margin_right' => :'MarginRight',
|
105
|
+
:'margin_top' => :'MarginTop',
|
106
|
+
:'margin_bottom' => :'MarginBottom',
|
107
|
+
:'wrap_text' => :'WrapText',
|
108
|
+
:'anchoring_type' => :'AnchoringType',
|
109
|
+
:'center_text' => :'CenterText',
|
110
|
+
:'text_vertical_type' => :'TextVerticalType',
|
111
|
+
:'autofit_type' => :'AutofitType',
|
112
|
+
:'column_count' => :'ColumnCount',
|
113
|
+
:'column_spacing' => :'ColumnSpacing',
|
114
|
+
:'keep_text_flat' => :'KeepTextFlat',
|
115
|
+
:'rotation_angle' => :'RotationAngle',
|
116
|
+
:'default_paragraph_format' => :'DefaultParagraphFormat',
|
61
117
|
}
|
62
118
|
end
|
63
119
|
|
@@ -66,6 +122,20 @@ module AsposeSlidesCloud
|
|
66
122
|
{
|
67
123
|
:'three_d_format' => :'ThreeDFormat',
|
68
124
|
:'transform' => :'String',
|
125
|
+
:'margin_left' => :'Float',
|
126
|
+
:'margin_right' => :'Float',
|
127
|
+
:'margin_top' => :'Float',
|
128
|
+
:'margin_bottom' => :'Float',
|
129
|
+
:'wrap_text' => :'String',
|
130
|
+
:'anchoring_type' => :'String',
|
131
|
+
:'center_text' => :'String',
|
132
|
+
:'text_vertical_type' => :'String',
|
133
|
+
:'autofit_type' => :'String',
|
134
|
+
:'column_count' => :'Integer',
|
135
|
+
:'column_spacing' => :'Float',
|
136
|
+
:'keep_text_flat' => :'BOOLEAN',
|
137
|
+
:'rotation_angle' => :'Float',
|
138
|
+
:'default_paragraph_format' => :'ParagraphFormat',
|
69
139
|
}
|
70
140
|
end
|
71
141
|
|
@@ -84,6 +154,62 @@ module AsposeSlidesCloud
|
|
84
154
|
if attributes.has_key?(:'Transform')
|
85
155
|
self.transform = attributes[:'Transform']
|
86
156
|
end
|
157
|
+
|
158
|
+
if attributes.has_key?(:'MarginLeft')
|
159
|
+
self.margin_left = attributes[:'MarginLeft']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.has_key?(:'MarginRight')
|
163
|
+
self.margin_right = attributes[:'MarginRight']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.has_key?(:'MarginTop')
|
167
|
+
self.margin_top = attributes[:'MarginTop']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'MarginBottom')
|
171
|
+
self.margin_bottom = attributes[:'MarginBottom']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'WrapText')
|
175
|
+
self.wrap_text = attributes[:'WrapText']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'AnchoringType')
|
179
|
+
self.anchoring_type = attributes[:'AnchoringType']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'CenterText')
|
183
|
+
self.center_text = attributes[:'CenterText']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.has_key?(:'TextVerticalType')
|
187
|
+
self.text_vertical_type = attributes[:'TextVerticalType']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.has_key?(:'AutofitType')
|
191
|
+
self.autofit_type = attributes[:'AutofitType']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'ColumnCount')
|
195
|
+
self.column_count = attributes[:'ColumnCount']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'ColumnSpacing')
|
199
|
+
self.column_spacing = attributes[:'ColumnSpacing']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.has_key?(:'KeepTextFlat')
|
203
|
+
self.keep_text_flat = attributes[:'KeepTextFlat']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.has_key?(:'RotationAngle')
|
207
|
+
self.rotation_angle = attributes[:'RotationAngle']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.has_key?(:'DefaultParagraphFormat')
|
211
|
+
self.default_paragraph_format = attributes[:'DefaultParagraphFormat']
|
212
|
+
end
|
87
213
|
end
|
88
214
|
|
89
215
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -98,6 +224,16 @@ module AsposeSlidesCloud
|
|
98
224
|
def valid?
|
99
225
|
transform_validator = EnumAttributeValidator.new('String', ['None', 'Plain', 'Stop', 'Triangle', 'TriangleInverted', 'Chevron', 'ChevronInverted', 'RingInside', 'RingOutside', 'ArchUp', 'ArchDown', 'Circle', 'Button', 'ArchUpPour', 'ArchDownPour', 'CirclePour', 'ButtonPour', 'CurveUp', 'CurveDown', 'CanUp', 'CanDown', 'Wave1', 'Wave2', 'DoubleWave1', 'Wave4', 'Inflate', 'Deflate', 'InflateBottom', 'DeflateBottom', 'InflateTop', 'DeflateTop', 'DeflateInflate', 'DeflateInflateDeflate', 'FadeRight', 'FadeLeft', 'FadeUp', 'FadeDown', 'SlantUp', 'SlantDown', 'CascadeUp', 'CascadeDown', 'Custom', 'NotDefined'])
|
100
226
|
return false unless transform_validator.valid?(@transform)
|
227
|
+
wrap_text_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
228
|
+
return false unless wrap_text_validator.valid?(@wrap_text)
|
229
|
+
anchoring_type_validator = EnumAttributeValidator.new('String', ['Top', 'Center', 'Bottom', 'Justified', 'Distributed', 'NotDefined'])
|
230
|
+
return false unless anchoring_type_validator.valid?(@anchoring_type)
|
231
|
+
center_text_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
232
|
+
return false unless center_text_validator.valid?(@center_text)
|
233
|
+
text_vertical_type_validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical', 'Vertical270', 'WordArtVertical', 'EastAsianVertical', 'MongolianVertical', 'WordArtVerticalRightToLeft', 'NotDefined'])
|
234
|
+
return false unless text_vertical_type_validator.valid?(@text_vertical_type)
|
235
|
+
autofit_type_validator = EnumAttributeValidator.new('String', ['None', 'Normal', 'Shape', 'NotDefined'])
|
236
|
+
return false unless autofit_type_validator.valid?(@autofit_type)
|
101
237
|
true
|
102
238
|
end
|
103
239
|
|
@@ -111,13 +247,77 @@ module AsposeSlidesCloud
|
|
111
247
|
@transform = transform
|
112
248
|
end
|
113
249
|
|
250
|
+
# Custom attribute writer method checking allowed values (enum).
|
251
|
+
# @param [Object] wrap_text Object to be assigned
|
252
|
+
def wrap_text=(wrap_text)
|
253
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
254
|
+
unless validator.valid?(wrap_text)
|
255
|
+
fail ArgumentError, 'invalid value for "wrap_text", must be one of #{validator.allowable_values}.'
|
256
|
+
end
|
257
|
+
@wrap_text = wrap_text
|
258
|
+
end
|
259
|
+
|
260
|
+
# Custom attribute writer method checking allowed values (enum).
|
261
|
+
# @param [Object] anchoring_type Object to be assigned
|
262
|
+
def anchoring_type=(anchoring_type)
|
263
|
+
validator = EnumAttributeValidator.new('String', ['Top', 'Center', 'Bottom', 'Justified', 'Distributed', 'NotDefined'])
|
264
|
+
unless validator.valid?(anchoring_type)
|
265
|
+
fail ArgumentError, 'invalid value for "anchoring_type", must be one of #{validator.allowable_values}.'
|
266
|
+
end
|
267
|
+
@anchoring_type = anchoring_type
|
268
|
+
end
|
269
|
+
|
270
|
+
# Custom attribute writer method checking allowed values (enum).
|
271
|
+
# @param [Object] center_text Object to be assigned
|
272
|
+
def center_text=(center_text)
|
273
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
274
|
+
unless validator.valid?(center_text)
|
275
|
+
fail ArgumentError, 'invalid value for "center_text", must be one of #{validator.allowable_values}.'
|
276
|
+
end
|
277
|
+
@center_text = center_text
|
278
|
+
end
|
279
|
+
|
280
|
+
# Custom attribute writer method checking allowed values (enum).
|
281
|
+
# @param [Object] text_vertical_type Object to be assigned
|
282
|
+
def text_vertical_type=(text_vertical_type)
|
283
|
+
validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical', 'Vertical270', 'WordArtVertical', 'EastAsianVertical', 'MongolianVertical', 'WordArtVerticalRightToLeft', 'NotDefined'])
|
284
|
+
unless validator.valid?(text_vertical_type)
|
285
|
+
fail ArgumentError, 'invalid value for "text_vertical_type", must be one of #{validator.allowable_values}.'
|
286
|
+
end
|
287
|
+
@text_vertical_type = text_vertical_type
|
288
|
+
end
|
289
|
+
|
290
|
+
# Custom attribute writer method checking allowed values (enum).
|
291
|
+
# @param [Object] autofit_type Object to be assigned
|
292
|
+
def autofit_type=(autofit_type)
|
293
|
+
validator = EnumAttributeValidator.new('String', ['None', 'Normal', 'Shape', 'NotDefined'])
|
294
|
+
unless validator.valid?(autofit_type)
|
295
|
+
fail ArgumentError, 'invalid value for "autofit_type", must be one of #{validator.allowable_values}.'
|
296
|
+
end
|
297
|
+
@autofit_type = autofit_type
|
298
|
+
end
|
299
|
+
|
114
300
|
# Checks equality by comparing each attribute.
|
115
301
|
# @param [Object] Object to be compared
|
116
302
|
def ==(o)
|
117
303
|
return true if self.equal?(o)
|
118
304
|
self.class == o.class &&
|
119
305
|
three_d_format == o.three_d_format &&
|
120
|
-
transform == o.transform
|
306
|
+
transform == o.transform &&
|
307
|
+
margin_left == o.margin_left &&
|
308
|
+
margin_right == o.margin_right &&
|
309
|
+
margin_top == o.margin_top &&
|
310
|
+
margin_bottom == o.margin_bottom &&
|
311
|
+
wrap_text == o.wrap_text &&
|
312
|
+
anchoring_type == o.anchoring_type &&
|
313
|
+
center_text == o.center_text &&
|
314
|
+
text_vertical_type == o.text_vertical_type &&
|
315
|
+
autofit_type == o.autofit_type &&
|
316
|
+
column_count == o.column_count &&
|
317
|
+
column_spacing == o.column_spacing &&
|
318
|
+
keep_text_flat == o.keep_text_flat &&
|
319
|
+
rotation_angle == o.rotation_angle &&
|
320
|
+
default_paragraph_format == o.default_paragraph_format
|
121
321
|
end
|
122
322
|
|
123
323
|
# @see the `==` method
|
@@ -129,7 +329,7 @@ module AsposeSlidesCloud
|
|
129
329
|
# Calculates hash code according to all attributes.
|
130
330
|
# @return [Fixnum] Hash code
|
131
331
|
def hash
|
132
|
-
[three_d_format, transform].hash
|
332
|
+
[three_d_format, transform, margin_left, margin_right, margin_top, margin_bottom, wrap_text, anchoring_type, center_text, text_vertical_type, autofit_type, column_count, column_spacing, keep_text_flat, rotation_angle, default_paragraph_format].hash
|
133
333
|
end
|
134
334
|
|
135
335
|
# Builds the object from hash
|
@@ -374,6 +374,7 @@ module AsposeSlidesCloud
|
|
374
374
|
:'OuterShadowEffect' => { },
|
375
375
|
:'OutputFile' => { },
|
376
376
|
:'Paragraph' => { },
|
377
|
+
:'ParagraphFormat' => { },
|
377
378
|
:'Paragraphs' => { },
|
378
379
|
:'PathInputFile' => { :'Type' => 'Path', },
|
379
380
|
:'PathOutputFile' => { :'Type' => 'Path', },
|
data/lib/aspose_slides_cloud.rb
CHANGED
@@ -174,6 +174,7 @@ require 'aspose_slides_cloud/models/ordered_merge_request'
|
|
174
174
|
require 'aspose_slides_cloud/models/outer_shadow_effect'
|
175
175
|
require 'aspose_slides_cloud/models/output_file'
|
176
176
|
require 'aspose_slides_cloud/models/paragraph'
|
177
|
+
require 'aspose_slides_cloud/models/paragraph_format'
|
177
178
|
require 'aspose_slides_cloud/models/paragraphs'
|
178
179
|
require 'aspose_slides_cloud/models/path_input_file'
|
179
180
|
require 'aspose_slides_cloud/models/path_output_file'
|