summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-10 11:45:57 +0200
committerGeremia Taglialatela <[email protected]>2023-04-10 11:45:57 +0200
commit84a2b255d6fd780f526ac3d9bf99a40f08792986 (patch)
treecea31975973b14e6a7e2879bd43a561ad0bfa59d /lib
parent1406b47e64188765f220be86001ec1f543e0157d (diff)
downloadcaxlsx-84a2b255d6fd780f526ac3d9bf99a40f08792986.tar.gz
caxlsx-84a2b255d6fd780f526ac3d9bf99a40f08792986.zip
Fix Layout/LeadingCommentSpace offenses
``` rubocop --only Layout/LeadingCommentSpace -a ```
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx.rb6
-rw-r--r--lib/axlsx/drawing/bar_3D_chart.rb4
-rw-r--r--lib/axlsx/drawing/bar_chart.rb4
-rw-r--r--lib/axlsx/drawing/cat_axis.rb2
-rw-r--r--lib/axlsx/drawing/chart.rb2
-rw-r--r--lib/axlsx/drawing/d_lbls.rb2
-rw-r--r--lib/axlsx/drawing/hyperlink.rb4
-rw-r--r--lib/axlsx/drawing/num_data.rb2
-rw-r--r--lib/axlsx/drawing/num_val.rb2
-rw-r--r--lib/axlsx/drawing/pic.rb2
-rw-r--r--lib/axlsx/drawing/ser_axis.rb2
-rw-r--r--lib/axlsx/drawing/str_data.rb2
-rw-r--r--lib/axlsx/drawing/str_val.rb2
-rw-r--r--lib/axlsx/drawing/title.rb6
-rw-r--r--lib/axlsx/package.rb4
-rw-r--r--lib/axlsx/stylesheet/border_pr.rb4
-rw-r--r--lib/axlsx/stylesheet/color.rb2
-rw-r--r--lib/axlsx/stylesheet/dxf.rb2
-rw-r--r--lib/axlsx/stylesheet/styles.rb8
-rw-r--r--lib/axlsx/stylesheet/xf.rb2
-rw-r--r--lib/axlsx/util/constants.rb4
-rw-r--r--lib/axlsx/workbook/defined_name.rb4
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb4
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/filters.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/cell.rb4
-rw-r--r--lib/axlsx/workbook/worksheet/cfvos.rb4
-rw-r--r--lib/axlsx/workbook/worksheet/col.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/page_setup.rb228
-rw-r--r--lib/axlsx/workbook/worksheet/pane.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/sheet_protection.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/sheet_view.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb2
34 files changed, 164 insertions, 164 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb
index a12bf08a..2ee8a1d8 100644
--- a/lib/axlsx.rb
+++ b/lib/axlsx.rb
@@ -21,11 +21,11 @@ require 'axlsx/rels/relationships.rb'
require 'axlsx/drawing/drawing.rb'
require 'axlsx/workbook/workbook.rb'
require 'axlsx/package.rb'
-#required gems
+# required gems
require 'nokogiri'
require 'zip'
-#core dependencies
+# core dependencies
require 'bigdecimal'
require 'set'
require 'time'
@@ -75,7 +75,7 @@ module Axlsx
cells.sort_by(&:pos)
end
- #global reference html entity encoding
+ # global reference html entity encoding
# @return [HtmlEntities]
def self.coder
@@coder ||= ::HTMLEntities.new
diff --git a/lib/axlsx/drawing/bar_3D_chart.rb b/lib/axlsx/drawing/bar_3D_chart.rb
index 6ec95d8d..89544be0 100644
--- a/lib/axlsx/drawing/bar_3D_chart.rb
+++ b/lib/axlsx/drawing/bar_3D_chart.rb
@@ -39,7 +39,7 @@ module Axlsx
end
alias :gapWidth :gap_width
- #grouping for a column, line, or area chart.
+ # grouping for a column, line, or area chart.
# must be one of [:percentStacked, :clustered, :standard, :stacked]
# @return [Symbol]
def grouping
@@ -87,7 +87,7 @@ module Axlsx
end
alias :barDir= :bar_dir=
- #grouping for a column, line, or area chart.
+ # grouping for a column, line, or area chart.
# must be one of [:percentStacked, :clustered, :standard, :stacked]
def grouping=(v)
RestrictionValidator.validate "Bar3DChart.grouping", [:percentStacked, :clustered, :standard, :stacked], v
diff --git a/lib/axlsx/drawing/bar_chart.rb b/lib/axlsx/drawing/bar_chart.rb
index f77eb7c1..1ed38332 100644
--- a/lib/axlsx/drawing/bar_chart.rb
+++ b/lib/axlsx/drawing/bar_chart.rb
@@ -34,7 +34,7 @@ module Axlsx
end
alias :gapWidth :gap_width
- #grouping for a column, line, or area chart.
+ # grouping for a column, line, or area chart.
# must be one of [:percentStacked, :clustered, :standard, :stacked]
# @return [Symbol]
def grouping
@@ -79,7 +79,7 @@ module Axlsx
end
alias :barDir= :bar_dir=
- #grouping for a column, line, or area chart.
+ # grouping for a column, line, or area chart.
# must be one of [:percentStacked, :clustered, :standard, :stacked]
def grouping=(v)
RestrictionValidator.validate "BarChart.grouping", [:percentStacked, :clustered, :standard, :stacked], v
diff --git a/lib/axlsx/drawing/cat_axis.rb b/lib/axlsx/drawing/cat_axis.rb
index ded05ee8..75290da0 100644
--- a/lib/axlsx/drawing/cat_axis.rb
+++ b/lib/axlsx/drawing/cat_axis.rb
@@ -1,5 +1,5 @@
module Axlsx
- #A CatAxis object defines a chart category axis
+ # A CatAxis object defines a chart category axis
class CatAxis < Axis
# Creates a new CatAxis object
# @option options [Integer] tick_lbl_skip
diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb
index e64163d9..e9f4441f 100644
--- a/lib/axlsx/drawing/chart.rb
+++ b/lib/axlsx/drawing/chart.rb
@@ -49,7 +49,7 @@ module Axlsx
# @return [Series]
attr_reader :series_type
- #TODO data labels!
+ # TODO data labels!
def d_lbls
@d_lbls ||= DLbls.new(self.class)
end
diff --git a/lib/axlsx/drawing/d_lbls.rb b/lib/axlsx/drawing/d_lbls.rb
index 3e51d021..358378c5 100644
--- a/lib/axlsx/drawing/d_lbls.rb
+++ b/lib/axlsx/drawing/d_lbls.rb
@@ -2,7 +2,7 @@ module Axlsx
# There are more elements in the dLbls spec that allow for
# customizations and formatting. For now, I am just implementing the
# basics.
- #The DLbls class manages serialization of data labels
+ # The DLbls class manages serialization of data labels
# showLeaderLines and leaderLines are not currently implemented
class DLbls
include Axlsx::Accessors
diff --git a/lib/axlsx/drawing/hyperlink.rb b/lib/axlsx/drawing/hyperlink.rb
index 979fdd6a..4d3b343d 100644
--- a/lib/axlsx/drawing/hyperlink.rb
+++ b/lib/axlsx/drawing/hyperlink.rb
@@ -6,7 +6,7 @@ module Axlsx
include Axlsx::SerializedAttributes
include Axlsx::OptionsParser
- #Creates a hyperlink object
+ # Creates a hyperlink object
# parent must be a Pic for now, although I expect that other object support this tag and its cNvPr parent
# @param [Pic] parent
# @option options [String] tooltip message shown when hyperlinked object is hovered over with mouse.
@@ -38,7 +38,7 @@ module Axlsx
alias :invalidUrl :invalid_url
alias :invalidUrl= :invalid_url=
- #An action to take when the link is clicked. The specification says "This can be used to specify a slide to be navigated to or a script of code to be run." but in most cases you will not need to do anything with this. MS does reserve a few interesting strings. @see http://msdn.microsoft.com/en-us/library/ff532419%28v=office.12%29.aspx
+ # An action to take when the link is clicked. The specification says "This can be used to specify a slide to be navigated to or a script of code to be run." but in most cases you will not need to do anything with this. MS does reserve a few interesting strings. @see http://msdn.microsoft.com/en-us/library/ff532419%28v=office.12%29.aspx
# @return [String]
attr_accessor :action
diff --git a/lib/axlsx/drawing/num_data.rb b/lib/axlsx/drawing/num_data.rb
index 140cfb9f..7239ac5f 100644
--- a/lib/axlsx/drawing/num_data.rb
+++ b/lib/axlsx/drawing/num_data.rb
@@ -1,5 +1,5 @@
module Axlsx
- #This class specifies data for a particular data point. It is used for both numCache and numLit object
+ # This class specifies data for a particular data point. It is used for both numCache and numLit object
class NumData
include Axlsx::OptionsParser
diff --git a/lib/axlsx/drawing/num_val.rb b/lib/axlsx/drawing/num_val.rb
index c03a0fa1..f4b2c399 100644
--- a/lib/axlsx/drawing/num_val.rb
+++ b/lib/axlsx/drawing/num_val.rb
@@ -1,5 +1,5 @@
module Axlsx
- #This class specifies data for a particular data point.
+ # This class specifies data for a particular data point.
class NumVal < StrVal
# A string representing the format code to apply.
# For more information see see the SpreadsheetML numFmt element's (§18.8.30) formatCode attribute.
diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb
index 64e5a877..fb4d01fe 100644
--- a/lib/axlsx/drawing/pic.rb
+++ b/lib/axlsx/drawing/pic.rb
@@ -194,7 +194,7 @@ module Axlsx
swap_anchor(new_anchor)
end
- #changes the anchor type to a two cell anchor
+ # changes the anchor type to a two cell anchor
def use_two_cell_anchor
return if @anchor.is_a?(TwoCellAnchor)
diff --git a/lib/axlsx/drawing/ser_axis.rb b/lib/axlsx/drawing/ser_axis.rb
index b5844454..f49c1301 100644
--- a/lib/axlsx/drawing/ser_axis.rb
+++ b/lib/axlsx/drawing/ser_axis.rb
@@ -1,5 +1,5 @@
module Axlsx
- #A SerAxis object defines a series axis
+ # A SerAxis object defines a series axis
class SerAxis < Axis
# The number of tick lables to skip between labels
# @return [Integer]
diff --git a/lib/axlsx/drawing/str_data.rb b/lib/axlsx/drawing/str_data.rb
index 843c90a7..5ea8a892 100644
--- a/lib/axlsx/drawing/str_data.rb
+++ b/lib/axlsx/drawing/str_data.rb
@@ -1,5 +1,5 @@
module Axlsx
- #This specifies the last string data used for a chart. (e.g. strLit and strCache)
+ # This specifies the last string data used for a chart. (e.g. strLit and strCache)
# This class is extended for NumData to include the formatCode attribute required for numLit and numCache
class StrData
include Axlsx::OptionsParser
diff --git a/lib/axlsx/drawing/str_val.rb b/lib/axlsx/drawing/str_val.rb
index 4a85d256..e5c851ee 100644
--- a/lib/axlsx/drawing/str_val.rb
+++ b/lib/axlsx/drawing/str_val.rb
@@ -1,5 +1,5 @@
module Axlsx
- #This class specifies data for a particular data point.
+ # This class specifies data for a particular data point.
class StrVal
include Axlsx::OptionsParser
diff --git a/lib/axlsx/drawing/title.rb b/lib/axlsx/drawing/title.rb
index e1b0d7f8..92294a06 100644
--- a/lib/axlsx/drawing/title.rb
+++ b/lib/axlsx/drawing/title.rb
@@ -60,9 +60,9 @@ module Axlsx
end
# Not implemented at this time.
- #def layout=(v) DataTypeValidator.validate 'Title.layout', Layout, v; @layout = v; end
- #def overlay=(v) Axlsx::validate_boolean v; @overlay=v; end
- #def spPr=(v) DataTypeValidator.validate 'Title.spPr', SpPr, v; @spPr = v; end
+ # def layout=(v) DataTypeValidator.validate 'Title.layout', Layout, v; @layout = v; end
+ # def overlay=(v) Axlsx::validate_boolean v; @overlay=v; end
+ # def spPr=(v) DataTypeValidator.validate 'Title.spPr', SpPr, v; @spPr = v; end
# Serializes the object
# @param [String] str
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb
index c3805a5c..02ab184c 100644
--- a/lib/axlsx/package.rb
+++ b/lib/axlsx/package.rb
@@ -231,8 +231,8 @@ module Axlsx
workbook.pivot_tables.each do |pivot_table|
cache_definition = pivot_table.cache_definition
parts << { :entry => "xl/#{pivot_table.rels_pn}", :doc => pivot_table.relationships, :schema => RELS_XSD }
- parts << { :entry => "xl/#{pivot_table.pn}", :doc => pivot_table } #, :schema => SML_XSD}
- parts << { :entry => "xl/#{cache_definition.pn}", :doc => cache_definition } #, :schema => SML_XSD}
+ parts << { :entry => "xl/#{pivot_table.pn}", :doc => pivot_table } # , :schema => SML_XSD}
+ parts << { :entry => "xl/#{cache_definition.pn}", :doc => cache_definition } # , :schema => SML_XSD}
end
workbook.comments.each do |comment|
diff --git a/lib/axlsx/stylesheet/border_pr.rb b/lib/axlsx/stylesheet/border_pr.rb
index 8300f4bc..3f1054f2 100644
--- a/lib/axlsx/stylesheet/border_pr.rb
+++ b/lib/axlsx/stylesheet/border_pr.rb
@@ -45,9 +45,9 @@ module Axlsx
# @see Axlsx::Border
def initialize(options = {})
parse_options(options)
- #options.each do |o|
+ # options.each do |o|
# self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
- #end
+ # end
end
# @see name
diff --git a/lib/axlsx/stylesheet/color.rb b/lib/axlsx/stylesheet/color.rb
index 4f358a78..d6d204bf 100644
--- a/lib/axlsx/stylesheet/color.rb
+++ b/lib/axlsx/stylesheet/color.rb
@@ -37,7 +37,7 @@ module Axlsx
# no support for theme just yet
# @return [Integer]
- #attr_reader :theme
+ # attr_reader :theme
# The tint value.
# @note valid values are between -1.0 and 1.0
diff --git a/lib/axlsx/stylesheet/dxf.rb b/lib/axlsx/stylesheet/dxf.rb
index a3f15581..516894df 100644
--- a/lib/axlsx/stylesheet/dxf.rb
+++ b/lib/axlsx/stylesheet/dxf.rb
@@ -7,7 +7,7 @@ module Axlsx
# The order in which the child elements is put in the XML seems to
# be important for Excel
CHILD_ELEMENTS = [:font, :numFmt, :fill, :alignment, :border, :protection]
- #does not support extList (ExtensionList)
+ # does not support extList (ExtensionList)
# The cell alignment for this style
# @return [CellAlignment]
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb
index 2a210776..ca2c7a8c 100644
--- a/lib/axlsx/stylesheet/styles.rb
+++ b/lib/axlsx/stylesheet/styles.rb
@@ -17,7 +17,7 @@ module Axlsx
require 'axlsx/stylesheet/xf.rb'
require 'axlsx/stylesheet/cell_protection.rb'
- #The Styles class manages worksheet styles
+ # The Styles class manages worksheet styles
# In addition to creating the require style objects for a valid xlsx package, this class provides the key mechanism for adding styles to your workbook, and safely applying them to the cells of your worksheet.
# All portions of the stylesheet are implemented here exception colors, which specify legacy and modified pallete colors, and exLst, whic is used as a future feature data storage area.
# @see Office Open XML Part 1 18.8.11 for gory details on how this stuff gets put together
@@ -468,10 +468,10 @@ module Axlsx
def parse_num_fmt_options(options = {})
return if (options.keys & [:format_code, :num_fmt]).empty?
- #When the user provides format_code - we always need to create a new numFmt object
- #When the type is :dxf we always need to create a new numFmt object
+ # When the user provides format_code - we always need to create a new numFmt object
+ # When the type is :dxf we always need to create a new numFmt object
if options[:format_code] || options[:type] == :dxf
- #If this is a standard xf we pull from numFmts the highest current and increment for num_fmt
+ # If this is a standard xf we pull from numFmts the highest current and increment for num_fmt
options[:num_fmt] ||= (@numFmts.map { |num_fmt| num_fmt.numFmtId }.max + 1) if options[:type] != :dxf
numFmt = NumFmt.new(:numFmtId => options[:num_fmt] || 0, :formatCode => options[:format_code].to_s)
options[:type] == :dxf ? numFmt : (numFmts << numFmt; numFmt.numFmtId)
diff --git a/lib/axlsx/stylesheet/xf.rb b/lib/axlsx/stylesheet/xf.rb
index e7a84a46..e58608f7 100644
--- a/lib/axlsx/stylesheet/xf.rb
+++ b/lib/axlsx/stylesheet/xf.rb
@@ -2,7 +2,7 @@ module Axlsx
# The Xf class defines a formatting record for use in Styles. The recommended way to manage styles for your workbook is with Styles#add_style
# @see Styles#add_style
class Xf
- #does not support extList (ExtensionList)
+ # does not support extList (ExtensionList)
include Axlsx::SerializedAttributes
include Axlsx::OptionsParser
diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb
index 7a49a0eb..55e2b58f 100644
--- a/lib/axlsx/util/constants.rb
+++ b/lib/axlsx/util/constants.rb
@@ -95,7 +95,7 @@ module Axlsx
# comment relation for nil target
COMMENT_R_NULL = "http://purl.oclc.org/ooxml/officeDocument/relationships/comments".freeze
- #vml drawing relation namespace
+ # vml drawing relation namespace
VML_DRAWING_R = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing'
# VML Drawing content type
@@ -158,7 +158,7 @@ module Axlsx
# png content type
PNG_CT = "image/png".freeze
- #drawing content type
+ # drawing content type
DRAWING_CT = "application/vnd.openxmlformats-officedocument.drawing+xml".freeze
# xml content type extensions
diff --git a/lib/axlsx/workbook/defined_name.rb b/lib/axlsx/workbook/defined_name.rb
index 2632e8ef..d3b6e1ef 100644
--- a/lib/axlsx/workbook/defined_name.rb
+++ b/lib/axlsx/workbook/defined_name.rb
@@ -2,9 +2,9 @@
# <definedName name="_xlnm.Print_Titles" localSheetId="0">Sheet1!$1:$1</definedName>
# </definedNames>
-#<xsd:complexType name="CT_DefinedName">
+# <xsd:complexType name="CT_DefinedName">
# <xsd:simpleContent>
-# <xsd:extension base="ST_Formula">
+#  <xsd:extension base="ST_Formula">
# <xsd:attribute name="name" type="s:ST_Xstring" use="required"/>
# <xsd:attribute name="comment" type="s:ST_Xstring" use="optional"/>
# <xsd:attribute name="customMenu" type="s:ST_Xstring" use="optional"/>
diff --git a/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb b/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb
index 9e753759..bf3426b6 100644
--- a/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb
+++ b/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb
@@ -2,7 +2,7 @@ require 'axlsx/workbook/worksheet/auto_filter/filter_column.rb'
require 'axlsx/workbook/worksheet/auto_filter/filters.rb'
module Axlsx
- #This class represents an auto filter range in a worksheet
+ # This class represents an auto filter range in a worksheet
class AutoFilter
# creates a new Autofilter object
# @param [Worksheet] worksheet
diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb b/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb
index 1fa2ff78..32a9df26 100644
--- a/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb
+++ b/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb
@@ -16,7 +16,7 @@ module Axlsx
# @option [Boolean] show_button @see show_button
def initialize(col_id, filter_type, options = {})
RestrictionValidator.validate 'FilterColumn.filter', FILTERS, filter_type
- #Axlsx::validate_unsigned_int(col_id)
+ # Axlsx::validate_unsigned_int(col_id)
self.col_id = col_id
parse_options options
@filter = Axlsx.const_get(Axlsx.camel(filter_type)).new(options)
@@ -26,7 +26,7 @@ module Axlsx
serializable_attributes :col_id, :hidden_button, :show_button
# Allowed filters
- FILTERS = [:filters] #, :top10, :custom_filters, :dynamic_filters, :color_filters, :icon_filters]
+ FILTERS = [:filters] # , :top10, :custom_filters, :dynamic_filters, :color_filters, :icon_filters]
# Zero-based index indicating the AutoFilter column to which this filter information applies.
# @return [Integer]
diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb
index 554df012..83da2da2 100644
--- a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb
+++ b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb
@@ -113,7 +113,7 @@ module Axlsx
@val = value
end
- #Filter value used in the criteria.
+ # Filter value used in the criteria.
attr_accessor :val
# Serializes the filter value object
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb
index cc668208..364de1e9 100644
--- a/lib/axlsx/workbook/worksheet/cell.rb
+++ b/lib/axlsx/workbook/worksheet/cell.rb
@@ -150,7 +150,7 @@ module Axlsx
# @see value
def value=(v)
- #TODO: consider doing value based type determination first?
+ # TODO: consider doing value based type determination first?
@value = cast_value(v)
end
@@ -537,7 +537,7 @@ module Axlsx
when :boolean
v ? 1 : 0
when :iso_8601
- #consumer is responsible for ensuring the iso_8601 format when specifying this type
+ # consumer is responsible for ensuring the iso_8601 format when specifying this type
v
else
v.to_s
diff --git a/lib/axlsx/workbook/worksheet/cfvos.rb b/lib/axlsx/workbook/worksheet/cfvos.rb
index 44db4dfd..c5fa80f3 100644
--- a/lib/axlsx/workbook/worksheet/cfvos.rb
+++ b/lib/axlsx/workbook/worksheet/cfvos.rb
@@ -1,6 +1,6 @@
module Axlsx
- #A collection of Cfvo objects that initializes with the required
- #first two items
+ # A collection of Cfvo objects that initializes with the required
+ # first two items
class Cfvos < SimpleTypedList
def initialize
super(Cfvo)
diff --git a/lib/axlsx/workbook/worksheet/col.rb b/lib/axlsx/workbook/worksheet/col.rb
index da3a9364..37c38365 100644
--- a/lib/axlsx/workbook/worksheet/col.rb
+++ b/lib/axlsx/workbook/worksheet/col.rb
@@ -111,7 +111,7 @@ module Axlsx
# is to only set this if a calculated value is greated than the
# current @width value.
# TODO!!!
- #Axlsx.validate_unsigned_numeric(v) unless v == nil
+ # Axlsx.validate_unsigned_numeric(v) unless v == nil
@custom_width = @best_fit = v != nil
@width = v.nil? ? v : [v, MAX_WIDTH].min
end
diff --git a/lib/axlsx/workbook/worksheet/page_setup.rb b/lib/axlsx/workbook/worksheet/page_setup.rb
index 6b07466e..c10e28ce 100644
--- a/lib/axlsx/workbook/worksheet/page_setup.rb
+++ b/lib/axlsx/workbook/worksheet/page_setup.rb
@@ -64,120 +64,120 @@ module Axlsx
attr_reader :scale
# The paper size to use in printing
- #1 = Letter paper (8.5 in. by 11 in.)
- #2 = Letter small paper (8.5 in. by 11 in.)
- #3 = Tabloid paper (11 in. by 17 in.)
- #4 = Ledger paper (17 in. by 11 in.)
- #5 = Legal paper (8.5 in. by 14 in.)
- #6 = Statement paper (5.5 in. by 8.5 in.)
- #7 = Executive paper (7.25 in. by 10.5 in.)
- #8 = A3 paper (297 mm by 420 mm)
- #9 = A4 paper (210 mm by 297 mm)
- #10 = A4 small paper (210 mm by 297 mm)
- #11 = A5 paper (148 mm by 210 mm)
- #12 = B4 paper (250 mm by 353 mm)
- #13 = B5 paper (176 mm by 250 mm)
- #14 = Folio paper (8.5 in. by 13 in.)
- #15 = Quarto paper (215 mm by 275 mm)
- #16 = Standard paper (10 in. by 14 in.)
- #17 = Standard paper (11 in. by 17 in.)
- #18 = Note paper (8.5 in. by 11 in.)
- #19 = #9 envelope (3.875 in. by 8.875 in.)
- #20 = #10 envelope (4.125 in. by 9.5 in.)
- #21 = #11 envelope (4.5 in. by 10.375 in.)
- #22 = #12 envelope (4.75 in. by 11 in.)
- #23 = #14 envelope (5 in. by 11.5 in.) 24 = C paper (17 in. by 22 in.)
- #25 = D paper (22 in. by 34 in.)
- #26 = E paper (34 in. by 44 in.)
- #27 = DL envelope (110 mm by 220 mm)
- #28 = C5 envelope (162 mm by 229 mm)
- #29 = C3 envelope (324 mm by 458 mm)
- #30 = C4 envelope (229 mm by 324 mm)
- #31 = C6 envelope (114 mm by 162 mm)
- #32 = C65 envelope (114 mm by 229 mm)
- #33 = B4 envelope (250 mm by 353 mm)
- #34 = B5 envelope (176 mm by 250 mm)
- #35 = B6 envelope (176 mm by 125 mm)
- #36 = Italy envelope (110 mm by 230 mm)
- #37 = Monarch envelope (3.875 in. by 7.5 in.). 38 = 6 3/4 envelope (3.625 in. by 6.5 in.)
- #39 = US standard fanfold (14.875 in. by 11 in.)
- #40 = German standard fanfold (8.5 in. by 12 in.)
- #41 = German legal fanfold (8.5 in. by 13 in.)
- #42 = ISO B4 (250 mm by 353 mm)
- #43 = Japanese double postcard (200 mm by 148 mm)
- #44 = Standard paper (9 in. by 11 in.)
- #45 = Standard paper (10 in. by 11 in.)
- #46 = Standard paper (15 in. by 11 in.)
- #47 = Invite envelope (220 mm by 220 mm)
- #50 = Letter extra paper (9.275 in. by 12 in.)
- #51 = Legal extra paper (9.275 in. by 15 in.)
- #52 = Tabloid extra paper (11.69 in. by 18 in.)
- #53 = A4 extra paper (236 mm by 322 mm)
- #54 = Letter transverse paper (8.275 in. by 11 in.)
- #55 = A4 transverse paper (210 mm by 297 mm)
- #56 = Letter extra transverse paper (9.275 in. by 12 in.)
- #57 = SuperA/SuperA/A4 paper (227 mm by 356 mm)
- #58 = SuperB/SuperB/A3 paper (305 mm by 487 mm)
- #59 = Letter plus paper (8.5 in. by 12.69 in.)
- #60 = A4 plus paper (210 mm by 330 mm)
- #61 = A5 transverse paper (148 mm by 210 mm)
- #62 = JIS B5 transverse paper (182 mm by 257 mm)
- #63 = A3 extra paper (322 mm by 445 mm)
- #64 = A5 extra paper (174 mm by 235 mm)
- #65 = ISO B5 extra paper (201 mm by 276 mm)
- #66 = A2 paper (420 mm by 594 mm)
- #67 = A3 transverse paper (297 mm by 420 mm)
- #68 = A3 extra transverse paper (322 mm by 445 mm)
- #69 = Japanese Double Postcard (200 mm x 148 mm)
- #70 = A6 (105 mm x 148 mm
- #71 = Japanese Envelope Kaku #2
- #72 = Japanese Envelope Kaku #3
- #73 = Japanese Envelope Chou #3
- #74 = Japanese Envelope Chou #4
- #75 = Letter Rotated (11in x 8 1/2 11 in)
- #76 = A3 Rotated (420 mm x 297 mm)
- #77 = A4 Rotated (297 mm x 210 mm)
- #78 = A5 Rotated (210 mm x 148 mm)
- #79 = B4 (JIS) Rotated (364 mm x 257 mm)
- #80 = B5 (JIS) Rotated (257 mm x 182 mm)
- #81 = Japanese Postcard Rotated (148 mm x 100 mm)
- #82 = Double Japanese Postcard Rotated (148 mm x 200 mm)
- #83 = A6 Rotated (148 mm x 105 mm)
- #84 = Japanese Envelope Kaku #2 Rotated
- #85 = Japanese Envelope Kaku #3 Rotated
- #86 = Japanese Envelope Chou #3 Rotated
- #87 = Japanese Envelope Chou #4 Rotated
- #88 = B6 (JIS) (128 mm x 182 mm)
- #89 = B6 (JIS) Rotated (182 mm x 128 mm)
- #90 = (12 in x 11 in)
- #91 = Japanese Envelope You #4
- #92 = Japanese Envelope You #4 Rotated
- #93 = PRC 16K (146 mm x 215 mm)
- #94 = PRC 32K (97 mm x 151 mm)
- #95 = PRC 32K(Big) (97 mm x 151 mm)
- #96 = PRC Envelope #1 (102 mm x 165 mm)
- #97 = PRC Envelope #2 (102 mm x 176 mm)
- #98 = PRC Envelope #3 (125 mm x 176 mm)
- #99 = PRC Envelope #4 (110 mm x 208 mm)
- #100 = PRC Envelope #5 (110 mm x 220 mm)
- #101 = PRC Envelope #6 (120 mm x 230 mm)
- #102 = PRC Envelope #7 (160 mm x 230 mm)
- #103 = PRC Envelope #8 (120 mm x 309 mm)
- #104 = PRC Envelope #9 (229 mm x 324 mm)
- #105 = PRC Envelope #10 (324 mm x 458 mm)
- #106 = PRC 16K Rotated
- #107 = PRC 32K Rotated
- #108 = PRC 32K(Big) Rotated
- #109 = PRC Envelope #1 Rotated (165 mm x 102 mm)
- #110 = PRC Envelope #2 Rotated (176 mm x 102 mm)
- #111 = PRC Envelope #3 Rotated (176 mm x 125 mm)
- #112 = PRC Envelope #4 Rotated (208 mm x 110 mm)
- #113 = PRC Envelope #5 Rotated (220 mm x 110 mm)
- #114 = PRC Envelope #6 Rotated (230 mm x 120 mm)
- #115 = PRC Envelope #7 Rotated (230 mm x 160 mm)
- #116 = PRC Envelope #8 Rotated (309 mm x 120 mm)
- #117 = PRC Envelope #9 Rotated (324 mm x 229 mm)
- #118 = PRC Envelope #10 Rotated (458 mm x 324 mm)
+ # 1 = Letter paper (8.5 in. by 11 in.)
+ # 2 = Letter small paper (8.5 in. by 11 in.)
+ # 3 = Tabloid paper (11 in. by 17 in.)
+ # 4 = Ledger paper (17 in. by 11 in.)
+ # 5 = Legal paper (8.5 in. by 14 in.)
+ # 6 = Statement paper (5.5 in. by 8.5 in.)
+ # 7 = Executive paper (7.25 in. by 10.5 in.)
+ # 8 = A3 paper (297 mm by 420 mm)
+ # 9 = A4 paper (210 mm by 297 mm)
+ # 10 = A4 small paper (210 mm by 297 mm)
+ # 11 = A5 paper (148 mm by 210 mm)
+ # 12 = B4 paper (250 mm by 353 mm)
+ # 13 = B5 paper (176 mm by 250 mm)
+ # 14 = Folio paper (8.5 in. by 13 in.)
+ # 15 = Quarto paper (215 mm by 275 mm)
+ # 16 = Standard paper (10 in. by 14 in.)
+ # 17 = Standard paper (11 in. by 17 in.)
+ # 18 = Note paper (8.5 in. by 11 in.)
+ # 19 = #9 envelope (3.875 in. by 8.875 in.)
+ # 20 = #10 envelope (4.125 in. by 9.5 in.)
+ # 21 = #11 envelope (4.5 in. by 10.375 in.)
+ # 22 = #12 envelope (4.75 in. by 11 in.)
+ # 23 = #14 envelope (5 in. by 11.5 in.) 24 = C paper (17 in. by 22 in.)
+ # 25 = D paper (22 in. by 34 in.)
+ # 26 = E paper (34 in. by 44 in.)
+ # 27 = DL envelope (110 mm by 220 mm)
+ # 28 = C5 envelope (162 mm by 229 mm)
+ # 29 = C3 envelope (324 mm by 458 mm)
+ # 30 = C4 envelope (229 mm by 324 mm)
+ # 31 = C6 envelope (114 mm by 162 mm)
+ # 32 = C65 envelope (114 mm by 229 mm)
+ # 33 = B4 envelope (250 mm by 353 mm)
+ # 34 = B5 envelope (176 mm by 250 mm)
+ # 35 = B6 envelope (176 mm by 125 mm)
+ # 36 = Italy envelope (110 mm by 230 mm)
+ # 37 = Monarch envelope (3.875 in. by 7.5 in.). 38 = 6 3/4 envelope (3.625 in. by 6.5 in.)
+ # 39 = US standard fanfold (14.875 in. by 11 in.)
+ # 40 = German standard fanfold (8.5 in. by 12 in.)
+ # 41 = German legal fanfold (8.5 in. by 13 in.)
+ # 42 = ISO B4 (250 mm by 353 mm)
+ # 43 = Japanese double postcard (200 mm by 148 mm)
+ # 44 = Standard paper (9 in. by 11 in.)
+ # 45 = Standard paper (10 in. by 11 in.)
+ # 46 = Standard paper (15 in. by 11 in.)
+ # 47 = Invite envelope (220 mm by 220 mm)
+ # 50 = Letter extra paper (9.275 in. by 12 in.)
+ # 51 = Legal extra paper (9.275 in. by 15 in.)
+ # 52 = Tabloid extra paper (11.69 in. by 18 in.)
+ # 53 = A4 extra paper (236 mm by 322 mm)
+ # 54 = Letter transverse paper (8.275 in. by 11 in.)
+ # 55 = A4 transverse paper (210 mm by 297 mm)
+ # 56 = Letter extra transverse paper (9.275 in. by 12 in.)
+ # 57 = SuperA/SuperA/A4 paper (227 mm by 356 mm)
+ # 58 = SuperB/SuperB/A3 paper (305 mm by 487 mm)
+ # 59 = Letter plus paper (8.5 in. by 12.69 in.)
+ # 60 = A4 plus paper (210 mm by 330 mm)
+ # 61 = A5 transverse paper (148 mm by 210 mm)
+ # 62 = JIS B5 transverse paper (182 mm by 257 mm)
+ # 63 = A3 extra paper (322 mm by 445 mm)
+ # 64 = A5 extra paper (174 mm by 235 mm)
+ # 65 = ISO B5 extra paper (201 mm by 276 mm)
+ # 66 = A2 paper (420 mm by 594 mm)
+ # 67 = A3 transverse paper (297 mm by 420 mm)
+ # 68 = A3 extra transverse paper (322 mm by 445 mm)
+ # 69 = Japanese Double Postcard (200 mm x 148 mm)
+ # 70 = A6 (105 mm x 148 mm
+ # 71 = Japanese Envelope Kaku #2
+ # 72 = Japanese Envelope Kaku #3
+ # 73 = Japanese Envelope Chou #3
+ # 74 = Japanese Envelope Chou #4
+ # 75 = Letter Rotated (11in x 8 1/2 11 in)
+ # 76 = A3 Rotated (420 mm x 297 mm)
+ # 77 = A4 Rotated (297 mm x 210 mm)
+ # 78 = A5 Rotated (210 mm x 148 mm)
+ # 79 = B4 (JIS) Rotated (364 mm x 257 mm)
+ # 80 = B5 (JIS) Rotated (257 mm x 182 mm)
+ # 81 = Japanese Postcard Rotated (148 mm x 100 mm)
+ # 82 = Double Japanese Postcard Rotated (148 mm x 200 mm)
+ # 83 = A6 Rotated (148 mm x 105 mm)
+ # 84 = Japanese Envelope Kaku #2 Rotated
+ # 85 = Japanese Envelope Kaku #3 Rotated
+ # 86 = Japanese Envelope Chou #3 Rotated
+ # 87 = Japanese Envelope Chou #4 Rotated
+ # 88 = B6 (JIS) (128 mm x 182 mm)
+ # 89 = B6 (JIS) Rotated (182 mm x 128 mm)
+ # 90 = (12 in x 11 in)
+ # 91 = Japanese Envelope You #4
+ # 92 = Japanese Envelope You #4 Rotated
+ # 93 = PRC 16K (146 mm x 215 mm)
+ # 94 = PRC 32K (97 mm x 151 mm)
+ # 95 = PRC 32K(Big) (97 mm x 151 mm)
+ # 96 = PRC Envelope #1 (102 mm x 165 mm)
+ # 97 = PRC Envelope #2 (102 mm x 176 mm)
+ # 98 = PRC Envelope #3 (125 mm x 176 mm)
+ # 99 = PRC Envelope #4 (110 mm x 208 mm)
+ # 100 = PRC Envelope #5 (110 mm x 220 mm)
+ # 101 = PRC Envelope #6 (120 mm x 230 mm)
+ # 102 = PRC Envelope #7 (160 mm x 230 mm)
+ # 103 = PRC Envelope #8 (120 mm x 309 mm)
+ # 104 = PRC Envelope #9 (229 mm x 324 mm)
+ # 105 = PRC Envelope #10 (324 mm x 458 mm)
+ # 106 = PRC 16K Rotated
+ # 107 = PRC 32K Rotated
+ # 108 = PRC 32K(Big) Rotated
+ # 109 = PRC Envelope #1 Rotated (165 mm x 102 mm)
+ # 110 = PRC Envelope #2 Rotated (176 mm x 102 mm)
+ # 111 = PRC Envelope #3 Rotated (176 mm x 125 mm)
+ # 112 = PRC Envelope #4 Rotated (208 mm x 110 mm)
+ # 113 = PRC Envelope #5 Rotated (220 mm x 110 mm)
+ # 114 = PRC Envelope #6 Rotated (230 mm x 120 mm)
+ # 115 = PRC Envelope #7 Rotated (230 mm x 160 mm)
+ # 116 = PRC Envelope #8 Rotated (309 mm x 120 mm)
+ # 117 = PRC Envelope #9 Rotated (324 mm x 229 mm)
+ # 118 = PRC Envelope #10 Rotated (458 mm x 324 mm)
# @return [Integer]
attr_reader :paper_size
diff --git a/lib/axlsx/workbook/worksheet/pane.rb b/lib/axlsx/workbook/worksheet/pane.rb
index f9323d3e..e752ab22 100644
--- a/lib/axlsx/workbook/worksheet/pane.rb
+++ b/lib/axlsx/workbook/worksheet/pane.rb
@@ -13,7 +13,7 @@ module Axlsx
# @option options [Integer] x_split Horizontal Split Position
# @option options [Integer] y_split Vertical Split Position
def initialize(options = {})
- #defaults
+ # defaults
@active_pane = @state = @top_left_cell = nil
@x_split = @y_split = 0
parse_options options
diff --git a/lib/axlsx/workbook/worksheet/sheet_protection.rb b/lib/axlsx/workbook/worksheet/sheet_protection.rb
index b36f8875..7433d5bb 100644
--- a/lib/axlsx/workbook/worksheet/sheet_protection.rb
+++ b/lib/axlsx/workbook/worksheet/sheet_protection.rb
@@ -101,7 +101,7 @@ module Axlsx
chars.collect! do |char|
i += 1
- char = char.unpack('c')[0] << i #ord << i
+ char = char.unpack('c')[0] << i # ord << i
low_15 = char & 0x7fff
high_15 = char & 0x7fff << 15
high_15 = high_15 >> 15
diff --git a/lib/axlsx/workbook/worksheet/sheet_view.rb b/lib/axlsx/workbook/worksheet/sheet_view.rb
index 8c2a0cd5..dc41d01a 100644
--- a/lib/axlsx/workbook/worksheet/sheet_view.rb
+++ b/lib/axlsx/workbook/worksheet/sheet_view.rb
@@ -29,7 +29,7 @@ module Axlsx
# @option options [Integer] zoom_scale_page_layout_view Zoom Scale Page Layout View
# @option options [Integer] zoom_scale_sheet_layout_view Zoom Scale Page Break Preview
def initialize(options = {})
- #defaults
+ # defaults
@color_id = @top_left_cell = @pane = nil
@right_to_left = @show_formulas = @show_outline_symbols = @show_white_space = @tab_selected = @window_protection = false
@default_grid_color = @show_grid_lines = @show_row_col_headers = @show_ruler = @show_zeros = true
diff --git a/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb b/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb
index f20d671d..60615f1c 100644
--- a/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb
@@ -25,7 +25,7 @@ module Axlsx
serializable_attributes :display, :tooltip, :ref
- #Cell location of hyperlink on worksheet.
+ # Cell location of hyperlink on worksheet.
# @return [String]
attr_reader :ref
diff --git a/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb b/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb
index 4771efb1..44c6125a 100644
--- a/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb
@@ -1,5 +1,5 @@
module Axlsx
- #A collection of hyperlink objects for a worksheet
+ # A collection of hyperlink objects for a worksheet
class WorksheetHyperlinks < SimpleTypedList
# Creates a new Hyperlinks collection
# @param [Worksheet] worksheet the worksheet that owns these hyperlinks