diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-09 16:55:57 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-09 16:55:57 +0200 |
| commit | c77a48805c17d36c4503df8cf0fe75e7b620e2d4 (patch) | |
| tree | 05f26df0b6d75846d0868d4bd6d4ad090ea1073c /lib/axlsx | |
| parent | 3befab6f5713c537f6b90b51c02882273c7f7cc9 (diff) | |
| download | caxlsx-c77a48805c17d36c4503df8cf0fe75e7b620e2d4.tar.gz caxlsx-c77a48805c17d36c4503df8cf0fe75e7b620e2d4.zip | |
Fix offenses related to indentation consistency
Diffstat (limited to 'lib/axlsx')
25 files changed, 157 insertions, 157 deletions
diff --git a/lib/axlsx/content_type/abstract_content_type.rb b/lib/axlsx/content_type/abstract_content_type.rb index 023c9086..45bd4853 100644 --- a/lib/axlsx/content_type/abstract_content_type.rb +++ b/lib/axlsx/content_type/abstract_content_type.rb @@ -6,7 +6,7 @@ module Axlsx # Initializes an abstract content type # @see Default, Override def initialize(options = {}) - parse_options options + parse_options options end # The type of content. diff --git a/lib/axlsx/drawing/axis.rb b/lib/axlsx/drawing/axis.rb index 89915b68..9ca03fb1 100644 --- a/lib/axlsx/drawing/axis.rb +++ b/lib/axlsx/drawing/axis.rb @@ -91,8 +91,8 @@ module Axlsx # The crossing axis for this axis # @param [Axis] axis def cross_axis=(axis) - DataTypeValidator.validate "#{self.class}.cross_axis", [Axis], axis - @cross_axis = axis + DataTypeValidator.validate "#{self.class}.cross_axis", [Axis], axis + @cross_axis = axis end # The position of the axis diff --git a/lib/axlsx/drawing/bar_3D_chart.rb b/lib/axlsx/drawing/bar_3D_chart.rb index f8dca9ad..6ec95d8d 100644 --- a/lib/axlsx/drawing/bar_3D_chart.rb +++ b/lib/axlsx/drawing/bar_3D_chart.rb @@ -139,7 +139,7 @@ module Axlsx # category axes specified via axes[:val_axes] and axes[:cat_axis] # @return [Axes] def axes - @axes ||= Axes.new(:cat_axis => CatAxis, :val_axis => ValAxis) + @axes ||= Axes.new(:cat_axis => CatAxis, :val_axis => ValAxis) end end end diff --git a/lib/axlsx/drawing/bar_chart.rb b/lib/axlsx/drawing/bar_chart.rb index 51046533..f77eb7c1 100644 --- a/lib/axlsx/drawing/bar_chart.rb +++ b/lib/axlsx/drawing/bar_chart.rb @@ -129,7 +129,7 @@ module Axlsx # category axes specified via axes[:val_axes] and axes[:cat_axis] # @return [Axes] def axes - @axes ||= Axes.new(:cat_axis => CatAxis, :val_axis => ValAxis) + @axes ||= Axes.new(:cat_axis => CatAxis, :val_axis => ValAxis) end end end diff --git a/lib/axlsx/drawing/bubble_chart.rb b/lib/axlsx/drawing/bubble_chart.rb index edd1a9b5..084d0477 100644 --- a/lib/axlsx/drawing/bubble_chart.rb +++ b/lib/axlsx/drawing/bubble_chart.rb @@ -24,7 +24,7 @@ module Axlsx def initialize(frame, options = {}) @vary_colors = 0 - super(frame, options) + super(frame, options) @series_type = BubbleSeries @d_lbls = nil parse_options options diff --git a/lib/axlsx/drawing/line_3D_chart.rb b/lib/axlsx/drawing/line_3D_chart.rb index d45a417f..85d04b06 100644 --- a/lib/axlsx/drawing/line_3D_chart.rb +++ b/lib/axlsx/drawing/line_3D_chart.rb @@ -52,13 +52,13 @@ module Axlsx end alias :gapDepth= :gap_depth= - # Serializes the object - # @param [String] str - # @return [String] - def to_xml_string(str = '') - super(str) do - str << ('<c:gapDepth val="' << @gap_depth.to_s << '"/>') unless @gap_depth.nil? - end + # Serializes the object + # @param [String] str + # @return [String] + def to_xml_string(str = '') + super(str) do + str << ('<c:gapDepth val="' << @gap_depth.to_s << '"/>') unless @gap_depth.nil? end + end end end diff --git a/lib/axlsx/drawing/scatter_chart.rb b/lib/axlsx/drawing/scatter_chart.rb index e43647a0..b118a09a 100644 --- a/lib/axlsx/drawing/scatter_chart.rb +++ b/lib/axlsx/drawing/scatter_chart.rb @@ -31,7 +31,7 @@ module Axlsx @vary_colors = 0 @scatter_style = :lineMarker - super(frame, options) + super(frame, options) @series_type = ScatterSeries @d_lbls = nil parse_options options diff --git a/lib/axlsx/drawing/title.rb b/lib/axlsx/drawing/title.rb index 1a43ba80..e1b0d7f8 100644 --- a/lib/axlsx/drawing/title.rb +++ b/lib/axlsx/drawing/title.rb @@ -84,14 +84,14 @@ module Axlsx str << '</c:strRef>' else str << '<c:rich>' - str << '<a:bodyPr/>' - str << '<a:lstStyle/>' - str << '<a:p>' - str << '<a:r>' - str << ('<a:rPr sz="' << @text_size.to_s << '"/>') - str << ('<a:t>' << clean_value << '</a:t>') - str << '</a:r>' - str << '</a:p>' + str << '<a:bodyPr/>' + str << '<a:lstStyle/>' + str << '<a:p>' + str << '<a:r>' + str << ('<a:rPr sz="' << @text_size.to_s << '"/>') + str << ('<a:t>' << clean_value << '</a:t>') + str << '</a:r>' + str << '</a:p>' str << '</c:rich>' end str << '</c:tx>' diff --git a/lib/axlsx/drawing/view_3D.rb b/lib/axlsx/drawing/view_3D.rb index 23bd4952..86a2ab2f 100644 --- a/lib/axlsx/drawing/view_3D.rb +++ b/lib/axlsx/drawing/view_3D.rb @@ -61,33 +61,33 @@ module Axlsx end alias :rotX= :rot_x= - # @see h_percent - def h_percent=(v) - RegexValidator.validate "#{self.class}.h_percent", H_PERCENT_REGEX, v - @h_percent = v - end + # @see h_percent + def h_percent=(v) + RegexValidator.validate "#{self.class}.h_percent", H_PERCENT_REGEX, v + @h_percent = v + end alias :hPercent= :h_percent= - # @see rot_y - def rot_y=(v) - RangeValidator.validate "View3D.rot_y", 0, 360, v - @rot_y = v - end + # @see rot_y + def rot_y=(v) + RangeValidator.validate "View3D.rot_y", 0, 360, v + @rot_y = v + end alias :rotY= :rot_y= - # @see depth_percent - def depth_percent=(v) RegexValidator.validate "#{self.class}.depth_percent", DEPTH_PERCENT_REGEX, v; @depth_percent = v; end + # @see depth_percent + def depth_percent=(v) RegexValidator.validate "#{self.class}.depth_percent", DEPTH_PERCENT_REGEX, v; @depth_percent = v; end alias :depthPercent= :depth_percent= - # @see r_ang_ax - def r_ang_ax=(v) Axlsx::validate_boolean(v); @r_ang_ax = v; end + # @see r_ang_ax + def r_ang_ax=(v) Axlsx::validate_boolean(v); @r_ang_ax = v; end alias :rAngAx= :r_ang_ax= - # @see perspective - def perspective=(v) - RangeValidator.validate "View3D.perspective", 0, 240, v - @perspective = v - end + # @see perspective + def perspective=(v) + RangeValidator.validate "View3D.perspective", 0, 240, v + @perspective = v + end # DataTypeValidator.validate "#{self.class}.perspective", [Integer], v, lambda {|arg| arg >= 0 && arg <= 240 }; @perspective = v; end diff --git a/lib/axlsx/drawing/vml_shape.rb b/lib/axlsx/drawing/vml_shape.rb index 2ba388b3..fd335d95 100644 --- a/lib/axlsx/drawing/vml_shape.rb +++ b/lib/axlsx/drawing/vml_shape.rb @@ -36,7 +36,7 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = '') -str << <<SHAME_ON_YOU + str << <<SHAME_ON_YOU <v:shape id="#{@id}" type="#_x0000_t202" fillcolor="#ffffa1 [80]" o:insetmode="auto" style="visibility:#{@visible ? 'visible' : 'hidden'}"> diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb index ecab1c3d..fcb80cdc 100644 --- a/lib/axlsx/package.rb +++ b/lib/axlsx/package.rb @@ -312,8 +312,8 @@ module Axlsx workbook.comments.each do |comment| if comment.size > 0 - c_types << Axlsx::Override.new(:PartName => "/xl/#{comment.pn}", - :ContentType => COMMENT_CT) + c_types << Axlsx::Override.new(:PartName => "/xl/#{comment.pn}", + :ContentType => COMMENT_CT) end end diff --git a/lib/axlsx/rels/relationships.rb b/lib/axlsx/rels/relationships.rb index 686059fb..71c4bf1e 100644 --- a/lib/axlsx/rels/relationships.rb +++ b/lib/axlsx/rels/relationships.rb @@ -1,5 +1,5 @@ module Axlsx -require 'axlsx/rels/relationship.rb' + require 'axlsx/rels/relationship.rb' # Relationships are a collection of Relations that define how package parts are related. # @note The package automatically manages releationships. diff --git a/lib/axlsx/stylesheet/gradient_fill.rb b/lib/axlsx/stylesheet/gradient_fill.rb index dc4e562b..f90a15d6 100644 --- a/lib/axlsx/stylesheet/gradient_fill.rb +++ b/lib/axlsx/stylesheet/gradient_fill.rb @@ -66,8 +66,8 @@ module Axlsx # @see right def right=(v) - validate_format_percentage "GradientFill.right", v - @right = v + validate_format_percentage "GradientFill.right", v + @right = v end # @see top diff --git a/lib/axlsx/util/storage.rb b/lib/axlsx/util/storage.rb index c2f0739c..4932c93c 100644 --- a/lib/axlsx/util/storage.rb +++ b/lib/axlsx/util/storage.rb @@ -15,17 +15,17 @@ module Axlsx # Creates a byte string for this storage # @return [String] def to_s - data = [@name.concat(Array.new(32 - @name.size, 0)), - @name_size, - @type, - @color, - @left, - @right, - @child, - @created, - @modified, - @sector, - @size].flatten + data = [@name.concat(Array.new(32 - @name.size, 0)), + @name_size, + @type, + @color, + @left, + @right, + @child, + @created, + @modified, + @sector, + @size].flatten data.pack(PACKING) end diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index 99099f60..b6877a48 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -54,7 +54,7 @@ module Axlsx # @see validate_boolean def self.validate(name, types, v, other = false) if other.is_a?(Proc) - raise ArgumentError, (ERR_TYPE % [v.inspect, name, types.inspect]) unless other.call(v) + raise ArgumentError, (ERR_TYPE % [v.inspect, name, types.inspect]) unless other.call(v) end v_class = v.is_a?(Class) ? v : v.class Array(types).each do |t| diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index 73388718..567a0598 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -1,63 +1,63 @@ module Axlsx -require 'axlsx/workbook/worksheet/sheet_calc_pr.rb' -require 'axlsx/workbook/worksheet/auto_filter/auto_filter.rb' -require 'axlsx/workbook/worksheet/date_time_converter.rb' -require 'axlsx/workbook/worksheet/protected_range.rb' -require 'axlsx/workbook/worksheet/protected_ranges.rb' -require 'axlsx/workbook/worksheet/rich_text_run' -require 'axlsx/workbook/worksheet/rich_text' -require 'axlsx/workbook/worksheet/cell_serializer.rb' -require 'axlsx/workbook/worksheet/cell.rb' -require 'axlsx/workbook/worksheet/page_margins.rb' -require 'axlsx/workbook/worksheet/page_set_up_pr.rb' -require 'axlsx/workbook/worksheet/outline_pr.rb' -require 'axlsx/workbook/worksheet/page_setup.rb' -require 'axlsx/workbook/worksheet/header_footer.rb' -require 'axlsx/workbook/worksheet/print_options.rb' -require 'axlsx/workbook/worksheet/cfvo.rb' -require 'axlsx/workbook/worksheet/cfvos.rb' -require 'axlsx/workbook/worksheet/color_scale.rb' -require 'axlsx/workbook/worksheet/data_bar.rb' -require 'axlsx/workbook/worksheet/icon_set.rb' -require 'axlsx/workbook/worksheet/conditional_formatting.rb' -require 'axlsx/workbook/worksheet/conditional_formatting_rule.rb' -require 'axlsx/workbook/worksheet/conditional_formattings.rb' -require 'axlsx/workbook/worksheet/row.rb' -require 'axlsx/workbook/worksheet/col.rb' -require 'axlsx/workbook/worksheet/cols.rb' -require 'axlsx/workbook/worksheet/comments.rb' -require 'axlsx/workbook/worksheet/comment.rb' -require 'axlsx/workbook/worksheet/merged_cells.rb' -require 'axlsx/workbook/worksheet/sheet_protection.rb' -require 'axlsx/workbook/worksheet/sheet_pr.rb' -require 'axlsx/workbook/worksheet/dimension.rb' -require 'axlsx/workbook/worksheet/sheet_data.rb' -require 'axlsx/workbook/worksheet/worksheet_drawing.rb' -require 'axlsx/workbook/worksheet/worksheet_comments.rb' -require 'axlsx/workbook/worksheet/worksheet_hyperlink' -require 'axlsx/workbook/worksheet/worksheet_hyperlinks' -require 'axlsx/workbook/worksheet/break' -require 'axlsx/workbook/worksheet/row_breaks' -require 'axlsx/workbook/worksheet/col_breaks' -require 'axlsx/workbook/workbook_view' -require 'axlsx/workbook/workbook_views' - -require 'axlsx/workbook/worksheet/worksheet.rb' -require 'axlsx/workbook/shared_strings_table.rb' -require 'axlsx/workbook/defined_name.rb' -require 'axlsx/workbook/defined_names.rb' -require 'axlsx/workbook/worksheet/table_style_info.rb' -require 'axlsx/workbook/worksheet/table.rb' -require 'axlsx/workbook/worksheet/tables.rb' -require 'axlsx/workbook/worksheet/pivot_table_cache_definition.rb' -require 'axlsx/workbook/worksheet/pivot_table.rb' -require 'axlsx/workbook/worksheet/pivot_tables.rb' -require 'axlsx/workbook/worksheet/data_validation.rb' -require 'axlsx/workbook/worksheet/data_validations.rb' -require 'axlsx/workbook/worksheet/sheet_view.rb' -require 'axlsx/workbook/worksheet/sheet_format_pr.rb' -require 'axlsx/workbook/worksheet/pane.rb' -require 'axlsx/workbook/worksheet/selection.rb' + require 'axlsx/workbook/worksheet/sheet_calc_pr.rb' + require 'axlsx/workbook/worksheet/auto_filter/auto_filter.rb' + require 'axlsx/workbook/worksheet/date_time_converter.rb' + require 'axlsx/workbook/worksheet/protected_range.rb' + require 'axlsx/workbook/worksheet/protected_ranges.rb' + require 'axlsx/workbook/worksheet/rich_text_run' + require 'axlsx/workbook/worksheet/rich_text' + require 'axlsx/workbook/worksheet/cell_serializer.rb' + require 'axlsx/workbook/worksheet/cell.rb' + require 'axlsx/workbook/worksheet/page_margins.rb' + require 'axlsx/workbook/worksheet/page_set_up_pr.rb' + require 'axlsx/workbook/worksheet/outline_pr.rb' + require 'axlsx/workbook/worksheet/page_setup.rb' + require 'axlsx/workbook/worksheet/header_footer.rb' + require 'axlsx/workbook/worksheet/print_options.rb' + require 'axlsx/workbook/worksheet/cfvo.rb' + require 'axlsx/workbook/worksheet/cfvos.rb' + require 'axlsx/workbook/worksheet/color_scale.rb' + require 'axlsx/workbook/worksheet/data_bar.rb' + require 'axlsx/workbook/worksheet/icon_set.rb' + require 'axlsx/workbook/worksheet/conditional_formatting.rb' + require 'axlsx/workbook/worksheet/conditional_formatting_rule.rb' + require 'axlsx/workbook/worksheet/conditional_formattings.rb' + require 'axlsx/workbook/worksheet/row.rb' + require 'axlsx/workbook/worksheet/col.rb' + require 'axlsx/workbook/worksheet/cols.rb' + require 'axlsx/workbook/worksheet/comments.rb' + require 'axlsx/workbook/worksheet/comment.rb' + require 'axlsx/workbook/worksheet/merged_cells.rb' + require 'axlsx/workbook/worksheet/sheet_protection.rb' + require 'axlsx/workbook/worksheet/sheet_pr.rb' + require 'axlsx/workbook/worksheet/dimension.rb' + require 'axlsx/workbook/worksheet/sheet_data.rb' + require 'axlsx/workbook/worksheet/worksheet_drawing.rb' + require 'axlsx/workbook/worksheet/worksheet_comments.rb' + require 'axlsx/workbook/worksheet/worksheet_hyperlink' + require 'axlsx/workbook/worksheet/worksheet_hyperlinks' + require 'axlsx/workbook/worksheet/break' + require 'axlsx/workbook/worksheet/row_breaks' + require 'axlsx/workbook/worksheet/col_breaks' + require 'axlsx/workbook/workbook_view' + require 'axlsx/workbook/workbook_views' + + require 'axlsx/workbook/worksheet/worksheet.rb' + require 'axlsx/workbook/shared_strings_table.rb' + require 'axlsx/workbook/defined_name.rb' + require 'axlsx/workbook/defined_names.rb' + require 'axlsx/workbook/worksheet/table_style_info.rb' + require 'axlsx/workbook/worksheet/table.rb' + require 'axlsx/workbook/worksheet/tables.rb' + require 'axlsx/workbook/worksheet/pivot_table_cache_definition.rb' + require 'axlsx/workbook/worksheet/pivot_table.rb' + require 'axlsx/workbook/worksheet/pivot_tables.rb' + require 'axlsx/workbook/worksheet/data_validation.rb' + require 'axlsx/workbook/worksheet/data_validations.rb' + require 'axlsx/workbook/worksheet/sheet_view.rb' + require 'axlsx/workbook/worksheet/sheet_format_pr.rb' + require 'axlsx/workbook/worksheet/pane.rb' + require 'axlsx/workbook/worksheet/selection.rb' # The Workbook class is an xlsx workbook that manages worksheets, charts, drawings and styles. # The following parts of the Office Open XML spreadsheet specification are not implimented in this version. # @@ -346,7 +346,7 @@ require 'axlsx/workbook/worksheet/selection.rb' end r << Relationship.new(self, STYLES_R, STYLES_PN) if use_shared_strings - r << Relationship.new(self, SHARED_STRINGS_R, SHARED_STRINGS_PN) + r << Relationship.new(self, SHARED_STRINGS_R, SHARED_STRINGS_PN) end r end diff --git a/lib/axlsx/workbook/workbook_view.rb b/lib/axlsx/workbook/workbook_view.rb index 5b6d5bfb..27a46dcc 100644 --- a/lib/axlsx/workbook/workbook_view.rb +++ b/lib/axlsx/workbook/workbook_view.rb @@ -67,9 +67,9 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = '') - str << '<workbookView ' - serialized_attributes str - str << '></workbookView>' + str << '<workbookView ' + serialized_attributes str + str << '></workbookView>' end end end diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb index 48f78038..e731dab2 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb @@ -130,7 +130,7 @@ module Axlsx # types, can be correctly compared for the purposes of filtering. class DateGroupItem include Axlsx::OptionsParser -include Axlsx::SerializedAttributes + include Axlsx::SerializedAttributes # Creates a new DateGroupItem # @param [Hash] options A hash of options to use when diff --git a/lib/axlsx/workbook/worksheet/cols.rb b/lib/axlsx/workbook/worksheet/cols.rb index 5b808b54..27b1f508 100644 --- a/lib/axlsx/workbook/worksheet/cols.rb +++ b/lib/axlsx/workbook/worksheet/cols.rb @@ -13,11 +13,11 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = '') - return if empty? + return if empty? - str << '<cols>' - each { |item| item.to_xml_string(str) } - str << '</cols>' + str << '<cols>' + each { |item| item.to_xml_string(str) } + str << '</cols>' end end end diff --git a/lib/axlsx/workbook/worksheet/comment.rb b/lib/axlsx/workbook/worksheet/comment.rb index 80ea8c4b..aa35feef 100644 --- a/lib/axlsx/workbook/worksheet/comment.rb +++ b/lib/axlsx/workbook/worksheet/comment.rb @@ -83,7 +83,7 @@ module Axlsx vml.left_column = vml.column vml.right_column = vml.column + 2 vml.top_row = vml.row - vml.bottom_row = vml.row + 4 + vml.bottom_row = vml.row + 4 end end end diff --git a/lib/axlsx/workbook/worksheet/conditional_formatting.rb b/lib/axlsx/workbook/worksheet/conditional_formatting.rb index c13113a5..419e6684 100644 --- a/lib/axlsx/workbook/worksheet/conditional_formatting.rb +++ b/lib/axlsx/workbook/worksheet/conditional_formatting.rb @@ -5,7 +5,7 @@ module Axlsx # @see Worksheet#add_conditional_formatting # @see ConditionalFormattingRule class ConditionalFormatting - include Axlsx::OptionsParser + include Axlsx::OptionsParser # Creates a new {ConditionalFormatting} object # @option options [Array] rules The rules to apply diff --git a/lib/axlsx/workbook/worksheet/data_bar.rb b/lib/axlsx/workbook/worksheet/data_bar.rb index 1ff65fd5..c9f99dcc 100644 --- a/lib/axlsx/workbook/worksheet/data_bar.rb +++ b/lib/axlsx/workbook/worksheet/data_bar.rb @@ -80,27 +80,27 @@ module Axlsx end alias :minLength= :min_length= - # @see maxLength - def max_length=(v) - Axlsx.validate_unsigned_int(v) - @max_length = v - end + # @see maxLength + def max_length=(v) + Axlsx.validate_unsigned_int(v) + @max_length = v + end alias :maxLength= :max_length= - # @see showValue - def show_value=(v) - Axlsx.validate_boolean(v) - @show_value = v - end + # @see showValue + def show_value=(v) + Axlsx.validate_boolean(v) + @show_value = v + end alias :showValue= :show_value= - # Sets the color for the data bars. - # @param [Color|String] v The color object, or rgb string value to apply - def color=(v) - @color = v if v.is_a? Color - self.color.rgb = v if v.is_a? String - @color - end + # Sets the color for the data bars. + # @param [Color|String] v The color object, or rgb string value to apply + def color=(v) + @color = v if v.is_a? Color + self.color.rgb = v if v.is_a? String + @color + end # Serialize this object to an xml string # @param [String] str diff --git a/lib/axlsx/workbook/worksheet/page_setup.rb b/lib/axlsx/workbook/worksheet/page_setup.rb index 07dd6817..6b07466e 100644 --- a/lib/axlsx/workbook/worksheet/page_setup.rb +++ b/lib/axlsx/workbook/worksheet/page_setup.rb @@ -17,7 +17,7 @@ module Axlsx # @option options [Integer] scale Print scaling (percent value, integer ranging from 10 to 400) # @option options [Integer] paper_size - the size of paper to use def initialize(options = {}) - parse_options options + parse_options options end serializable_attributes :fit_to_height, :fit_to_width, :orientation, :paper_height, :paper_width, :scale, :paper_size diff --git a/lib/axlsx/workbook/worksheet/protected_ranges.rb b/lib/axlsx/workbook/worksheet/protected_ranges.rb index aa627315..75b3aee5 100644 --- a/lib/axlsx/workbook/worksheet/protected_ranges.rb +++ b/lib/axlsx/workbook/worksheet/protected_ranges.rb @@ -14,13 +14,13 @@ module Axlsx # Adds a protected range # @param [Array|String] cells A string range reference or array of cells that will be protected def add_range(cells) - sqref = if cells.is_a?(String) - cells - elsif cells.is_a?(SimpleTypedList) || cells.is_a?(Array) - Axlsx::cell_range(cells, false) - end - self << ProtectedRange.new(:sqref => sqref, :name => "Range#{size}") - last + sqref = if cells.is_a?(String) + cells + elsif cells.is_a?(SimpleTypedList) || cells.is_a?(Array) + Axlsx::cell_range(cells, false) + end + self << ProtectedRange.new(:sqref => sqref, :name => "Range#{size}") + last end # Serializes the protected ranges diff --git a/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb b/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb index 58f630d4..d692d461 100644 --- a/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb +++ b/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb @@ -2,9 +2,9 @@ module Axlsx # the SheetCalcPr object for the worksheet # This object contains calculation properties for the worksheet. class SheetCalcPr - include Axlsx::OptionsParser - include Axlsx::SerializedAttributes - include Axlsx::Accessors + include Axlsx::OptionsParser + include Axlsx::SerializedAttributes + include Axlsx::Accessors # creates a new SheetCalcPr # @param [Hash] options Options for this object # @option [Boolean] full_calc_on_load @see full_calc_on_load |
