diff options
Diffstat (limited to 'lib/axlsx/stylesheet')
| -rw-r--r-- | lib/axlsx/stylesheet/border_pr.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/font.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/gradient_stop.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/pattern_fill.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/lib/axlsx/stylesheet/border_pr.rb b/lib/axlsx/stylesheet/border_pr.rb index 154b25f4..ad4e29fa 100644 --- a/lib/axlsx/stylesheet/border_pr.rb +++ b/lib/axlsx/stylesheet/border_pr.rb @@ -63,9 +63,9 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = +'') - str << (+'<' << @name.to_s << ' style="' << @style.to_s << '">') + str << '<' << @name.to_s << ' style="' << @style.to_s << '">' @color.to_xml_string(str) if @color.is_a?(Color) - str << (+'</' << @name.to_s << '>') + str << '</' << @name.to_s << '>' end end end diff --git a/lib/axlsx/stylesheet/font.rb b/lib/axlsx/stylesheet/font.rb index 463b8fc0..8b183b6e 100644 --- a/lib/axlsx/stylesheet/font.rb +++ b/lib/axlsx/stylesheet/font.rb @@ -151,7 +151,7 @@ module Axlsx def to_xml_string(str = +'') str << '<font>' Axlsx.instance_values_for(self).each do |k, v| - v.is_a?(Color) ? v.to_xml_string(str) : (str << (+'<' << k.to_s << ' val="' << Axlsx.booleanize(v).to_s << '"/>')) + v.is_a?(Color) ? v.to_xml_string(str) : (str << '<' << k.to_s << ' val="' << Axlsx.booleanize(v).to_s << '"/>') end str << '</font>' end diff --git a/lib/axlsx/stylesheet/gradient_stop.rb b/lib/axlsx/stylesheet/gradient_stop.rb index 83f39a55..dd0ea00f 100644 --- a/lib/axlsx/stylesheet/gradient_stop.rb +++ b/lib/axlsx/stylesheet/gradient_stop.rb @@ -30,7 +30,7 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = +'') - str << (+'<stop position="' << position.to_s << '">') + str << '<stop position="' << position.to_s << '">' self.color.to_xml_string(str) str << '</stop>' end diff --git a/lib/axlsx/stylesheet/pattern_fill.rb b/lib/axlsx/stylesheet/pattern_fill.rb index cabce9f5..9f92dc00 100644 --- a/lib/axlsx/stylesheet/pattern_fill.rb +++ b/lib/axlsx/stylesheet/pattern_fill.rb @@ -59,7 +59,7 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = +'') - str << (+'<patternFill patternType="' << patternType.to_s << '">') + str << '<patternFill patternType="' << patternType.to_s << '">' if fgColor.is_a?(Color) fgColor.to_xml_string str, "fgColor" end diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index 809630f2..7b44c023 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -486,7 +486,7 @@ module Axlsx # @param [String] str # @return [String] def to_xml_string(str = +'') - str << (+'<styleSheet xmlns="' << XML_NS << '">') + str << '<styleSheet xmlns="' << XML_NS << '">' instance_vals = Axlsx.instance_values_for(self) [:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key| instance_vals[key.to_s].to_xml_string(str) unless instance_vals[key.to_s].nil? |
