summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-04-01 12:18:18 +0900
committerRandy Morgan <[email protected]>2012-04-01 12:18:18 +0900
commit1c39d461fa0355ccad7476f31471381e64798cdd (patch)
tree9c273201aadd38347270e02f5a278edbdcec9651
parent8126297213b209d928911445cdc8ba520da08bb3 (diff)
parentb11537d6cb1835a509f1a9f6e8dcd0fc3a910c6b (diff)
downloadcaxlsx-1c39d461fa0355ccad7476f31471381e64798cdd.tar.gz
caxlsx-1c39d461fa0355ccad7476f31471381e64798cdd.zip
Merge branch 'master' of github.com:randym/axlsx
-rw-r--r--lib/axlsx/workbook/worksheet/cell.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb
index 015c4b91..13140786 100644
--- a/lib/axlsx/workbook/worksheet/cell.rb
+++ b/lib/axlsx/workbook/worksheet/cell.rb
@@ -226,7 +226,8 @@ module Axlsx
# equality comparison to test value, type and inline style attributes
# this is how we work out if the cell needs to be added or already exists in the shared strings table
def shareable_hash
- self_hash = self.instance_values.reject { |key, val| !INLINE_STYLES.include?(key) }
+ self_hash = {}
+ INLINE_STYLES.each { |style| self_hash[style] = self.instance_variable_get("@" + style) }
self_hash['color'] = self_hash['color'].instance_values if self_hash['color']
self_hash
end