summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
diff options
context:
space:
mode:
authorJurriaan Pruis <[email protected]>2014-01-15 23:44:02 +0100
committerJurriaan Pruis <[email protected]>2014-02-26 20:09:21 +0100
commitbe8e00332c73439cf17083173ea74f1505100df9 (patch)
tree383ec2e23fc0a14aa5ad90e139648a79814eeded /lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
parenta271a7d0f26ecb26d01aad00e094744d6fe8b0d2 (diff)
downloadcaxlsx-be8e00332c73439cf17083173ea74f1505100df9.tar.gz
caxlsx-be8e00332c73439cf17083173ea74f1505100df9.zip
Huge refactoring
Do not create huge strings Let Row inherit from SimpleTypedList Optimized sanitizing Optimized validation And more..
Diffstat (limited to 'lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb b/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
index 665384f4..f136b663 100644
--- a/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
+++ b/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb
@@ -47,13 +47,13 @@ module Axlsx
# @return [String]
def to_xml_string(str = '')
str << '<?xml version="1.0" encoding="UTF-8"?>'
- str << '<pivotCacheDefinition xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '" invalid="1" refreshOnLoad="1" recordCount="0">'
+ str << ('<pivotCacheDefinition xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '" invalid="1" refreshOnLoad="1" recordCount="0">')
str << '<cacheSource type="worksheet">'
- str << '<worksheetSource ref="' << pivot_table.range << '" sheet="' << pivot_table.data_sheet.name << '"/>'
+ str << ( '<worksheetSource ref="' << pivot_table.range << '" sheet="' << pivot_table.data_sheet.name << '"/>')
str << '</cacheSource>'
- str << '<cacheFields count="' << pivot_table.header_cells_count.to_s << '">'
+ str << ( '<cacheFields count="' << pivot_table.header_cells_count.to_s << '">')
pivot_table.header_cells.each do |cell|
- str << '<cacheField name="' << cell.value << '" numFmtId="0">'
+ str << ( '<cacheField name="' << cell.value << '" numFmtId="0">')
str << '<sharedItems count="0">'
str << '</sharedItems>'
str << '</cacheField>'