lib/write_xlsx/worksheet.rb in write_xlsx-1.10.0 vs lib/write_xlsx/worksheet.rb in write_xlsx-1.10.1

- old
+ new

@@ -271,27 +271,27 @@ @protected_ranges << [range, range_name, password] end def protect_default_settings # :nodoc: { - :sheet => true, - :content => false, - :objects => false, - :scenarios => false, - :format_cells => false, - :format_columns => false, - :format_rows => false, - :insert_columns => false, - :insert_rows => false, - :insert_hyperlinks => false, - :delete_columns => false, - :delete_rows => false, - :select_locked_cells => true, - :sort => false, - :autofilter => false, - :pivot_tables => false, - :select_unlocked_cells => true + sheet: true, + content: false, + objects: false, + scenarios: false, + format_cells: false, + format_columns: false, + format_rows: false, + insert_columns: false, + insert_rows: false, + insert_hyperlinks: false, + delete_columns: false, + delete_rows: false, + select_locked_cells: true, + sort: false, + autofilter: false, + pivot_tables: false, + select_unlocked_cells: true } end private :protect_default_settings # @@ -1293,11 +1293,11 @@ def write_array_formula_base(type, *args) # Check for a cell reference in A1 notation and substitute row and column # Convert single cell to range if args.first.to_s =~ /^([A-Za-z]+[0-9]+)$/ range = "#{::Regexp.last_match(1)}:#{::Regexp.last_match(1)}" - params = [range] + args[1..] + params = [range] + args[1..-1] else params = args end row1, col1, row2, col2, formula, xf, value = row_col_notation(params) @@ -2985,11 +2985,11 @@ button_number = 1 + @buttons_array.size # Set the button caption. caption = params[:caption] || "Button #{button_number}" - button.font = { :_caption => caption } + button.font = { _caption: caption } # Set the macro name. button.macro = if params[:macro] "[0]!#{params[:macro]}" else @@ -4410,18 +4410,18 @@ ignore = @ignore_errors @writer.tag_elements('ignoredErrors') do { - :number_stored_as_text => 'numberStoredAsText', - :eval_error => 'evalError', - :formula_differs => 'formula', - :formula_range => 'formulaRange', - :formula_unlocked => 'unlockedFormula', - :empty_cell_reference => 'emptyCellReference', - :list_data_validation => 'listDataValidation', - :calculated_column => 'calculatedColumn', - :two_digit_text_year => 'twoDigitTextYear' + number_stored_as_text: 'numberStoredAsText', + eval_error: 'evalError', + formula_differs: 'formula', + formula_range: 'formulaRange', + formula_unlocked: 'unlockedFormula', + empty_cell_reference: 'emptyCellReference', + list_data_validation: 'listDataValidation', + calculated_column: 'calculatedColumn', + two_digit_text_year: 'twoDigitTextYear' }.each do |key, value| write_ignored_error(value, ignore[key]) if ignore[key] end end end