aspose_words_cloud 25.4 → 25.6
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/lib/aspose_words_cloud/models/azw3_save_options_data.rb +14 -1
- data/lib/aspose_words_cloud/models/comment_range_end.rb +231 -0
- data/lib/aspose_words_cloud/models/comment_range_start.rb +231 -0
- data/lib/aspose_words_cloud/models/epub_save_options_data.rb +14 -1
- data/lib/aspose_words_cloud/models/form_field_checkbox_link.rb +218 -0
- data/lib/aspose_words_cloud/models/form_field_drop_down_link.rb +218 -0
- data/lib/aspose_words_cloud/models/form_field_text_input_link.rb +218 -0
- data/lib/aspose_words_cloud/models/html_save_options_data.rb +14 -1
- data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +14 -1
- data/lib/aspose_words_cloud/version.rb +1 -1
- data/lib/aspose_words_cloud.rb +5 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 118158e016f08e1baa8f799e5b7f6c9b26303d280765b57acbb9672418f6a0d6
|
4
|
+
data.tar.gz: 5f6a624cde6aa977aec1934870e8d7c998fb9f0cd3c1d753a6112c3f6b3bfb99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27667eb75b5229eb6c46a5397c70366f6dc3e162d266d9c66df5db87d0e3552202627c15a7a490c948b90d721ce7ea740dea0b3970bdac6df68fe346731b2984
|
7
|
+
data.tar.gz: 3f2c757cc7e456dbcc0d6dfe555e4ff9269b84914764c03fe65d730eb1866b8216857555b6ddc22292c0cb8a9d6122cb4b746e423301221d4d7891e6dfdca397
|
@@ -195,6 +195,12 @@ module AsposeWordsCloud
|
|
195
195
|
# Gets or sets a value indicating whether to use pretty formats output.
|
196
196
|
attr_accessor :pretty_format
|
197
197
|
|
198
|
+
# Gets or sets the flag that indicates whether JavaScript will be removed from links.
|
199
|
+
# Default is false.
|
200
|
+
# If this option is enabled, all links containing JavaScript (e.g., links with "javascript:" in the href attribute)
|
201
|
+
# will be replaced with "javascript:void(0)". This can help prevent potential security risks, such as XSS attacks.
|
202
|
+
attr_accessor :remove_java_script_from_links
|
203
|
+
|
198
204
|
# Gets or sets the flag that indicates whether backslash characters should be replaced with yen signs.
|
199
205
|
# Default value is false.
|
200
206
|
# By default, Aspose.Words mimics MS Word's behavior and doesn't replace backslash characters with yen signs in
|
@@ -295,6 +301,7 @@ module AsposeWordsCloud
|
|
295
301
|
:'metafile_format' => :'MetafileFormat',
|
296
302
|
:'office_math_output_mode' => :'OfficeMathOutputMode',
|
297
303
|
:'pretty_format' => :'PrettyFormat',
|
304
|
+
:'remove_java_script_from_links' => :'RemoveJavaScriptFromLinks',
|
298
305
|
:'replace_backslash_with_yen_sign' => :'ReplaceBackslashWithYenSign',
|
299
306
|
:'resolve_font_names' => :'ResolveFontNames',
|
300
307
|
:'resource_folder' => :'ResourceFolder',
|
@@ -355,6 +362,7 @@ module AsposeWordsCloud
|
|
355
362
|
:'metafile_format' => :'String',
|
356
363
|
:'office_math_output_mode' => :'String',
|
357
364
|
:'pretty_format' => :'BOOLEAN',
|
365
|
+
:'remove_java_script_from_links' => :'BOOLEAN',
|
358
366
|
:'replace_backslash_with_yen_sign' => :'BOOLEAN',
|
359
367
|
:'resolve_font_names' => :'BOOLEAN',
|
360
368
|
:'resource_folder' => :'String',
|
@@ -560,6 +568,10 @@ module AsposeWordsCloud
|
|
560
568
|
self.pretty_format = attributes[:'PrettyFormat']
|
561
569
|
end
|
562
570
|
|
571
|
+
if attributes.key?(:'RemoveJavaScriptFromLinks')
|
572
|
+
self.remove_java_script_from_links = attributes[:'RemoveJavaScriptFromLinks']
|
573
|
+
end
|
574
|
+
|
563
575
|
if attributes.key?(:'ReplaceBackslashWithYenSign')
|
564
576
|
self.replace_backslash_with_yen_sign = attributes[:'ReplaceBackslashWithYenSign']
|
565
577
|
end
|
@@ -840,6 +852,7 @@ module AsposeWordsCloud
|
|
840
852
|
metafile_format == other.metafile_format &&
|
841
853
|
office_math_output_mode == other.office_math_output_mode &&
|
842
854
|
pretty_format == other.pretty_format &&
|
855
|
+
remove_java_script_from_links == other.remove_java_script_from_links &&
|
843
856
|
replace_backslash_with_yen_sign == other.replace_backslash_with_yen_sign &&
|
844
857
|
resolve_font_names == other.resolve_font_names &&
|
845
858
|
resource_folder == other.resource_folder &&
|
@@ -859,7 +872,7 @@ module AsposeWordsCloud
|
|
859
872
|
# Calculates hash code according to all attributes.
|
860
873
|
# @return [Fixnum] Hash code
|
861
874
|
def hash
|
862
|
-
[allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_ambiguous_text_font, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, replace_backslash_with_yen_sign, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, navigation_map_level, save_format].hash
|
875
|
+
[allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_ambiguous_text_font, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, remove_java_script_from_links, replace_backslash_with_yen_sign, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, navigation_map_level, save_format].hash
|
863
876
|
end
|
864
877
|
|
865
878
|
# Builds the object from hash
|
@@ -0,0 +1,231 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="comment_range_end.rb">
|
3
|
+
# Copyright (c) 2025 Aspose.Words for Cloud
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
14
|
+
# copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
# SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ------------------------------------------------------------------------------------
|
25
|
+
|
26
|
+
require 'date'
|
27
|
+
|
28
|
+
module AsposeWordsCloud
|
29
|
+
|
30
|
+
# Comment range end link.
|
31
|
+
class CommentRangeEnd
|
32
|
+
# Gets or sets the link to the document.
|
33
|
+
attr_accessor :link
|
34
|
+
|
35
|
+
# Gets or sets the node id.
|
36
|
+
attr_accessor :node_id
|
37
|
+
|
38
|
+
# Gets or sets the link to comment.
|
39
|
+
attr_accessor :comment_link
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'link' => :'Link',
|
44
|
+
:'node_id' => :'NodeId',
|
45
|
+
:'comment_link' => :'CommentLink'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.swagger_types
|
51
|
+
{
|
52
|
+
:'link' => :'WordsApiLink',
|
53
|
+
:'node_id' => :'String',
|
54
|
+
:'comment_link' => :'CommentLink'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
return unless attributes.is_a?(Hash)
|
62
|
+
|
63
|
+
# convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
65
|
+
|
66
|
+
if attributes.key?(:'Link')
|
67
|
+
self.link = attributes[:'Link']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'NodeId')
|
71
|
+
self.node_id = attributes[:'NodeId']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'CommentLink')
|
75
|
+
self.comment_link = attributes[:'CommentLink']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check to see if the all the properties in the model are valid
|
80
|
+
# @return true if the model is valid
|
81
|
+
def valid?
|
82
|
+
return true
|
83
|
+
end
|
84
|
+
|
85
|
+
# Checks equality by comparing each attribute.
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def ==(other)
|
88
|
+
return true if self.equal?(other)
|
89
|
+
self.class == other.class &&
|
90
|
+
link == other.link &&
|
91
|
+
node_id == other.node_id &&
|
92
|
+
comment_link == other.comment_link
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(other)
|
98
|
+
self == other
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Fixnum] Hash code
|
103
|
+
def hash
|
104
|
+
[link, node_id, comment_link].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
self.class.swagger_types.each_pair do |key, type|
|
113
|
+
if type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end
|
122
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :DateTime
|
135
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
136
|
+
when :Date
|
137
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :BOOLEAN
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else
|
165
|
+
# model
|
166
|
+
if value[:'$type']
|
167
|
+
type = value[:'$type'][0..-4]
|
168
|
+
end
|
169
|
+
|
170
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
171
|
+
temp_model.build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
next if value.nil?
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
def collectFilesContent(resultFilesContent)
|
218
|
+
end
|
219
|
+
|
220
|
+
def validate()
|
221
|
+
unless self.link.nil?
|
222
|
+
self.link.validate
|
223
|
+
end
|
224
|
+
unless self.comment_link.nil?
|
225
|
+
self.comment_link.validate
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
end
|
@@ -0,0 +1,231 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="comment_range_start.rb">
|
3
|
+
# Copyright (c) 2025 Aspose.Words for Cloud
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
14
|
+
# copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
# SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ------------------------------------------------------------------------------------
|
25
|
+
|
26
|
+
require 'date'
|
27
|
+
|
28
|
+
module AsposeWordsCloud
|
29
|
+
|
30
|
+
# Comment range start link.
|
31
|
+
class CommentRangeStart
|
32
|
+
# Gets or sets the link to the document.
|
33
|
+
attr_accessor :link
|
34
|
+
|
35
|
+
# Gets or sets the node id.
|
36
|
+
attr_accessor :node_id
|
37
|
+
|
38
|
+
# Gets or sets the link to comment.
|
39
|
+
attr_accessor :comment_link
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'link' => :'Link',
|
44
|
+
:'node_id' => :'NodeId',
|
45
|
+
:'comment_link' => :'CommentLink'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.swagger_types
|
51
|
+
{
|
52
|
+
:'link' => :'WordsApiLink',
|
53
|
+
:'node_id' => :'String',
|
54
|
+
:'comment_link' => :'CommentLink'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
return unless attributes.is_a?(Hash)
|
62
|
+
|
63
|
+
# convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
65
|
+
|
66
|
+
if attributes.key?(:'Link')
|
67
|
+
self.link = attributes[:'Link']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'NodeId')
|
71
|
+
self.node_id = attributes[:'NodeId']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'CommentLink')
|
75
|
+
self.comment_link = attributes[:'CommentLink']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check to see if the all the properties in the model are valid
|
80
|
+
# @return true if the model is valid
|
81
|
+
def valid?
|
82
|
+
return true
|
83
|
+
end
|
84
|
+
|
85
|
+
# Checks equality by comparing each attribute.
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def ==(other)
|
88
|
+
return true if self.equal?(other)
|
89
|
+
self.class == other.class &&
|
90
|
+
link == other.link &&
|
91
|
+
node_id == other.node_id &&
|
92
|
+
comment_link == other.comment_link
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(other)
|
98
|
+
self == other
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Fixnum] Hash code
|
103
|
+
def hash
|
104
|
+
[link, node_id, comment_link].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
self.class.swagger_types.each_pair do |key, type|
|
113
|
+
if type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end
|
122
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :DateTime
|
135
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
136
|
+
when :Date
|
137
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :BOOLEAN
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else
|
165
|
+
# model
|
166
|
+
if value[:'$type']
|
167
|
+
type = value[:'$type'][0..-4]
|
168
|
+
end
|
169
|
+
|
170
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
171
|
+
temp_model.build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
next if value.nil?
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
def collectFilesContent(resultFilesContent)
|
218
|
+
end
|
219
|
+
|
220
|
+
def validate()
|
221
|
+
unless self.link.nil?
|
222
|
+
self.link.validate
|
223
|
+
end
|
224
|
+
unless self.comment_link.nil?
|
225
|
+
self.comment_link.validate
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
end
|
@@ -195,6 +195,12 @@ module AsposeWordsCloud
|
|
195
195
|
# Gets or sets a value indicating whether to use pretty formats output.
|
196
196
|
attr_accessor :pretty_format
|
197
197
|
|
198
|
+
# Gets or sets the flag that indicates whether JavaScript will be removed from links.
|
199
|
+
# Default is false.
|
200
|
+
# If this option is enabled, all links containing JavaScript (e.g., links with "javascript:" in the href attribute)
|
201
|
+
# will be replaced with "javascript:void(0)". This can help prevent potential security risks, such as XSS attacks.
|
202
|
+
attr_accessor :remove_java_script_from_links
|
203
|
+
|
198
204
|
# Gets or sets the flag that indicates whether backslash characters should be replaced with yen signs.
|
199
205
|
# Default value is false.
|
200
206
|
# By default, Aspose.Words mimics MS Word's behavior and doesn't replace backslash characters with yen signs in
|
@@ -295,6 +301,7 @@ module AsposeWordsCloud
|
|
295
301
|
:'metafile_format' => :'MetafileFormat',
|
296
302
|
:'office_math_output_mode' => :'OfficeMathOutputMode',
|
297
303
|
:'pretty_format' => :'PrettyFormat',
|
304
|
+
:'remove_java_script_from_links' => :'RemoveJavaScriptFromLinks',
|
298
305
|
:'replace_backslash_with_yen_sign' => :'ReplaceBackslashWithYenSign',
|
299
306
|
:'resolve_font_names' => :'ResolveFontNames',
|
300
307
|
:'resource_folder' => :'ResourceFolder',
|
@@ -355,6 +362,7 @@ module AsposeWordsCloud
|
|
355
362
|
:'metafile_format' => :'String',
|
356
363
|
:'office_math_output_mode' => :'String',
|
357
364
|
:'pretty_format' => :'BOOLEAN',
|
365
|
+
:'remove_java_script_from_links' => :'BOOLEAN',
|
358
366
|
:'replace_backslash_with_yen_sign' => :'BOOLEAN',
|
359
367
|
:'resolve_font_names' => :'BOOLEAN',
|
360
368
|
:'resource_folder' => :'String',
|
@@ -560,6 +568,10 @@ module AsposeWordsCloud
|
|
560
568
|
self.pretty_format = attributes[:'PrettyFormat']
|
561
569
|
end
|
562
570
|
|
571
|
+
if attributes.key?(:'RemoveJavaScriptFromLinks')
|
572
|
+
self.remove_java_script_from_links = attributes[:'RemoveJavaScriptFromLinks']
|
573
|
+
end
|
574
|
+
|
563
575
|
if attributes.key?(:'ReplaceBackslashWithYenSign')
|
564
576
|
self.replace_backslash_with_yen_sign = attributes[:'ReplaceBackslashWithYenSign']
|
565
577
|
end
|
@@ -840,6 +852,7 @@ module AsposeWordsCloud
|
|
840
852
|
metafile_format == other.metafile_format &&
|
841
853
|
office_math_output_mode == other.office_math_output_mode &&
|
842
854
|
pretty_format == other.pretty_format &&
|
855
|
+
remove_java_script_from_links == other.remove_java_script_from_links &&
|
843
856
|
replace_backslash_with_yen_sign == other.replace_backslash_with_yen_sign &&
|
844
857
|
resolve_font_names == other.resolve_font_names &&
|
845
858
|
resource_folder == other.resource_folder &&
|
@@ -859,7 +872,7 @@ module AsposeWordsCloud
|
|
859
872
|
# Calculates hash code according to all attributes.
|
860
873
|
# @return [Fixnum] Hash code
|
861
874
|
def hash
|
862
|
-
[allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_ambiguous_text_font, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, replace_backslash_with_yen_sign, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, navigation_map_level, save_format].hash
|
875
|
+
[allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_ambiguous_text_font, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, remove_java_script_from_links, replace_backslash_with_yen_sign, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, navigation_map_level, save_format].hash
|
863
876
|
end
|
864
877
|
|
865
878
|
# Builds the object from hash
|