summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-09 16:55:57 +0200
committerGeremia Taglialatela <[email protected]>2023-04-09 16:55:57 +0200
commitc77a48805c17d36c4503df8cf0fe75e7b620e2d4 (patch)
tree05f26df0b6d75846d0868d4bd6d4ad090ea1073c
parent3befab6f5713c537f6b90b51c02882273c7f7cc9 (diff)
downloadcaxlsx-c77a48805c17d36c4503df8cf0fe75e7b620e2d4.tar.gz
caxlsx-c77a48805c17d36c4503df8cf0fe75e7b620e2d4.zip
Fix offenses related to indentation consistency
-rw-r--r--.rubocop_todo.yml13
-rw-r--r--lib/axlsx/content_type/abstract_content_type.rb2
-rw-r--r--lib/axlsx/drawing/axis.rb4
-rw-r--r--lib/axlsx/drawing/bar_3D_chart.rb2
-rw-r--r--lib/axlsx/drawing/bar_chart.rb2
-rw-r--r--lib/axlsx/drawing/bubble_chart.rb2
-rw-r--r--lib/axlsx/drawing/line_3D_chart.rb14
-rw-r--r--lib/axlsx/drawing/scatter_chart.rb2
-rw-r--r--lib/axlsx/drawing/title.rb16
-rw-r--r--lib/axlsx/drawing/view_3D.rb38
-rw-r--r--lib/axlsx/drawing/vml_shape.rb2
-rw-r--r--lib/axlsx/package.rb4
-rw-r--r--lib/axlsx/rels/relationships.rb2
-rw-r--r--lib/axlsx/stylesheet/gradient_fill.rb4
-rw-r--r--lib/axlsx/util/storage.rb22
-rw-r--r--lib/axlsx/util/validators.rb2
-rw-r--r--lib/axlsx/workbook/workbook.rb120
-rw-r--r--lib/axlsx/workbook/workbook_view.rb6
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/filters.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/cols.rb8
-rw-r--r--lib/axlsx/workbook/worksheet/comment.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/conditional_formatting.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/data_bar.rb34
-rw-r--r--lib/axlsx/workbook/worksheet/page_setup.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/protected_ranges.rb14
-rw-r--r--lib/axlsx/workbook/worksheet/sheet_calc_pr.rb6
-rw-r--r--test/drawing/tc_bar_3D_chart.rb10
-rw-r--r--test/drawing/tc_bar_chart.rb10
-rw-r--r--test/drawing/tc_d_lbls.rb16
-rw-r--r--test/drawing/tc_data_source.rb4
-rw-r--r--test/drawing/tc_drawing.rb4
-rw-r--r--test/drawing/tc_line_3d_chart.rb20
-rw-r--r--test/stylesheet/tc_table_style_element.rb2
-rw-r--r--test/util/tc_validators.rb8
-rw-r--r--test/workbook/worksheet/auto_filter/tc_filter_column.rb4
-rw-r--r--test/workbook/worksheet/tc_data_validation.rb4
-rw-r--r--test/workbook/worksheet/tc_outline_pr.rb24
-rw-r--r--test/workbook/worksheet/tc_page_set_up_pr.rb18
-rw-r--r--test/workbook/worksheet/tc_pane.rb2
-rw-r--r--test/workbook/worksheet/tc_protected_range.rb22
-rw-r--r--test/workbook/worksheet/tc_sheet_format_pr.rb24
-rw-r--r--test/workbook/worksheet/tc_sheet_view.rb4
-rw-r--r--test/workbook/worksheet/tc_table_style_info.rb4
-rw-r--r--test/workbook/worksheet/tc_worksheet.rb2
44 files changed, 248 insertions, 261 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 0679bf1a..fc019a48 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -62,19 +62,6 @@ Layout/HeredocIndentation:
- 'lib/axlsx/drawing/vml_drawing.rb'
- 'lib/axlsx/drawing/vml_shape.rb'
-# Offense count: 48
-# This cop supports safe autocorrection (--autocorrect).
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: normal, indented_internal_methods
-Layout/IndentationConsistency:
- Enabled: false
-
-# Offense count: 118
-# This cop supports safe autocorrection (--autocorrect).
-# Configuration parameters: Width, AllowedPatterns.
-Layout/IndentationWidth:
- Enabled: false
-
# Offense count: 218
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
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
diff --git a/test/drawing/tc_bar_3D_chart.rb b/test/drawing/tc_bar_3D_chart.rb
index f7e15dea..3c22e191 100644
--- a/test/drawing/tc_bar_3D_chart.rb
+++ b/test/drawing/tc_bar_3D_chart.rb
@@ -25,11 +25,11 @@ class TestBar3DChart < Test::Unit::TestCase
assert(@chart.bar_dir == :col)
end
- def test_grouping
- assert_raise(ArgumentError, "require valid grouping") { @chart.grouping = :inverted }
- assert_nothing_raised("allow valid grouping") { @chart.grouping = :standard }
- assert(@chart.grouping == :standard)
- end
+ def test_grouping
+ assert_raise(ArgumentError, "require valid grouping") { @chart.grouping = :inverted }
+ assert_nothing_raised("allow valid grouping") { @chart.grouping = :standard }
+ assert(@chart.grouping == :standard)
+ end
def test_gap_width
assert_raise(ArgumentError, "require valid gap width") { @chart.gap_width = -1 }
diff --git a/test/drawing/tc_bar_chart.rb b/test/drawing/tc_bar_chart.rb
index 75a2970d..5106d266 100644
--- a/test/drawing/tc_bar_chart.rb
+++ b/test/drawing/tc_bar_chart.rb
@@ -25,11 +25,11 @@ class TestBarChart < Test::Unit::TestCase
assert(@chart.bar_dir == :col)
end
- def test_grouping
- assert_raise(ArgumentError, "require valid grouping") { @chart.grouping = :inverted }
- assert_nothing_raised("allow valid grouping") { @chart.grouping = :standard }
- assert(@chart.grouping == :standard)
- end
+ def test_grouping
+ assert_raise(ArgumentError, "require valid grouping") { @chart.grouping = :inverted }
+ assert_nothing_raised("allow valid grouping") { @chart.grouping = :standard }
+ assert(@chart.grouping == :standard)
+ end
def test_gap_width
assert_raise(ArgumentError, "require valid gap width") { @chart.gap_width = -1 }
diff --git a/test/drawing/tc_d_lbls.rb b/test/drawing/tc_d_lbls.rb
index cc96299d..a8647f9c 100644
--- a/test/drawing/tc_d_lbls.rb
+++ b/test/drawing/tc_d_lbls.rb
@@ -44,13 +44,13 @@ class TestDLbls < Test::Unit::TestCase
end
def test_to_xml_string
- str = '<?xml version="1.0" encoding="UTF-8"?>'
- str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '" xmlns:a="' << Axlsx::XML_NS_A << '" xmlns:r="' << Axlsx::XML_NS_R << '">'
- @d_lbls.to_xml_string(str)
- str << '</c:chartSpace>'
- doc = Nokogiri::XML(str)
- Axlsx.instance_values_for(@d_lbls).each do |name, value|
- assert(doc.xpath("//c:#{Axlsx::camel(name, false)}[@val='#{value}']"), "#{name} is properly serialized")
- end
+ str = '<?xml version="1.0" encoding="UTF-8"?>'
+ str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '" xmlns:a="' << Axlsx::XML_NS_A << '" xmlns:r="' << Axlsx::XML_NS_R << '">'
+ @d_lbls.to_xml_string(str)
+ str << '</c:chartSpace>'
+ doc = Nokogiri::XML(str)
+ Axlsx.instance_values_for(@d_lbls).each do |name, value|
+ assert(doc.xpath("//c:#{Axlsx::camel(name, false)}[@val='#{value}']"), "#{name} is properly serialized")
+ end
end
end
diff --git a/test/drawing/tc_data_source.rb b/test/drawing/tc_data_source.rb
index 2fec667f..b635d56e 100644
--- a/test/drawing/tc_data_source.rb
+++ b/test/drawing/tc_data_source.rb
@@ -1,6 +1,6 @@
require 'tc_helper.rb'
- class TestNumDataSource < Test::Unit::TestCase
+class TestNumDataSource < Test::Unit::TestCase
def setup
@data_source = Axlsx::NumDataSource.new :data => ["1", "2", "3"]
end
@@ -18,4 +18,4 @@ require 'tc_helper.rb'
doc = Nokogiri::XML(str)
assert_equal(doc.xpath("//c:val").size, 1)
end
- end
+end
diff --git a/test/drawing/tc_drawing.rb b/test/drawing/tc_drawing.rb
index c5fc98e1..282a03da 100644
--- a/test/drawing/tc_drawing.rb
+++ b/test/drawing/tc_drawing.rb
@@ -31,8 +31,8 @@ class TestDrawing < Test::Unit::TestCase
end
def test_add_two_cell_anchor_image
- src = File.dirname(__FILE__) + "/../fixtures/image1.jpeg"
- image = @ws.add_image(:image_src => src, :start_at => [0, 0], :end_at => [15, 0])
+ src = File.dirname(__FILE__) + "/../fixtures/image1.jpeg"
+ image = @ws.add_image(:image_src => src, :start_at => [0, 0], :end_at => [15, 0])
assert(@ws.drawing.anchors.last.is_a?(Axlsx::TwoCellAnchor))
assert(image.is_a?(Axlsx::Pic))
end
diff --git a/test/drawing/tc_line_3d_chart.rb b/test/drawing/tc_line_3d_chart.rb
index 55398d50..c91e9216 100644
--- a/test/drawing/tc_line_3d_chart.rb
+++ b/test/drawing/tc_line_3d_chart.rb
@@ -19,17 +19,17 @@ class TestLine3DChart < Test::Unit::TestCase
assert(@chart.serAxis.is_a?(Axlsx::SerAxis), "value access not created")
end
- def test_grouping
- assert_raise(ArgumentError, "require valid grouping") { @chart.grouping = :inverted }
- assert_nothing_raised("allow valid grouping") { @chart.grouping = :stacked }
- assert(@chart.grouping == :stacked)
- end
+ def test_grouping
+ assert_raise(ArgumentError, "require valid grouping") { @chart.grouping = :inverted }
+ assert_nothing_raised("allow valid grouping") { @chart.grouping = :stacked }
+ assert(@chart.grouping == :stacked)
+ end
- def test_gapDepth
- assert_raise(ArgumentError, "require valid gapDepth") { @chart.gapDepth = 200 }
- assert_nothing_raised("allow valid gapDepth") { @chart.gapDepth = "200%" }
- assert(@chart.gapDepth == "200%")
- end
+ def test_gapDepth
+ assert_raise(ArgumentError, "require valid gapDepth") { @chart.gapDepth = 200 }
+ assert_nothing_raised("allow valid gapDepth") { @chart.gapDepth = "200%" }
+ assert(@chart.gapDepth == "200%")
+ end
def test_to_xml
schema = Nokogiri::XML::Schema(File.open(Axlsx::DRAWING_XSD))
diff --git a/test/stylesheet/tc_table_style_element.rb b/test/stylesheet/tc_table_style_element.rb
index 4af3aeb5..021d4fca 100644
--- a/test/stylesheet/tc_table_style_element.rb
+++ b/test/stylesheet/tc_table_style_element.rb
@@ -38,7 +38,7 @@ class TestTableStyleElement < Test::Unit::TestCase
def test_to_xml_string
doc = Nokogiri::XML(@item.to_xml_string)
- @item.type = :headerRow
+ @item.type = :headerRow
assert(doc.xpath("//tableStyleElement[@type='#{@item.type.to_s}']"))
end
end
diff --git a/test/util/tc_validators.rb b/test/util/tc_validators.rb
index c0e2e356..ba3edba6 100644
--- a/test/util/tc_validators.rb
+++ b/test/util/tc_validators.rb
@@ -204,9 +204,9 @@ class TestValidators < Test::Unit::TestCase
end
def test_range_validation
- # exclusive
- assert_raise(ArgumentError) { Axlsx::RangeValidator.validate('foo', 1, 10, 10, false) }
- # inclusive by default
- assert_nothing_raised { Axlsx::RangeValidator.validate('foo', 1, 10, 10) }
+ # exclusive
+ assert_raise(ArgumentError) { Axlsx::RangeValidator.validate('foo', 1, 10, 10, false) }
+ # inclusive by default
+ assert_nothing_raised { Axlsx::RangeValidator.validate('foo', 1, 10, 10) }
end
end
diff --git a/test/workbook/worksheet/auto_filter/tc_filter_column.rb b/test/workbook/worksheet/auto_filter/tc_filter_column.rb
index 642b7b6e..88f73e0d 100644
--- a/test/workbook/worksheet/auto_filter/tc_filter_column.rb
+++ b/test/workbook/worksheet/auto_filter/tc_filter_column.rb
@@ -56,9 +56,9 @@ class TestFilterColumn < Test::Unit::TestCase
def test_col_id=
assert_raise ArgumentError do
- @filter_column.col_id = :bar
+ @filter_column.col_id = :bar
end
- assert_nothing_raised { @filter_column.col_id = 7 }
+ assert_nothing_raised { @filter_column.col_id = 7 }
end
def test_to_xml_string
diff --git a/test/workbook/worksheet/tc_data_validation.rb b/test/workbook/worksheet/tc_data_validation.rb
index 59fd34f6..f93c91fe 100644
--- a/test/workbook/worksheet/tc_data_validation.rb
+++ b/test/workbook/worksheet/tc_data_validation.rb
@@ -272,7 +272,7 @@ class TestDataValidation < Test::Unit::TestCase
end
def test_empty_attributes
- v = Axlsx::DataValidation.new
- assert_equal(nil, v.send(:get_valid_attributes))
+ v = Axlsx::DataValidation.new
+ assert_equal(nil, v.send(:get_valid_attributes))
end
end
diff --git a/test/workbook/worksheet/tc_outline_pr.rb b/test/workbook/worksheet/tc_outline_pr.rb
index a40108b1..d2906a61 100644
--- a/test/workbook/worksheet/tc_outline_pr.rb
+++ b/test/workbook/worksheet/tc_outline_pr.rb
@@ -1,19 +1,19 @@
require 'tc_helper.rb'
class TestOutlinePr < Test::Unit::TestCase
- def setup
- @outline_pr = Axlsx::OutlinePr.new(:summary_below => false, :summary_right => true, :apply_styles => false)
- end
+ def setup
+ @outline_pr = Axlsx::OutlinePr.new(:summary_below => false, :summary_right => true, :apply_styles => false)
+ end
- def test_summary_below
- assert_equal false, @outline_pr.summary_below
- end
+ def test_summary_below
+ assert_equal false, @outline_pr.summary_below
+ end
- def test_summary_right
- assert_equal true, @outline_pr.summary_right
- end
+ def test_summary_right
+ assert_equal true, @outline_pr.summary_right
+ end
- def test_apply_styles
- assert_equal false, @outline_pr.apply_styles
- end
+ def test_apply_styles
+ assert_equal false, @outline_pr.apply_styles
+ end
end
diff --git a/test/workbook/worksheet/tc_page_set_up_pr.rb b/test/workbook/worksheet/tc_page_set_up_pr.rb
index d04097d0..8ca4f825 100644
--- a/test/workbook/worksheet/tc_page_set_up_pr.rb
+++ b/test/workbook/worksheet/tc_page_set_up_pr.rb
@@ -1,15 +1,15 @@
require 'tc_helper.rb'
class TestPageSetUpPr < Test::Unit::TestCase
- def setup
- @page_setup_pr = Axlsx::PageSetUpPr.new(:fit_to_page => true, :auto_page_breaks => true)
- end
+ def setup
+ @page_setup_pr = Axlsx::PageSetUpPr.new(:fit_to_page => true, :auto_page_breaks => true)
+ end
- def test_fit_to_page
- assert_equal true, @page_setup_pr.fit_to_page
- end
+ def test_fit_to_page
+ assert_equal true, @page_setup_pr.fit_to_page
+ end
- def test_auto_page_breaks
- assert_equal true, @page_setup_pr.auto_page_breaks
- end
+ def test_auto_page_breaks
+ assert_equal true, @page_setup_pr.auto_page_breaks
+ end
end
diff --git a/test/workbook/worksheet/tc_pane.rb b/test/workbook/worksheet/tc_pane.rb
index d5f05933..fef1eb63 100644
--- a/test/workbook/worksheet/tc_pane.rb
+++ b/test/workbook/worksheet/tc_pane.rb
@@ -6,7 +6,7 @@ class TestPane < Test::Unit::TestCase
#inverse defaults for booleans
@nil_options = { :active_pane => :bottom_left, :state => :frozen, :top_left_cell => 'A2' }
@int_0_options = { :x_split => 2, :y_split => 2 }
- @options = @nil_options.merge(@int_0_options)
+ @options = @nil_options.merge(@int_0_options)
@pane = Axlsx::Pane.new(@options)
end
diff --git a/test/workbook/worksheet/tc_protected_range.rb b/test/workbook/worksheet/tc_protected_range.rb
index 6d609097..906c6014 100644
--- a/test/workbook/worksheet/tc_protected_range.rb
+++ b/test/workbook/worksheet/tc_protected_range.rb
@@ -1,16 +1,16 @@
require 'tc_helper.rb'
class TestProtectedRange < Test::Unit::TestCase
-def setup
- @p = Axlsx::Package.new
- @ws = @p.workbook.add_worksheet { |sheet| sheet.add_row [1, 2, 3, 4, 5, 6, 7, 8, 9] }
-end
+ def setup
+ @p = Axlsx::Package.new
+ @ws = @p.workbook.add_worksheet { |sheet| sheet.add_row [1, 2, 3, 4, 5, 6, 7, 8, 9] }
+ end
-def test_initialize_options
- assert_nothing_raised { Axlsx::ProtectedRange.new(:sqref => 'A1:B1', :name => "only bob") }
-end
+ def test_initialize_options
+ assert_nothing_raised { Axlsx::ProtectedRange.new(:sqref => 'A1:B1', :name => "only bob") }
+ end
-def test_range
- r = @ws.protect_range('A1:B1')
- assert_equal('A1:B1', r.sqref)
-end
+ def test_range
+ r = @ws.protect_range('A1:B1')
+ assert_equal('A1:B1', r.sqref)
+ end
end
diff --git a/test/workbook/worksheet/tc_sheet_format_pr.rb b/test/workbook/worksheet/tc_sheet_format_pr.rb
index 48643bc6..1240da26 100644
--- a/test/workbook/worksheet/tc_sheet_format_pr.rb
+++ b/test/workbook/worksheet/tc_sheet_format_pr.rb
@@ -44,33 +44,33 @@ class TestSheetFormatPr < Test::Unit::TestCase
end
def test_default_row_height
- assert_raise(ArgumentError) { @sheet_format_pr.default_row_height = :foo }
- assert_nothing_raised { @sheet_format_pr.default_row_height = 1.0 }
+ assert_raise(ArgumentError) { @sheet_format_pr.default_row_height = :foo }
+ assert_nothing_raised { @sheet_format_pr.default_row_height = 1.0 }
end
def test_default_col_width
- assert_raise(ArgumentError) { @sheet_format_pr.default_col_width = :foo }
- assert_nothing_raised { @sheet_format_pr.default_col_width = 1.0 }
+ assert_raise(ArgumentError) { @sheet_format_pr.default_col_width = :foo }
+ assert_nothing_raised { @sheet_format_pr.default_col_width = 1.0 }
end
def test_custom_height
- assert_raise(ArgumentError) { @sheet_format_pr.custom_height = :foo }
- assert_nothing_raised { @sheet_format_pr.custom_height = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.custom_height = :foo }
+ assert_nothing_raised { @sheet_format_pr.custom_height = true }
end
def test_zero_height
- assert_raise(ArgumentError) { @sheet_format_pr.zero_height = :foo }
- assert_nothing_raised { @sheet_format_pr.zero_height = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.zero_height = :foo }
+ assert_nothing_raised { @sheet_format_pr.zero_height = true }
end
def test_thick_top
- assert_raise(ArgumentError) { @sheet_format_pr.thick_top = :foo }
- assert_nothing_raised { @sheet_format_pr.thick_top = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.thick_top = :foo }
+ assert_nothing_raised { @sheet_format_pr.thick_top = true }
end
def test_thick_bottom
- assert_raise(ArgumentError) { @sheet_format_pr.thick_bottom = :foo }
- assert_nothing_raised { @sheet_format_pr.thick_bottom = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.thick_bottom = :foo }
+ assert_nothing_raised { @sheet_format_pr.thick_bottom = true }
end
def test_to_xml_string
diff --git a/test/workbook/worksheet/tc_sheet_view.rb b/test/workbook/worksheet/tc_sheet_view.rb
index a09287aa..fb8367a8 100644
--- a/test/workbook/worksheet/tc_sheet_view.rb
+++ b/test/workbook/worksheet/tc_sheet_view.rb
@@ -205,7 +205,7 @@ class TestSheetView < Test::Unit::TestCase
end
def test_add_selection
- @sv.add_selection(:top_left, :active_cell => "A1")
- assert_equal('A1', @sv.selections[:top_left].active_cell)
+ @sv.add_selection(:top_left, :active_cell => "A1")
+ assert_equal('A1', @sv.selections[:top_left].active_cell)
end
end
diff --git a/test/workbook/worksheet/tc_table_style_info.rb b/test/workbook/worksheet/tc_table_style_info.rb
index 2067959c..b56ac560 100644
--- a/test/workbook/worksheet/tc_table_style_info.rb
+++ b/test/workbook/worksheet/tc_table_style_info.rb
@@ -25,8 +25,8 @@ class TestTableStyleInfo < Test::Unit::TestCase
def test_boolean_properties
table_style = Axlsx::TableStyleInfo.new
@options.keys.each do |key|
- assert_nothing_raised { table_style.send("#{key.to_sym}=", true) }
- assert_raises(ArgumentError) { table_style.send(key.to_sym, 'foo') }
+ assert_nothing_raised { table_style.send("#{key.to_sym}=", true) }
+ assert_raises(ArgumentError) { table_style.send(key.to_sym, 'foo') }
end
end
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb
index bae9f904..6c8e0781 100644
--- a/test/workbook/worksheet/tc_worksheet.rb
+++ b/test/workbook/worksheet/tc_worksheet.rb
@@ -348,7 +348,7 @@ class TestWorksheet < Test::Unit::TestCase
end
def test_to_xml_string_row_breaks
- @ws.add_page_break("A1")
+ @ws.add_page_break("A1")
doc = Nokogiri::XML(@ws.to_xml_string)
assert_equal(doc.xpath('//xmlns:worksheet/xmlns:rowBreaks/xmlns:brk[@id="0"]').size, 1)
end