diff options
| author | Paul Kmiec <[email protected]> | 2023-05-04 16:31:08 -0700 |
|---|---|---|
| committer | Paul Kmiec <[email protected]> | 2023-05-04 18:02:55 -0700 |
| commit | fabe8cb2571c8865270247ca78ddc01d493a9ee1 (patch) | |
| tree | 27fe0b0df8c9bec8f746d92a0d128cad197027b2 /lib/axlsx/drawing/chart.rb | |
| parent | fef93ec8ae2caf8a3f8310dbf8101c103e5905e4 (diff) | |
| download | caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.tar.gz caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.zip | |
Fix tests / code to work with frozen string literals
Diffstat (limited to 'lib/axlsx/drawing/chart.rb')
| -rw-r--r-- | lib/axlsx/drawing/chart.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb index 636c1713..300a5086 100644 --- a/lib/axlsx/drawing/chart.rb +++ b/lib/axlsx/drawing/chart.rb @@ -204,15 +204,15 @@ module Axlsx # Serializes the object # @param [String] str # @return [String] - def to_xml_string(str = '') + def to_xml_string(str = +'') str << '<?xml version="1.0" encoding="UTF-8"?>' - str << ('<c:chartSpace xmlns:c="' << XML_NS_C << '" xmlns:a="' << XML_NS_A << '" xmlns:r="' << XML_NS_R << '">') - str << ('<c:date1904 val="' << Axlsx::Workbook.date1904.to_s << '"/>') - str << ('<c:roundedCorners val="' << rounded_corners.to_s << '"/>') - str << ('<c:style val="' << style.to_s << '"/>') + str << (+'<c:chartSpace xmlns:c="' << XML_NS_C << '" xmlns:a="' << XML_NS_A << '" xmlns:r="' << XML_NS_R << '">') + str << (+'<c:date1904 val="' << Axlsx::Workbook.date1904.to_s << '"/>') + str << (+'<c:roundedCorners val="' << rounded_corners.to_s << '"/>') + str << (+'<c:style val="' << style.to_s << '"/>') str << '<c:chart>' @title.to_xml_string(str) unless @title.empty? - str << ('<c:autoTitleDeleted val="' << @title.nil?.to_s << '"/>') + str << (+'<c:autoTitleDeleted val="' << @title.nil?.to_s << '"/>') @view_3D.to_xml_string(str) if @view_3D str << '<c:floor><c:thickness val="0"/></c:floor>' str << '<c:sideWall><c:thickness val="0"/></c:sideWall>' @@ -223,13 +223,13 @@ module Axlsx str << '</c:plotArea>' if @show_legend str << '<c:legend>' - str << ('<c:legendPos val="' << @legend_position.to_s << '"/>') + str << (+'<c:legendPos val="' << @legend_position.to_s << '"/>') str << '<c:layout/>' str << '<c:overlay val="0"/>' str << '</c:legend>' end - str << ('<c:plotVisOnly val="' << @plot_visible_only.to_s << '"/>') - str << ('<c:dispBlanksAs val="' << display_blanks_as.to_s << '"/>') + str << (+'<c:plotVisOnly val="' << @plot_visible_only.to_s << '"/>') + str << (+'<c:dispBlanksAs val="' << display_blanks_as.to_s << '"/>') str << '<c:showDLblsOverMax val="1"/>' str << '</c:chart>' if bg_color |
