lib/rspreadsheet/cell.rb in rspreadsheet-0.2.9 vs lib/rspreadsheet/cell.rb in rspreadsheet-0.2.10
- old
+ new
@@ -203,10 +203,11 @@
raise 'Formula string must begin with "=" character' unless formulastring[0,1] == '='
remove_all_value_attributes_and_content(xmlnode)
remove_all_type_attributes
Tools.set_ns_attribute(xmlnode,'table','formula','of:'+formulastring.to_s)
end
+ def blank?; self.type==:empty or self.type==:unassigned end
end
# proxy object to allow cell.format syntax. Also handles all logic for formats.
# @private
@@ -291,10 +292,9 @@
def cell_style_node; style_node_with_partial_xpath("/style:style[@style:name=\"#{style_name}\"]/style:table-cell-properties") end
def style_node_with_partial_xpath(xpath)
return nil if cellnode.nil?
cellnode.doc.root.find("./office:automatic-styles#{xpath}").first
end
-
end
end