lib/axlsx/stylesheet/styles.rb in axlsx-1.0.16 vs lib/axlsx/stylesheet/styles.rb in axlsx-1.0.17

- old
+ new

@@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- +# encoding: UTF-8 module Axlsx require 'axlsx/stylesheet/border.rb' require 'axlsx/stylesheet/border_pr.rb' require 'axlsx/stylesheet/cell_alignment.rb' require 'axlsx/stylesheet/cell_style.rb' @@ -251,26 +251,26 @@ private # Creates the default set of styles the exel requires to be valid as well as setting up the # Axlsx::STYLE_THIN_BORDER def load_default_styles - @numFmts = SimpleTypedList.new NumFmt + @numFmts = SimpleTypedList.new NumFmt, 'numFmts' @numFmts << NumFmt.new(:numFmtId => NUM_FMT_YYYYMMDD, :formatCode=> "yyyy/mm/dd") @numFmts << NumFmt.new(:numFmtId => NUM_FMT_YYYYMMDDHHMMSS, :formatCode=> "yyyy/mm/dd hh:mm:ss") @numFmts.lock - @fonts = SimpleTypedList.new Font + @fonts = SimpleTypedList.new Font, 'fonts' @fonts << Font.new(:name => "Arial", :sz => 11, :family=>1) @fonts.lock - @fills = SimpleTypedList.new Fill + @fills = SimpleTypedList.new Fill, 'fills' @fills << Fill.new(Axlsx::PatternFill.new(:patternType=>:none)) @fills << Fill.new(Axlsx::PatternFill.new(:patternType=>:gray125)) @fills.lock - @borders = SimpleTypedList.new Border + @borders = SimpleTypedList.new Border, 'borders' @borders << Border.new black_border = Border.new [:left, :right, :top, :bottom].each do |item| black_border.prs << BorderPr.new(:name=>item, :style=>:thin, :color=>Color.new(:rgb=>"FF000000")) end @@ -279,10 +279,10 @@ @cellStyleXfs = SimpleTypedList.new Xf, "cellStyleXfs" @cellStyleXfs << Xf.new(:borderId=>0, :numFmtId=>0, :fontId=>0, :fillId=>0) @cellStyleXfs.lock - @cellStyles = SimpleTypedList.new CellStyle + @cellStyles = SimpleTypedList.new CellStyle, 'cellStyles' @cellStyles << CellStyle.new(:name =>"Normal", :builtinId =>0, :xfId=>0) @cellStyles.lock @cellXfs = SimpleTypedList.new Xf, "cellXfs" @cellXfs << Xf.new(:borderId=>0, :xfId=>0, :numFmtId=>0, :fontId=>0, :fillId=>0)