aspose_words_cloud 18.8 → 18.9
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.rb +2 -0
- data/lib/aspose_words_cloud/api/words_api.rb +304 -0
- data/lib/aspose_words_cloud/models/html_fixed_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +14 -4
- data/lib/aspose_words_cloud/models/paragraph_format.rb +558 -0
- data/lib/aspose_words_cloud/models/paragraph_format_response.rb +232 -0
- data/lib/aspose_words_cloud/models/requests/GetDocumentParagraphFormatRequest.rb +69 -0
- data/lib/aspose_words_cloud/models/requests/PostDocumentParagraphFormatRequest.rb +85 -0
- data/lib/aspose_words_cloud/version.rb +1 -1
- metadata +6 -2
@@ -109,6 +109,9 @@ module AsposeWordsCloud
|
|
109
109
|
# Specifies the name of the folder used to construct resource URIs
|
110
110
|
attr_accessor :resources_folder_alias
|
111
111
|
|
112
|
+
# Flag indicates whether \"@font-face\" CSS rules should be placed into a separate file \"fontFaces.css\" when a document is being saved with external stylesheet (that is, when Aspose.Words.Saving.HtmlFixedSaveOptions.ExportEmbeddedCss is false). Default value is false, all CSS rules are written into single file \"styles.css\".
|
113
|
+
attr_accessor :save_font_face_css_separately
|
114
|
+
|
112
115
|
# Specifies whether border around pages should be shown.
|
113
116
|
attr_accessor :show_page_border
|
114
117
|
|
@@ -142,6 +145,7 @@ module AsposeWordsCloud
|
|
142
145
|
:'page_margins' => :'PageMargins',
|
143
146
|
:'resources_folder' => :'ResourcesFolder',
|
144
147
|
:'resources_folder_alias' => :'ResourcesFolderAlias',
|
148
|
+
:'save_font_face_css_separately' => :'SaveFontFaceCssSeparately',
|
145
149
|
:'show_page_border' => :'ShowPageBorder'
|
146
150
|
}
|
147
151
|
end
|
@@ -175,6 +179,7 @@ module AsposeWordsCloud
|
|
175
179
|
:'page_margins' => :'Float',
|
176
180
|
:'resources_folder' => :'String',
|
177
181
|
:'resources_folder_alias' => :'String',
|
182
|
+
:'save_font_face_css_separately' => :'BOOLEAN',
|
178
183
|
:'show_page_border' => :'BOOLEAN'
|
179
184
|
}
|
180
185
|
end
|
@@ -291,6 +296,10 @@ module AsposeWordsCloud
|
|
291
296
|
self.resources_folder_alias = attributes[:'ResourcesFolderAlias']
|
292
297
|
end
|
293
298
|
|
299
|
+
if attributes.key?(:'SaveFontFaceCssSeparately')
|
300
|
+
self.save_font_face_css_separately = attributes[:'SaveFontFaceCssSeparately']
|
301
|
+
end
|
302
|
+
|
294
303
|
if attributes.key?(:'ShowPageBorder')
|
295
304
|
self.show_page_border = attributes[:'ShowPageBorder']
|
296
305
|
end
|
@@ -341,6 +350,7 @@ module AsposeWordsCloud
|
|
341
350
|
page_margins == other.page_margins &&
|
342
351
|
resources_folder == other.resources_folder &&
|
343
352
|
resources_folder_alias == other.resources_folder_alias &&
|
353
|
+
save_font_face_css_separately == other.save_font_face_css_separately &&
|
344
354
|
show_page_border == other.show_page_border
|
345
355
|
end
|
346
356
|
|
@@ -353,7 +363,7 @@ module AsposeWordsCloud
|
|
353
363
|
# Calculates hash code according to all attributes.
|
354
364
|
# @return [Fixnum] Hash code
|
355
365
|
def hash
|
356
|
-
[color_mode, save_format, file_name, dml_rendering_mode, dml_effects_rendering_mode, zip_output, update_last_saved_time_property, update_sdt_content, update_fields, jpeg_quality, metafile_rendering_options, numeral_format, optimize_output, page_count, page_index, css_class_names_prefix, encoding, export_embedded_css, export_embedded_fonts, export_embedded_images, export_form_fields, font_format, page_horizontal_alignment, page_margins, resources_folder, resources_folder_alias, show_page_border].hash
|
366
|
+
[color_mode, save_format, file_name, dml_rendering_mode, dml_effects_rendering_mode, zip_output, update_last_saved_time_property, update_sdt_content, update_fields, jpeg_quality, metafile_rendering_options, numeral_format, optimize_output, page_count, page_index, css_class_names_prefix, encoding, export_embedded_css, export_embedded_fonts, export_embedded_images, export_form_fields, font_format, page_horizontal_alignment, page_margins, resources_folder, resources_folder_alias, save_font_face_css_separately, show_page_border].hash
|
357
367
|
end
|
358
368
|
|
359
369
|
# Builds the object from hash
|
@@ -172,6 +172,9 @@ module AsposeWordsCloud
|
|
172
172
|
# Controls how table, row and cell widths are exported
|
173
173
|
attr_accessor :table_width_output_mode
|
174
174
|
|
175
|
+
# Specifies whether to use CID (Content-ID) URLs to reference resources (images, fonts, CSS) included in MHTML documents. Default value is false.
|
176
|
+
attr_accessor :export_cid_urls_for_mhtml_resources
|
177
|
+
|
175
178
|
class EnumAttributeValidator
|
176
179
|
attr_reader :datatype
|
177
180
|
attr_reader :allowable_values
|
@@ -243,7 +246,8 @@ module AsposeWordsCloud
|
|
243
246
|
:'resource_folder' => :'ResourceFolder',
|
244
247
|
:'resource_folder_alias' => :'ResourceFolderAlias',
|
245
248
|
:'scale_image_to_shape_size' => :'ScaleImageToShapeSize',
|
246
|
-
:'table_width_output_mode' => :'TableWidthOutputMode'
|
249
|
+
:'table_width_output_mode' => :'TableWidthOutputMode',
|
250
|
+
:'export_cid_urls_for_mhtml_resources' => :'ExportCidUrlsForMhtmlResources'
|
247
251
|
}
|
248
252
|
end
|
249
253
|
|
@@ -296,7 +300,8 @@ module AsposeWordsCloud
|
|
296
300
|
:'resource_folder' => :'String',
|
297
301
|
:'resource_folder_alias' => :'String',
|
298
302
|
:'scale_image_to_shape_size' => :'BOOLEAN',
|
299
|
-
:'table_width_output_mode' => :'String'
|
303
|
+
:'table_width_output_mode' => :'String',
|
304
|
+
:'export_cid_urls_for_mhtml_resources' => :'BOOLEAN'
|
300
305
|
}
|
301
306
|
end
|
302
307
|
|
@@ -496,6 +501,10 @@ module AsposeWordsCloud
|
|
496
501
|
self.table_width_output_mode = attributes[:'TableWidthOutputMode']
|
497
502
|
end
|
498
503
|
|
504
|
+
if attributes.key?(:'ExportCidUrlsForMhtmlResources')
|
505
|
+
self.export_cid_urls_for_mhtml_resources = attributes[:'ExportCidUrlsForMhtmlResources']
|
506
|
+
end
|
507
|
+
|
499
508
|
end
|
500
509
|
|
501
510
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -610,7 +619,8 @@ module AsposeWordsCloud
|
|
610
619
|
resource_folder == other.resource_folder &&
|
611
620
|
resource_folder_alias == other.resource_folder_alias &&
|
612
621
|
scale_image_to_shape_size == other.scale_image_to_shape_size &&
|
613
|
-
table_width_output_mode == other.table_width_output_mode
|
622
|
+
table_width_output_mode == other.table_width_output_mode &&
|
623
|
+
export_cid_urls_for_mhtml_resources == other.export_cid_urls_for_mhtml_resources
|
614
624
|
end
|
615
625
|
|
616
626
|
# @see the `==` method
|
@@ -622,7 +632,7 @@ module AsposeWordsCloud
|
|
622
632
|
# Calculates hash code according to all attributes.
|
623
633
|
# @return [Fixnum] Hash code
|
624
634
|
def hash
|
625
|
-
[color_mode, save_format, file_name, dml_rendering_mode, dml_effects_rendering_mode, zip_output, update_last_saved_time_property, update_sdt_content, update_fields, 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_box_as_svg, 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, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode].hash
|
635
|
+
[color_mode, save_format, file_name, dml_rendering_mode, dml_effects_rendering_mode, zip_output, update_last_saved_time_property, update_sdt_content, update_fields, 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_box_as_svg, 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, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, export_cid_urls_for_mhtml_resources].hash
|
626
636
|
end
|
627
637
|
|
628
638
|
# Builds the object from hash
|
@@ -0,0 +1,558 @@
|
|
1
|
+
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module AsposeWordsCloud
|
5
|
+
#
|
6
|
+
# --------------------------------------------------------------------------------------------------------------------
|
7
|
+
# <copyright company="Aspose" file="ParagraphFormat.rb">
|
8
|
+
# Copyright (c) 2017 Aspose.Words for Cloud
|
9
|
+
# </copyright>
|
10
|
+
# <summary>
|
11
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
12
|
+
# of this software and associated documentation files (the "Software"), to deal
|
13
|
+
# in the Software without restriction, including without limitation the rights
|
14
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15
|
+
# copies of the Software, and to permit persons to whom the Software is
|
16
|
+
# furnished to do so, subject to the following conditions:
|
17
|
+
#
|
18
|
+
# The above copyright notice and this permission notice shall be included in all
|
19
|
+
# copies or substantial portions of the Software.
|
20
|
+
#
|
21
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
|
+
# SOFTWARE.
|
28
|
+
# </summary>
|
29
|
+
# --------------------------------------------------------------------------------------------------------------------
|
30
|
+
#
|
31
|
+
|
32
|
+
# Paragraph format element
|
33
|
+
class ParagraphFormat
|
34
|
+
# Link to the document.
|
35
|
+
attr_accessor :link
|
36
|
+
|
37
|
+
# Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.
|
38
|
+
attr_accessor :add_space_between_far_east_and_alpha
|
39
|
+
|
40
|
+
# Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.
|
41
|
+
attr_accessor :add_space_between_far_east_and_digit
|
42
|
+
|
43
|
+
# Gets or sets text alignment for the paragraph.
|
44
|
+
attr_accessor :alignment
|
45
|
+
|
46
|
+
# Gets or sets whether this is a right-to-left paragraph.
|
47
|
+
attr_accessor :bidi
|
48
|
+
|
49
|
+
# Gets or sets the position for a drop cap text.
|
50
|
+
attr_accessor :drop_cap_position
|
51
|
+
|
52
|
+
# Gets or sets the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent.
|
53
|
+
attr_accessor :first_line_indent
|
54
|
+
|
55
|
+
# True if all lines in the paragraph are to remain on the same page.
|
56
|
+
attr_accessor :keep_together
|
57
|
+
|
58
|
+
# True if the paragraph is to remains on the same page as the paragraph that follows it.
|
59
|
+
attr_accessor :keep_with_next
|
60
|
+
|
61
|
+
# Gets or sets the value (in points) that represents the left indent for paragraph.
|
62
|
+
attr_accessor :left_indent
|
63
|
+
|
64
|
+
# Gets or sets the line spacing (in points) for the paragraph.
|
65
|
+
attr_accessor :line_spacing
|
66
|
+
|
67
|
+
# Gets or sets the line spacing for the paragraph.
|
68
|
+
attr_accessor :line_spacing_rule
|
69
|
+
|
70
|
+
# Gets or sets the number of lines of the paragraph text used to calculate the drop cap height.
|
71
|
+
attr_accessor :lines_to_drop
|
72
|
+
|
73
|
+
# When true, and will be ignored between the paragraphs of the same style.
|
74
|
+
attr_accessor :no_space_between_paragraphs_of_same_style
|
75
|
+
|
76
|
+
# Specifies the outline level of the paragraph in the document.
|
77
|
+
attr_accessor :outline_level
|
78
|
+
|
79
|
+
# True if a page break is forced before the paragraph.
|
80
|
+
attr_accessor :page_break_before
|
81
|
+
|
82
|
+
# Gets or sets the value (in points) that represents the right indent for paragraph.
|
83
|
+
attr_accessor :right_indent
|
84
|
+
|
85
|
+
# Gets or sets the amount of spacing (in points) after the paragraph.
|
86
|
+
attr_accessor :space_after
|
87
|
+
|
88
|
+
# True if the amount of spacing after the paragraph is set automatically.
|
89
|
+
attr_accessor :space_after_auto
|
90
|
+
|
91
|
+
# Gets or sets the amount of spacing (in points) before the paragraph.
|
92
|
+
attr_accessor :space_before
|
93
|
+
|
94
|
+
# True if the amount of spacing before the paragraph is set automatically.
|
95
|
+
attr_accessor :space_before_auto
|
96
|
+
|
97
|
+
# Gets or sets the locale independent style identifier of the paragraph style applied to this formatting.
|
98
|
+
attr_accessor :style_identifier
|
99
|
+
|
100
|
+
# Gets or sets the name of the paragraph style applied to this formatting.
|
101
|
+
attr_accessor :style_name
|
102
|
+
|
103
|
+
# Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings.
|
104
|
+
attr_accessor :suppress_auto_hyphens
|
105
|
+
|
106
|
+
# Specifies whether the current paragraph's lines should be exempted from line numbering which is applied in the parent section.
|
107
|
+
attr_accessor :suppress_line_numbers
|
108
|
+
|
109
|
+
# True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.
|
110
|
+
attr_accessor :widow_control
|
111
|
+
|
112
|
+
class EnumAttributeValidator
|
113
|
+
attr_reader :datatype
|
114
|
+
attr_reader :allowable_values
|
115
|
+
|
116
|
+
def initialize(datatype, allowable_values)
|
117
|
+
@allowable_values = allowable_values.map do |value|
|
118
|
+
case datatype.to_s
|
119
|
+
when /Integer/i
|
120
|
+
value.to_i
|
121
|
+
when /Float/i
|
122
|
+
value.to_f
|
123
|
+
else
|
124
|
+
value
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def valid?(value)
|
130
|
+
!value || allowable_values.include?(value)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
135
|
+
def self.attribute_map
|
136
|
+
{
|
137
|
+
:'link' => :'link',
|
138
|
+
:'add_space_between_far_east_and_alpha' => :'AddSpaceBetweenFarEastAndAlpha',
|
139
|
+
:'add_space_between_far_east_and_digit' => :'AddSpaceBetweenFarEastAndDigit',
|
140
|
+
:'alignment' => :'Alignment',
|
141
|
+
:'bidi' => :'Bidi',
|
142
|
+
:'drop_cap_position' => :'DropCapPosition',
|
143
|
+
:'first_line_indent' => :'FirstLineIndent',
|
144
|
+
:'keep_together' => :'KeepTogether',
|
145
|
+
:'keep_with_next' => :'KeepWithNext',
|
146
|
+
:'left_indent' => :'LeftIndent',
|
147
|
+
:'line_spacing' => :'LineSpacing',
|
148
|
+
:'line_spacing_rule' => :'LineSpacingRule',
|
149
|
+
:'lines_to_drop' => :'LinesToDrop',
|
150
|
+
:'no_space_between_paragraphs_of_same_style' => :'NoSpaceBetweenParagraphsOfSameStyle',
|
151
|
+
:'outline_level' => :'OutlineLevel',
|
152
|
+
:'page_break_before' => :'PageBreakBefore',
|
153
|
+
:'right_indent' => :'RightIndent',
|
154
|
+
:'space_after' => :'SpaceAfter',
|
155
|
+
:'space_after_auto' => :'SpaceAfterAuto',
|
156
|
+
:'space_before' => :'SpaceBefore',
|
157
|
+
:'space_before_auto' => :'SpaceBeforeAuto',
|
158
|
+
:'style_identifier' => :'StyleIdentifier',
|
159
|
+
:'style_name' => :'StyleName',
|
160
|
+
:'suppress_auto_hyphens' => :'SuppressAutoHyphens',
|
161
|
+
:'suppress_line_numbers' => :'SuppressLineNumbers',
|
162
|
+
:'widow_control' => :'WidowControl'
|
163
|
+
}
|
164
|
+
end
|
165
|
+
|
166
|
+
# Attribute type mapping.
|
167
|
+
def self.swagger_types
|
168
|
+
{
|
169
|
+
:'link' => :'WordsApiLink',
|
170
|
+
:'add_space_between_far_east_and_alpha' => :'BOOLEAN',
|
171
|
+
:'add_space_between_far_east_and_digit' => :'BOOLEAN',
|
172
|
+
:'alignment' => :'String',
|
173
|
+
:'bidi' => :'BOOLEAN',
|
174
|
+
:'drop_cap_position' => :'String',
|
175
|
+
:'first_line_indent' => :'Float',
|
176
|
+
:'keep_together' => :'BOOLEAN',
|
177
|
+
:'keep_with_next' => :'BOOLEAN',
|
178
|
+
:'left_indent' => :'Float',
|
179
|
+
:'line_spacing' => :'Float',
|
180
|
+
:'line_spacing_rule' => :'String',
|
181
|
+
:'lines_to_drop' => :'Integer',
|
182
|
+
:'no_space_between_paragraphs_of_same_style' => :'BOOLEAN',
|
183
|
+
:'outline_level' => :'String',
|
184
|
+
:'page_break_before' => :'BOOLEAN',
|
185
|
+
:'right_indent' => :'Float',
|
186
|
+
:'space_after' => :'Float',
|
187
|
+
:'space_after_auto' => :'BOOLEAN',
|
188
|
+
:'space_before' => :'Float',
|
189
|
+
:'space_before_auto' => :'BOOLEAN',
|
190
|
+
:'style_identifier' => :'String',
|
191
|
+
:'style_name' => :'String',
|
192
|
+
:'suppress_auto_hyphens' => :'BOOLEAN',
|
193
|
+
:'suppress_line_numbers' => :'BOOLEAN',
|
194
|
+
:'widow_control' => :'BOOLEAN'
|
195
|
+
}
|
196
|
+
end
|
197
|
+
|
198
|
+
# Initializes the object
|
199
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
200
|
+
def initialize(attributes = {})
|
201
|
+
return unless attributes.is_a?(Hash)
|
202
|
+
|
203
|
+
# convert string to symbol for hash key
|
204
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
205
|
+
|
206
|
+
if attributes.key?(:'link')
|
207
|
+
self.link = attributes[:'link']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.key?(:'AddSpaceBetweenFarEastAndAlpha')
|
211
|
+
self.add_space_between_far_east_and_alpha = attributes[:'AddSpaceBetweenFarEastAndAlpha']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'AddSpaceBetweenFarEastAndDigit')
|
215
|
+
self.add_space_between_far_east_and_digit = attributes[:'AddSpaceBetweenFarEastAndDigit']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'Alignment')
|
219
|
+
self.alignment = attributes[:'Alignment']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'Bidi')
|
223
|
+
self.bidi = attributes[:'Bidi']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'DropCapPosition')
|
227
|
+
self.drop_cap_position = attributes[:'DropCapPosition']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'FirstLineIndent')
|
231
|
+
self.first_line_indent = attributes[:'FirstLineIndent']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'KeepTogether')
|
235
|
+
self.keep_together = attributes[:'KeepTogether']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.key?(:'KeepWithNext')
|
239
|
+
self.keep_with_next = attributes[:'KeepWithNext']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.key?(:'LeftIndent')
|
243
|
+
self.left_indent = attributes[:'LeftIndent']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.key?(:'LineSpacing')
|
247
|
+
self.line_spacing = attributes[:'LineSpacing']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'LineSpacingRule')
|
251
|
+
self.line_spacing_rule = attributes[:'LineSpacingRule']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.key?(:'LinesToDrop')
|
255
|
+
self.lines_to_drop = attributes[:'LinesToDrop']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.key?(:'NoSpaceBetweenParagraphsOfSameStyle')
|
259
|
+
self.no_space_between_paragraphs_of_same_style = attributes[:'NoSpaceBetweenParagraphsOfSameStyle']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.key?(:'OutlineLevel')
|
263
|
+
self.outline_level = attributes[:'OutlineLevel']
|
264
|
+
end
|
265
|
+
|
266
|
+
if attributes.key?(:'PageBreakBefore')
|
267
|
+
self.page_break_before = attributes[:'PageBreakBefore']
|
268
|
+
end
|
269
|
+
|
270
|
+
if attributes.key?(:'RightIndent')
|
271
|
+
self.right_indent = attributes[:'RightIndent']
|
272
|
+
end
|
273
|
+
|
274
|
+
if attributes.key?(:'SpaceAfter')
|
275
|
+
self.space_after = attributes[:'SpaceAfter']
|
276
|
+
end
|
277
|
+
|
278
|
+
if attributes.key?(:'SpaceAfterAuto')
|
279
|
+
self.space_after_auto = attributes[:'SpaceAfterAuto']
|
280
|
+
end
|
281
|
+
|
282
|
+
if attributes.key?(:'SpaceBefore')
|
283
|
+
self.space_before = attributes[:'SpaceBefore']
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes.key?(:'SpaceBeforeAuto')
|
287
|
+
self.space_before_auto = attributes[:'SpaceBeforeAuto']
|
288
|
+
end
|
289
|
+
|
290
|
+
if attributes.key?(:'StyleIdentifier')
|
291
|
+
self.style_identifier = attributes[:'StyleIdentifier']
|
292
|
+
end
|
293
|
+
|
294
|
+
if attributes.key?(:'StyleName')
|
295
|
+
self.style_name = attributes[:'StyleName']
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes.key?(:'SuppressAutoHyphens')
|
299
|
+
self.suppress_auto_hyphens = attributes[:'SuppressAutoHyphens']
|
300
|
+
end
|
301
|
+
|
302
|
+
if attributes.key?(:'SuppressLineNumbers')
|
303
|
+
self.suppress_line_numbers = attributes[:'SuppressLineNumbers']
|
304
|
+
end
|
305
|
+
|
306
|
+
if attributes.key?(:'WidowControl')
|
307
|
+
self.widow_control = attributes[:'WidowControl']
|
308
|
+
end
|
309
|
+
|
310
|
+
end
|
311
|
+
|
312
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
313
|
+
# @return Array for valid properies with the reasons
|
314
|
+
def list_invalid_properties
|
315
|
+
invalid_properties = []
|
316
|
+
return invalid_properties
|
317
|
+
end
|
318
|
+
|
319
|
+
# Check to see if the all the properties in the model are valid
|
320
|
+
# @return true if the model is valid
|
321
|
+
def valid?
|
322
|
+
alignment_validator = EnumAttributeValidator.new('String', ["Left", "Center", "Right", "Justify", "Distributed", "ArabicMediumKashida", "ArabicHighKashida", "ArabicLowKashida", "ThaiDistributed"])
|
323
|
+
return false unless alignment_validator.valid?(@alignment)
|
324
|
+
drop_cap_position_validator = EnumAttributeValidator.new('String', ["None", "Normal", "Margin"])
|
325
|
+
return false unless drop_cap_position_validator.valid?(@drop_cap_position)
|
326
|
+
line_spacing_rule_validator = EnumAttributeValidator.new('String', ["AtLeast", "Exactly", "Multiple"])
|
327
|
+
return false unless line_spacing_rule_validator.valid?(@line_spacing_rule)
|
328
|
+
outline_level_validator = EnumAttributeValidator.new('String', ["Level1", "Level2", "Level3", "Level4", "Level5", "Level6", "Level7", "Level8", "Level9", "BodyText"])
|
329
|
+
return false unless outline_level_validator.valid?(@outline_level)
|
330
|
+
style_identifier_validator = EnumAttributeValidator.new('String', ["Normal", "Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "Heading7", "Heading8", "Heading9", "Index1", "Index2", "Index3", "Index4", "Index5", "Index6", "Index7", "Index8", "Index9", "Toc1", "Toc2", "Toc3", "Toc4", "Toc5", "Toc6", "Toc7", "Toc8", "Toc9", "NormalIndent", "FootnoteText", "CommentText", "Header", "Footer", "IndexHeading", "Caption", "TableOfFigures", "EnvelopeAddress", "EnvelopeReturn", "FootnoteReference", "CommentReference", "LineNumber", "PageNumber", "EndnoteReference", "EndnoteText", "TableOfAuthorities", "Macro", "ToaHeading", "List", "ListBullet", "ListNumber", "List2", "List3", "List4", "List5", "ListBullet2", "ListBullet3", "ListBullet4", "ListBullet5", "ListNumber2", "ListNumber3", "ListNumber4", "ListNumber5", "Title", "Closing", "Signature", "DefaultParagraphFont", "BodyText", "BodyTextInd", "ListContinue", "ListContinue2", "ListContinue3", "ListContinue4", "ListContinue5", "MessageHeader", "Subtitle", "Salutation", "Date", "BodyText1I", "BodyText1I2", "NoteHeading", "BodyText2", "BodyText3", "BodyTextInd2", "BodyTextInd3", "BlockText", "Hyperlink", "FollowedHyperlink", "Strong", "Emphasis", "DocumentMap", "PlainText", "EmailSignature", "HtmlTopOfForm", "HtmlBottomOfForm", "NormalWeb", "HtmlAcronym", "HtmlAddress", "HtmlCite", "HtmlCode", "HtmlDefinition", "HtmlKeyboard", "HtmlPreformatted", "HtmlSample", "HtmlTypewriter", "HtmlVariable", "TableNormal", "CommentSubject", "NoList", "OutlineList1", "OutlineList2", "OutlineList3", "TableSimple1", "TableSimple2", "TableSimple3", "TableClassic1", "TableClassic2", "TableClassic3", "TableClassic4", "TableColorful1", "TableColorful2", "TableColorful3", "TableColumns1", "TableColumns2", "TableColumns3", "TableColumns4", "TableColumns5", "TableGrid1", "TableGrid2", "TableGrid3", "TableGrid4", "TableGrid5", "TableGrid6", "TableGrid7", "TableGrid8", "TableList1", "TableList2", "TableList3", "TableList4", "TableList5", "TableList6", "TableList7", "TableList8", "Table3DEffects1", "Table3DEffects2", "Table3DEffects3", "TableContemporary", "TableElegant", "TableProfessional", "TableSubtle1", "TableSubtle2", "TableWeb1", "TableWeb2", "TableWeb3", "BalloonText", "TableGrid", "TableTheme", "PlaceholderText", "NoSpacing", "LightShading", "LightList", "LightGrid", "MediumShading1", "MediumShading2", "MediumList1", "MediumList2", "MediumGrid1", "MediumGrid2", "MediumGrid3", "DarkList", "ColorfulShading", "ColorfulList", "ColorfulGrid", "LightShadingAccent1", "LightListAccent1", "LightGridAccent1", "MediumShading1Accent1", "MediumShading2Accent1", "MediumList1Accent1", "Revision", "ListParagraph", "Quote", "IntenseQuote", "MediumList2Accent1", "MediumGrid1Accent1", "MediumGrid2Accent1", "MediumGrid3Accent1", "DarkListAccent1", "ColorfulShadingAccent1", "ColorfulListAccent1", "ColorfulGridAccent1", "LightShadingAccent2", "LightListAccent2", "LightGridAccent2", "MediumShading1Accent2", "MediumShading2Accent2", "MediumList1Accent2", "MediumList2Accent2", "MediumGrid1Accent2", "MediumGrid2Accent2", "MediumGrid3Accent2", "DarkListAccent2", "ColorfulShadingAccent2", "ColorfulListAccent2", "ColorfulGridAccent2", "LightShadingAccent3", "LightListAccent3", "LightGridAccent3", "MediumShading1Accent3", "MediumShading2Accent3", "MediumList1Accent3", "MediumList2Accent3", "MediumGrid1Accent3", "MediumGrid2Accent3", "MediumGrid3Accent3", "DarkListAccent3", "ColorfulShadingAccent3", "ColorfulListAccent3", "ColorfulGridAccent3", "LightShadingAccent4", "LightListAccent4", "LightGridAccent4", "MediumShading1Accent4", "MediumShading2Accent4", "MediumList1Accent4", "MediumList2Accent4", "MediumGrid1Accent4", "MediumGrid2Accent4", "MediumGrid3Accent4", "DarkListAccent4", "ColorfulShadingAccent4", "ColorfulListAccent4", "ColorfulGridAccent4", "LightShadingAccent5", "LightListAccent5", "LightGridAccent5", "MediumShading1Accent5", "MediumShading2Accent5", "MediumList1Accent5", "MediumList2Accent5", "MediumGrid1Accent5", "MediumGrid2Accent5", "MediumGrid3Accent5", "DarkListAccent5", "ColorfulShadingAccent5", "ColorfulListAccent5", "ColorfulGridAccent5", "LightShadingAccent6", "LightListAccent6", "LightGridAccent6", "MediumShading1Accent6", "MediumShading2Accent6", "MediumList1Accent6", "MediumList2Accent6", "MediumGrid1Accent6", "MediumGrid2Accent6", "MediumGrid3Accent6", "DarkListAccent6", "ColorfulShadingAccent6", "ColorfulListAccent6", "ColorfulGridAccent6", "SubtleEmphasis", "IntenseEmphasis", "SubtleReference", "IntenseReference", "BookTitle", "Bibliography", "TocHeading", "PlainTable1", "PlainTable2", "PlainTable3", "PlainTable4", "PlainTable5", "TableGridLight", "GridTable1Light", "GridTable2", "GridTable3", "GridTable4", "GridTable5Dark", "GridTable6Colorful", "GridTable7Colorful", "GridTable1LightAccent1", "GridTable2Accent1", "GridTable3Accent1", "GridTable4Accent1", "GridTable5DarkAccent1", "GridTable6ColorfulAccent1", "GridTable7ColorfulAccent1", "GridTable1LightAccent2", "GridTable2Accent2", "GridTable3Accent2", "GridTable4Accent2", "GridTable5DarkAccent2", "GridTable6ColorfulAccent2", "GridTable7ColorfulAccent2", "GridTable1LightAccent3", "GridTable2Accent3", "GridTable3Accent3", "GridTable4Accent3", "GridTable5DarkAccent3", "GridTable6ColorfulAccent3", "GridTable7ColorfulAccent3", "GridTable1LightAccent4", "GridTable2Accent4", "GridTable3Accent4", "GridTable4Accent4", "GridTable5DarkAccent4", "GridTable6ColorfulAccent4", "GridTable7ColorfulAccent4", "GridTable1LightAccent5", "GridTable2Accent5", "GridTable3Accent5", "GridTable4Accent5", "GridTable5DarkAccent5", "GridTable6ColorfulAccent5", "GridTable7ColorfulAccent5", "GridTable1LightAccent6", "GridTable2Accent6", "GridTable3Accent6", "GridTable4Accent6", "GridTable5DarkAccent6", "GridTable6ColorfulAccent6", "GridTable7ColorfulAccent6", "ListTable1Light", "ListTable2", "ListTable3", "ListTable4", "ListTable5Dark", "ListTable6Colorful", "ListTable7Colorful", "ListTable1LightAccent1", "ListTable2Accent1", "ListTable3Accent1", "ListTable4Accent1", "ListTable5DarkAccent1", "ListTable6ColorfulAccent1", "ListTable7ColorfulAccent1", "ListTable1LightAccent2", "ListTable2Accent2", "ListTable3Accent2", "ListTable4Accent2", "ListTable5DarkAccent2", "ListTable6ColorfulAccent2", "ListTable7ColorfulAccent2", "ListTable1LightAccent3", "ListTable2Accent3", "ListTable3Accent3", "ListTable4Accent3", "ListTable5DarkAccent3", "ListTable6ColorfulAccent3", "ListTable7ColorfulAccent3", "ListTable1LightAccent4", "ListTable2Accent4", "ListTable3Accent4", "ListTable4Accent4", "ListTable5DarkAccent4", "ListTable6ColorfulAccent4", "ListTable7ColorfulAccent4", "ListTable1LightAccent5", "ListTable2Accent5", "ListTable3Accent5", "ListTable4Accent5", "ListTable5DarkAccent5", "ListTable6ColorfulAccent5", "ListTable7ColorfulAccent5", "ListTable1LightAccent6", "ListTable2Accent6", "ListTable3Accent6", "ListTable4Accent6", "ListTable5DarkAccent6", "ListTable6ColorfulAccent6", "ListTable7ColorfulAccent6", "User", "Nil"])
|
331
|
+
return false unless style_identifier_validator.valid?(@style_identifier)
|
332
|
+
return true
|
333
|
+
end
|
334
|
+
|
335
|
+
# Custom attribute writer method checking allowed values (enum).
|
336
|
+
# @param [Object] alignment Object to be assigned
|
337
|
+
def alignment=(alignment)
|
338
|
+
validator = EnumAttributeValidator.new('String', ["Left", "Center", "Right", "Justify", "Distributed", "ArabicMediumKashida", "ArabicHighKashida", "ArabicLowKashida", "ThaiDistributed"])
|
339
|
+
if alignment.to_i == 0
|
340
|
+
unless validator.valid?(alignment)
|
341
|
+
raise ArgumentError, "invalid value for 'alignment', must be one of #{validator.allowable_values}."
|
342
|
+
end
|
343
|
+
@alignment = alignment
|
344
|
+
else
|
345
|
+
@alignment = validator.allowable_values[alignment.to_i]
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
# Custom attribute writer method checking allowed values (enum).
|
350
|
+
# @param [Object] drop_cap_position Object to be assigned
|
351
|
+
def drop_cap_position=(drop_cap_position)
|
352
|
+
validator = EnumAttributeValidator.new('String', ["None", "Normal", "Margin"])
|
353
|
+
if drop_cap_position.to_i == 0
|
354
|
+
unless validator.valid?(drop_cap_position)
|
355
|
+
raise ArgumentError, "invalid value for 'drop_cap_position', must be one of #{validator.allowable_values}."
|
356
|
+
end
|
357
|
+
@drop_cap_position = drop_cap_position
|
358
|
+
else
|
359
|
+
@drop_cap_position = validator.allowable_values[drop_cap_position.to_i]
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
# Custom attribute writer method checking allowed values (enum).
|
364
|
+
# @param [Object] line_spacing_rule Object to be assigned
|
365
|
+
def line_spacing_rule=(line_spacing_rule)
|
366
|
+
validator = EnumAttributeValidator.new('String', ["AtLeast", "Exactly", "Multiple"])
|
367
|
+
if line_spacing_rule.to_i == 0
|
368
|
+
unless validator.valid?(line_spacing_rule)
|
369
|
+
raise ArgumentError, "invalid value for 'line_spacing_rule', must be one of #{validator.allowable_values}."
|
370
|
+
end
|
371
|
+
@line_spacing_rule = line_spacing_rule
|
372
|
+
else
|
373
|
+
@line_spacing_rule = validator.allowable_values[line_spacing_rule.to_i]
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
# Custom attribute writer method checking allowed values (enum).
|
378
|
+
# @param [Object] outline_level Object to be assigned
|
379
|
+
def outline_level=(outline_level)
|
380
|
+
validator = EnumAttributeValidator.new('String', ["Level1", "Level2", "Level3", "Level4", "Level5", "Level6", "Level7", "Level8", "Level9", "BodyText"])
|
381
|
+
if outline_level.to_i == 0
|
382
|
+
unless validator.valid?(outline_level)
|
383
|
+
raise ArgumentError, "invalid value for 'outline_level', must be one of #{validator.allowable_values}."
|
384
|
+
end
|
385
|
+
@outline_level = outline_level
|
386
|
+
else
|
387
|
+
@outline_level = validator.allowable_values[outline_level.to_i]
|
388
|
+
end
|
389
|
+
end
|
390
|
+
|
391
|
+
# Custom attribute writer method checking allowed values (enum).
|
392
|
+
# @param [Object] style_identifier Object to be assigned
|
393
|
+
def style_identifier=(style_identifier)
|
394
|
+
validator = EnumAttributeValidator.new('String', ["Normal", "Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "Heading7", "Heading8", "Heading9", "Index1", "Index2", "Index3", "Index4", "Index5", "Index6", "Index7", "Index8", "Index9", "Toc1", "Toc2", "Toc3", "Toc4", "Toc5", "Toc6", "Toc7", "Toc8", "Toc9", "NormalIndent", "FootnoteText", "CommentText", "Header", "Footer", "IndexHeading", "Caption", "TableOfFigures", "EnvelopeAddress", "EnvelopeReturn", "FootnoteReference", "CommentReference", "LineNumber", "PageNumber", "EndnoteReference", "EndnoteText", "TableOfAuthorities", "Macro", "ToaHeading", "List", "ListBullet", "ListNumber", "List2", "List3", "List4", "List5", "ListBullet2", "ListBullet3", "ListBullet4", "ListBullet5", "ListNumber2", "ListNumber3", "ListNumber4", "ListNumber5", "Title", "Closing", "Signature", "DefaultParagraphFont", "BodyText", "BodyTextInd", "ListContinue", "ListContinue2", "ListContinue3", "ListContinue4", "ListContinue5", "MessageHeader", "Subtitle", "Salutation", "Date", "BodyText1I", "BodyText1I2", "NoteHeading", "BodyText2", "BodyText3", "BodyTextInd2", "BodyTextInd3", "BlockText", "Hyperlink", "FollowedHyperlink", "Strong", "Emphasis", "DocumentMap", "PlainText", "EmailSignature", "HtmlTopOfForm", "HtmlBottomOfForm", "NormalWeb", "HtmlAcronym", "HtmlAddress", "HtmlCite", "HtmlCode", "HtmlDefinition", "HtmlKeyboard", "HtmlPreformatted", "HtmlSample", "HtmlTypewriter", "HtmlVariable", "TableNormal", "CommentSubject", "NoList", "OutlineList1", "OutlineList2", "OutlineList3", "TableSimple1", "TableSimple2", "TableSimple3", "TableClassic1", "TableClassic2", "TableClassic3", "TableClassic4", "TableColorful1", "TableColorful2", "TableColorful3", "TableColumns1", "TableColumns2", "TableColumns3", "TableColumns4", "TableColumns5", "TableGrid1", "TableGrid2", "TableGrid3", "TableGrid4", "TableGrid5", "TableGrid6", "TableGrid7", "TableGrid8", "TableList1", "TableList2", "TableList3", "TableList4", "TableList5", "TableList6", "TableList7", "TableList8", "Table3DEffects1", "Table3DEffects2", "Table3DEffects3", "TableContemporary", "TableElegant", "TableProfessional", "TableSubtle1", "TableSubtle2", "TableWeb1", "TableWeb2", "TableWeb3", "BalloonText", "TableGrid", "TableTheme", "PlaceholderText", "NoSpacing", "LightShading", "LightList", "LightGrid", "MediumShading1", "MediumShading2", "MediumList1", "MediumList2", "MediumGrid1", "MediumGrid2", "MediumGrid3", "DarkList", "ColorfulShading", "ColorfulList", "ColorfulGrid", "LightShadingAccent1", "LightListAccent1", "LightGridAccent1", "MediumShading1Accent1", "MediumShading2Accent1", "MediumList1Accent1", "Revision", "ListParagraph", "Quote", "IntenseQuote", "MediumList2Accent1", "MediumGrid1Accent1", "MediumGrid2Accent1", "MediumGrid3Accent1", "DarkListAccent1", "ColorfulShadingAccent1", "ColorfulListAccent1", "ColorfulGridAccent1", "LightShadingAccent2", "LightListAccent2", "LightGridAccent2", "MediumShading1Accent2", "MediumShading2Accent2", "MediumList1Accent2", "MediumList2Accent2", "MediumGrid1Accent2", "MediumGrid2Accent2", "MediumGrid3Accent2", "DarkListAccent2", "ColorfulShadingAccent2", "ColorfulListAccent2", "ColorfulGridAccent2", "LightShadingAccent3", "LightListAccent3", "LightGridAccent3", "MediumShading1Accent3", "MediumShading2Accent3", "MediumList1Accent3", "MediumList2Accent3", "MediumGrid1Accent3", "MediumGrid2Accent3", "MediumGrid3Accent3", "DarkListAccent3", "ColorfulShadingAccent3", "ColorfulListAccent3", "ColorfulGridAccent3", "LightShadingAccent4", "LightListAccent4", "LightGridAccent4", "MediumShading1Accent4", "MediumShading2Accent4", "MediumList1Accent4", "MediumList2Accent4", "MediumGrid1Accent4", "MediumGrid2Accent4", "MediumGrid3Accent4", "DarkListAccent4", "ColorfulShadingAccent4", "ColorfulListAccent4", "ColorfulGridAccent4", "LightShadingAccent5", "LightListAccent5", "LightGridAccent5", "MediumShading1Accent5", "MediumShading2Accent5", "MediumList1Accent5", "MediumList2Accent5", "MediumGrid1Accent5", "MediumGrid2Accent5", "MediumGrid3Accent5", "DarkListAccent5", "ColorfulShadingAccent5", "ColorfulListAccent5", "ColorfulGridAccent5", "LightShadingAccent6", "LightListAccent6", "LightGridAccent6", "MediumShading1Accent6", "MediumShading2Accent6", "MediumList1Accent6", "MediumList2Accent6", "MediumGrid1Accent6", "MediumGrid2Accent6", "MediumGrid3Accent6", "DarkListAccent6", "ColorfulShadingAccent6", "ColorfulListAccent6", "ColorfulGridAccent6", "SubtleEmphasis", "IntenseEmphasis", "SubtleReference", "IntenseReference", "BookTitle", "Bibliography", "TocHeading", "PlainTable1", "PlainTable2", "PlainTable3", "PlainTable4", "PlainTable5", "TableGridLight", "GridTable1Light", "GridTable2", "GridTable3", "GridTable4", "GridTable5Dark", "GridTable6Colorful", "GridTable7Colorful", "GridTable1LightAccent1", "GridTable2Accent1", "GridTable3Accent1", "GridTable4Accent1", "GridTable5DarkAccent1", "GridTable6ColorfulAccent1", "GridTable7ColorfulAccent1", "GridTable1LightAccent2", "GridTable2Accent2", "GridTable3Accent2", "GridTable4Accent2", "GridTable5DarkAccent2", "GridTable6ColorfulAccent2", "GridTable7ColorfulAccent2", "GridTable1LightAccent3", "GridTable2Accent3", "GridTable3Accent3", "GridTable4Accent3", "GridTable5DarkAccent3", "GridTable6ColorfulAccent3", "GridTable7ColorfulAccent3", "GridTable1LightAccent4", "GridTable2Accent4", "GridTable3Accent4", "GridTable4Accent4", "GridTable5DarkAccent4", "GridTable6ColorfulAccent4", "GridTable7ColorfulAccent4", "GridTable1LightAccent5", "GridTable2Accent5", "GridTable3Accent5", "GridTable4Accent5", "GridTable5DarkAccent5", "GridTable6ColorfulAccent5", "GridTable7ColorfulAccent5", "GridTable1LightAccent6", "GridTable2Accent6", "GridTable3Accent6", "GridTable4Accent6", "GridTable5DarkAccent6", "GridTable6ColorfulAccent6", "GridTable7ColorfulAccent6", "ListTable1Light", "ListTable2", "ListTable3", "ListTable4", "ListTable5Dark", "ListTable6Colorful", "ListTable7Colorful", "ListTable1LightAccent1", "ListTable2Accent1", "ListTable3Accent1", "ListTable4Accent1", "ListTable5DarkAccent1", "ListTable6ColorfulAccent1", "ListTable7ColorfulAccent1", "ListTable1LightAccent2", "ListTable2Accent2", "ListTable3Accent2", "ListTable4Accent2", "ListTable5DarkAccent2", "ListTable6ColorfulAccent2", "ListTable7ColorfulAccent2", "ListTable1LightAccent3", "ListTable2Accent3", "ListTable3Accent3", "ListTable4Accent3", "ListTable5DarkAccent3", "ListTable6ColorfulAccent3", "ListTable7ColorfulAccent3", "ListTable1LightAccent4", "ListTable2Accent4", "ListTable3Accent4", "ListTable4Accent4", "ListTable5DarkAccent4", "ListTable6ColorfulAccent4", "ListTable7ColorfulAccent4", "ListTable1LightAccent5", "ListTable2Accent5", "ListTable3Accent5", "ListTable4Accent5", "ListTable5DarkAccent5", "ListTable6ColorfulAccent5", "ListTable7ColorfulAccent5", "ListTable1LightAccent6", "ListTable2Accent6", "ListTable3Accent6", "ListTable4Accent6", "ListTable5DarkAccent6", "ListTable6ColorfulAccent6", "ListTable7ColorfulAccent6", "User", "Nil"])
|
395
|
+
if style_identifier.to_i == 0
|
396
|
+
unless validator.valid?(style_identifier)
|
397
|
+
raise ArgumentError, "invalid value for 'style_identifier', must be one of #{validator.allowable_values}."
|
398
|
+
end
|
399
|
+
@style_identifier = style_identifier
|
400
|
+
else
|
401
|
+
@style_identifier = validator.allowable_values[style_identifier.to_i]
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
405
|
+
# Checks equality by comparing each attribute.
|
406
|
+
# @param [Object] Object to be compared
|
407
|
+
def ==(other)
|
408
|
+
return true if self.equal?(other)
|
409
|
+
self.class == other.class &&
|
410
|
+
link == other.link &&
|
411
|
+
add_space_between_far_east_and_alpha == other.add_space_between_far_east_and_alpha &&
|
412
|
+
add_space_between_far_east_and_digit == other.add_space_between_far_east_and_digit &&
|
413
|
+
alignment == other.alignment &&
|
414
|
+
bidi == other.bidi &&
|
415
|
+
drop_cap_position == other.drop_cap_position &&
|
416
|
+
first_line_indent == other.first_line_indent &&
|
417
|
+
keep_together == other.keep_together &&
|
418
|
+
keep_with_next == other.keep_with_next &&
|
419
|
+
left_indent == other.left_indent &&
|
420
|
+
line_spacing == other.line_spacing &&
|
421
|
+
line_spacing_rule == other.line_spacing_rule &&
|
422
|
+
lines_to_drop == other.lines_to_drop &&
|
423
|
+
no_space_between_paragraphs_of_same_style == other.no_space_between_paragraphs_of_same_style &&
|
424
|
+
outline_level == other.outline_level &&
|
425
|
+
page_break_before == other.page_break_before &&
|
426
|
+
right_indent == other.right_indent &&
|
427
|
+
space_after == other.space_after &&
|
428
|
+
space_after_auto == other.space_after_auto &&
|
429
|
+
space_before == other.space_before &&
|
430
|
+
space_before_auto == other.space_before_auto &&
|
431
|
+
style_identifier == other.style_identifier &&
|
432
|
+
style_name == other.style_name &&
|
433
|
+
suppress_auto_hyphens == other.suppress_auto_hyphens &&
|
434
|
+
suppress_line_numbers == other.suppress_line_numbers &&
|
435
|
+
widow_control == other.widow_control
|
436
|
+
end
|
437
|
+
|
438
|
+
# @see the `==` method
|
439
|
+
# @param [Object] Object to be compared
|
440
|
+
def eql?(other)
|
441
|
+
self == other
|
442
|
+
end
|
443
|
+
|
444
|
+
# Calculates hash code according to all attributes.
|
445
|
+
# @return [Fixnum] Hash code
|
446
|
+
def hash
|
447
|
+
[link, add_space_between_far_east_and_alpha, add_space_between_far_east_and_digit, alignment, bidi, drop_cap_position, first_line_indent, keep_together, keep_with_next, left_indent, line_spacing, line_spacing_rule, lines_to_drop, no_space_between_paragraphs_of_same_style, outline_level, page_break_before, right_indent, space_after, space_after_auto, space_before, space_before_auto, style_identifier, style_name, suppress_auto_hyphens, suppress_line_numbers, widow_control].hash
|
448
|
+
end
|
449
|
+
|
450
|
+
# Builds the object from hash
|
451
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
452
|
+
# @return [Object] Returns the model itself
|
453
|
+
def build_from_hash(attributes)
|
454
|
+
return nil unless attributes.is_a?(Hash)
|
455
|
+
self.class.swagger_types.each_pair do |key, type|
|
456
|
+
if type =~ /\AArray<(.*)>/i
|
457
|
+
# check to ensure the input is an array given that the the attribute
|
458
|
+
# is documented as an array but the input is not
|
459
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
460
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
461
|
+
end
|
462
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
463
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
464
|
+
end
|
465
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
466
|
+
end
|
467
|
+
|
468
|
+
self
|
469
|
+
end
|
470
|
+
|
471
|
+
# Deserializes the data based on type
|
472
|
+
# @param string type Data type
|
473
|
+
# @param string value Value to be deserialized
|
474
|
+
# @return [Object] Deserialized data
|
475
|
+
def _deserialize(type, value)
|
476
|
+
case type.to_sym
|
477
|
+
when :DateTime
|
478
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
479
|
+
when :Date
|
480
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
481
|
+
when :String
|
482
|
+
value.to_s
|
483
|
+
when :Integer
|
484
|
+
value.to_i
|
485
|
+
when :Float
|
486
|
+
value.to_f
|
487
|
+
when :BOOLEAN
|
488
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
489
|
+
true
|
490
|
+
else
|
491
|
+
false
|
492
|
+
end
|
493
|
+
when :Object
|
494
|
+
# generic object (usually a Hash), return directly
|
495
|
+
value
|
496
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
497
|
+
inner_type = Regexp.last_match[:inner_type]
|
498
|
+
value.map { |v| _deserialize(inner_type, v) }
|
499
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
500
|
+
k_type = Regexp.last_match[:k_type]
|
501
|
+
v_type = Regexp.last_match[:v_type]
|
502
|
+
{}.tap do |hash|
|
503
|
+
value.each do |k, v|
|
504
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
505
|
+
end
|
506
|
+
end
|
507
|
+
else
|
508
|
+
# model
|
509
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
510
|
+
temp_model.build_from_hash(value)
|
511
|
+
end
|
512
|
+
end
|
513
|
+
|
514
|
+
# Returns the string representation of the object
|
515
|
+
# @return [String] String presentation of the object
|
516
|
+
def to_s
|
517
|
+
to_hash.to_s
|
518
|
+
end
|
519
|
+
|
520
|
+
# to_body is an alias to to_hash (backward compatibility)
|
521
|
+
# @return [Hash] Returns the object in the form of hash
|
522
|
+
def to_body
|
523
|
+
to_hash
|
524
|
+
end
|
525
|
+
|
526
|
+
# Returns the object in the form of hash
|
527
|
+
# @return [Hash] Returns the object in the form of hash
|
528
|
+
def to_hash
|
529
|
+
hash = {}
|
530
|
+
self.class.attribute_map.each_pair do |attr, param|
|
531
|
+
value = self.send(attr)
|
532
|
+
next if value.nil?
|
533
|
+
hash[param] = _to_hash(value)
|
534
|
+
end
|
535
|
+
hash
|
536
|
+
end
|
537
|
+
|
538
|
+
# Outputs non-array value in the form of hash
|
539
|
+
# For object, use to_hash. Otherwise, just return the value
|
540
|
+
# @param [Object] value Any valid value
|
541
|
+
# @return [Hash] Returns the value in the form of hash
|
542
|
+
def _to_hash(value)
|
543
|
+
if value.is_a?(Array)
|
544
|
+
value.compact.map { |v| _to_hash(v) }
|
545
|
+
elsif value.is_a?(Hash)
|
546
|
+
{}.tap do |hash|
|
547
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
548
|
+
end
|
549
|
+
elsif value.respond_to? :to_hash
|
550
|
+
value.to_hash
|
551
|
+
else
|
552
|
+
value
|
553
|
+
end
|
554
|
+
end
|
555
|
+
|
556
|
+
end
|
557
|
+
|
558
|
+
end
|