summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-02-22 21:28:17 +0900
committerRandy Morgan <[email protected]>2012-02-22 21:28:17 +0900
commitc8e48f19ada9b9ece648eba38ee8781d51e955e5 (patch)
treee599687d83e974dd554ce5bf65e4bf608797bed1
parentaf984e25fb761f55cdc1dd802bf87131a5675259 (diff)
downloadcaxlsx-c8e48f19ada9b9ece648eba38ee8781d51e955e5.tar.gz
caxlsx-c8e48f19ada9b9ece648eba38ee8781d51e955e5.zip
shadowed vars and bad indentation. shame, shame on me
-rw-r--r--lib/axlsx.rb4
-rw-r--r--lib/axlsx/drawing/chart.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/cell.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb
index b56f82cf..1dfdbd92 100644
--- a/lib/axlsx.rb
+++ b/lib/axlsx.rb
@@ -56,8 +56,8 @@ module Axlsx
def self.name_to_indices(name)
raise ArgumentError, 'invalid cell name' unless name.size > 1
- v = name[/[A-Z]+/].reverse.chars.reduce({:base=>1, :i=>0}) do |v, c|
- v[:i] += ((c.bytes.first - 65) + v[:base]); v[:base] *= 26; v
+ v = name[/[A-Z]+/].reverse.chars.reduce({:base=>1, :i=>0}) do |val, c|
+ val[:i] += ((c.bytes.first - 65) + val[:base]); val[:base] *= 26; val
end
[v[:i]-1, ((name[/[1-9]+/]).to_i)-1]
diff --git a/lib/axlsx/drawing/chart.rb b/lib/axlsx/drawing/chart.rb
index 831dff8b..0a8068df 100644
--- a/lib/axlsx/drawing/chart.rb
+++ b/lib/axlsx/drawing/chart.rb
@@ -137,7 +137,7 @@ module Axlsx
xml.layout
xml.overlay :val => 0
}
- end
+ end
xml.plotVisOnly :val => 1
xml.dispBlanksAs :val => :zero
xml.showDLblsOverMax :val => 1
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb
index 9e4dbdc2..5e7f594f 100644
--- a/lib/axlsx/workbook/worksheet/cell.rb
+++ b/lib/axlsx/workbook/worksheet/cell.rb
@@ -205,8 +205,8 @@ module Axlsx
def shareable(v)
#using reject becase 1.8.7 select returns an array...
- v_hash = v.instance_values.reject { |k, v| !INLINE_STYLES.include?(k) }
- self_hash = self.instance_values.reject { |k, v| !INLINE_STYLES.include?(k) }
+ v_hash = v.instance_values.reject { |key, val| !INLINE_STYLES.include?(key) }
+ self_hash = self.instance_values.reject { |key, val| !INLINE_STYLES.include?(key) }
# required as color is an object, and the comparison will fail even though both use the same color.
v_hash['color'] = v_hash['color'].instance_values if v_hash['color']
self_hash['color'] = self_hash['color'].instance_values if self_hash['color']