@@ -135,6 +135,13 @@ feature {NONE} -- JSON To Eiffel
135135 Result .set_time_zone (l_time_zone )
136136 end
137137 if attached {JSON_OBJECT } json_value (a_json , " defaultFormat" ) as l_default_format then
138+ Result .set_default_format (cell_format (l_default_format ))
139+ end
140+ if attached {JSON_OBJECT } json_value (a_json , " iterativeCalculationSettings" ) as iterativeCalculationSettings then
141+ -- Result.set_iterative_calculation_settings (a_iterative_calculation_settings: [like iterative_calculation_settings] detachable EG_ITERATIVE_CALCULATION_SETTINGS)
142+ end
143+ if attached {JSON_OBJECT } json_value (a_json , " spreadsheetTheme" ) as spreadsheetTheme then
144+ -- Result.set_spreadsheet_theme (a_theme: [like spreadsheet_theme] detachable EG_SPREADSHEET_THEME)
138145 end
139146 end
140147
@@ -143,15 +150,38 @@ feature {NONE} -- JSON To Eiffel
143150 local
144151 l_vl : EG_VERTICAL_ALIGN
145152 l_ws : EG_WRAP_STRATEGY
153+ l_hl : EG_HORIZONTAL_ALIGN
154+ l_td : EG_TEXT_DIRECTION
155+ l_hyper : EG_HYPERLINK_DISPLAY_TYPE
146156 do
147157 create Result
158+ if attached {JSON_OBJECT } json_value (a_json , " numberFormat" ) as l_number_format then
159+ Result .set_number_format (Void )
160+ end
148161
149162 if attached {JSON_OBJECT } json_value (a_json , " backgroundColor" ) as l_background_color then
150163 Result .set_background_color (eg_color (l_background_color ))
151164 end
165+ if attached {JSON_OBJECT } json_value (a_json , " backgroundColorStyle" ) as l_background_color_style then
166+ Result .set_background_color_style (eg_color_style (l_background_color_style ))
167+ end
168+ if attached {JSON_OBJECT } json_value (a_json , " borders" ) as l_borders then
169+ Result .set_borders (Void )
170+ end
152171 if attached {JSON_OBJECT } json_value (a_json , " padding" ) as l_padding then
153172 Result .set_padding (padding (l_padding ))
154173 end
174+ if attached string_value_from_json (a_json , " horizontalAlignment" ) as l_alignment then
175+ create l_hl
176+ if l_alignment .is_case_insensitive_equal (" LEFT" ) then
177+ l_hl .set_left
178+ elseif l_alignment .is_case_insensitive_equal (" CENTER" ) then
179+ l_hl .set_center
180+ elseif l_alignment .is_case_insensitive_equal (" RIGHT" ) then
181+ l_hl .set_right
182+ end
183+ Result .set_horizontal_alignment (l_hl )
184+ end
155185 if attached string_value_from_json (a_json , " verticalAlignment" ) as l_alignment then
156186 create l_vl
157187 if l_alignment .is_case_insensitive_equal (" BOTTOM" ) then
@@ -177,11 +207,43 @@ feature {NONE} -- JSON To Eiffel
177207 end
178208 Result .set_wrap_strategy (l_ws )
179209 end
210+ if attached string_value_from_json (a_json , " textDirection" ) as l_text_direction then
211+ create l_td
212+ if l_text_direction .is_case_insensitive_equal (" LEFT_TO_RIGHT" ) then
213+ l_td .set_left_to_right
214+ end
215+ if l_text_direction .is_case_insensitive_equal (" RIGHT_TO_LEFT" ) then
216+ l_td .set_right_to_left
217+ end
218+ Result .set_text_direction (l_td )
219+ end
180220 if attached {JSON_OBJECT } json_value (a_json , " textFormat" ) as l_text_format then
181221 Result .set_text_format (text_format (l_text_format ))
182222 end
183- if attached {JSON_OBJECT } json_value (a_json , " backgroundColorStyle" ) as l_background_color_style then
184- Result .set_background_color_style (eg_color_style (l_background_color_style ))
223+ if attached string_value_from_json (a_json , " hyperlinkDisplayType" ) as hyperlink then
224+ create l_hyper
225+ if hyperlink .is_case_insensitive_equal (" LINKED" ) then
226+ l_hyper .set_linked
227+ end
228+ if hyperlink .is_case_insensitive_equal (" PLAIN_TEXT" ) then
229+ l_hyper .set_plain_text
230+ end
231+ Result .set_hyperlink_display_type (l_hyper )
232+ end
233+ if attached {JSON_OBJECT } json_value (a_json , " textRotation" ) as l_text_rotation then
234+ Result .set_text_rotation (text_rotation (l_text_rotation ))
235+ end
236+ end
237+
238+ text_rotation (a_json : JSON_OBJECT ): EG_TEXT_ROTATION
239+ -- Create an object `EG_TEXT_ROTATION` from a json representation.
240+ do
241+ create Result
242+ if attached integer_value_from_json (a_json , " angle" ) as l_val then
243+ Result .set_angle (l_val )
244+ end
245+ if attached boolean_value_from_json (a_json , " vertical" ) as l_val then
246+ Result .set_vertical (l_val )
185247 end
186248 end
187249
0 commit comments