diff options
| author | Randy Morgan <[email protected]> | 2012-01-18 13:11:08 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-01-18 13:11:08 +0900 |
| commit | cf2f67a6b5dc41cc0d90b3fa7917bb8cffa67b2e (patch) | |
| tree | d23ed06b87d14c183928d8b77030192f44393501 /lib | |
| parent | c3459ef98ee4ede887d28dfacd1c0d62e0cddd29 (diff) | |
| download | caxlsx-cf2f67a6b5dc41cc0d90b3fa7917bb8cffa67b2e.tar.gz caxlsx-cf2f67a6b5dc41cc0d90b3fa7917bb8cffa67b2e.zip | |
remove linebreaks/indentation when saving to encourage interop with rubyXL
https://github.com/randym/axlsx/issues/19
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/content_type/content_type.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/doc_props/app.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/doc_props/core.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/drawing/chart.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/drawing/drawing.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/rels/relationships.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/workbook.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/lib/axlsx/content_type/content_type.rb b/lib/axlsx/content_type/content_type.rb index ac75a0d4..1685c9f8 100644 --- a/lib/axlsx/content_type/content_type.rb +++ b/lib/axlsx/content_type/content_type.rb @@ -17,7 +17,7 @@ module Axlsx each { |type| type.to_xml(xml) } } end - builder.to_xml + builder.to_xml(:save_with => 0) end end end diff --git a/lib/axlsx/doc_props/app.rb b/lib/axlsx/doc_props/app.rb index aaf60092..df3d919d 100644 --- a/lib/axlsx/doc_props/app.rb +++ b/lib/axlsx/doc_props/app.rb @@ -172,7 +172,7 @@ module Axlsx end } end - builder.to_xml + builder.to_xml(:save_with => 0) end end end diff --git a/lib/axlsx/doc_props/core.rb b/lib/axlsx/doc_props/core.rb index 6743ba34..72607fc6 100644 --- a/lib/axlsx/doc_props/core.rb +++ b/lib/axlsx/doc_props/core.rb @@ -28,7 +28,7 @@ module Axlsx xml['cp'].revision 0 } end - builder.to_xml + builder.to_xml(:save_with => 0) end end end diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb index d4e02991..9fd94ea6 100644 --- a/lib/axlsx/drawing/chart.rb +++ b/lib/axlsx/drawing/chart.rb @@ -145,7 +145,7 @@ module Axlsx } end - builder.to_xml + builder.to_xml(:save_with => 0) end # This is a short cut method to set the start anchor position diff --git a/lib/axlsx/drawing/drawing.rb b/lib/axlsx/drawing/drawing.rb index 6d779f7a..3775d8cc 100644 --- a/lib/axlsx/drawing/drawing.rb +++ b/lib/axlsx/drawing/drawing.rb @@ -131,7 +131,7 @@ module Axlsx anchors.each {|anchor| anchor.to_xml(xml) } } end - builder.to_xml + builder.to_xml(:save_with => 0) end end end diff --git a/lib/axlsx/rels/relationships.rb b/lib/axlsx/rels/relationships.rb index 9ee334a5..125082f4 100644 --- a/lib/axlsx/rels/relationships.rb +++ b/lib/axlsx/rels/relationships.rb @@ -18,7 +18,7 @@ require 'axlsx/rels/relationship.rb' each_with_index { |rel, index| rel.to_xml(xml, "rId#{index+1}") } } end - builder.to_xml + builder.to_xml(:save_with => 0) end end diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index cb858884..2ec568f0 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -246,7 +246,7 @@ module Axlsx end } end - builder.to_xml + builder.to_xml(:save_with => 0) end private diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index 60468870..edb02d81 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -144,7 +144,7 @@ require 'axlsx/workbook/worksheet/worksheet.rb' # @return [String] def to_xml() add_worksheet unless worksheets.size > 0 - builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| xml.workbook(:xmlns => XML_NS, :'xmlns:r' => XML_NS_R) { xml.workbookPr(:date1904=>@@date1904) #<x:workbookProtection workbookPassword="xsd:hexBinary data" lockStructure="1" lockWindows="1" /> @@ -155,7 +155,7 @@ require 'axlsx/workbook/worksheet/worksheet.rb' } } end - builder.to_xml(:indent=>0) + builder.to_xml(:save_with => 0) end end end diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index 8b0f8bfa..5256ceb9 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -256,7 +256,7 @@ module Axlsx xml.drawing :"r:id"=>"rId1" if @drawing } end - builder.to_xml + builder.to_xml(:save_with => 0) end # The worksheet relationships. This is managed automatically by the worksheet |
