diff options
| author | Randy Morgan <[email protected]> | 2013-08-17 14:45:24 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2013-08-17 14:45:24 +0900 |
| commit | 2df443781d2a06d78ebed9a7915cb3544acb37e6 (patch) | |
| tree | a4ecccda80d0a6a6820d0929e26939ced9324bbc /lib | |
| parent | af1c2d1f5692f925a6dfd51cf2cb7d25a1ece0f6 (diff) | |
| download | caxlsx-2df443781d2a06d78ebed9a7915cb3544acb37e6.tar.gz caxlsx-2df443781d2a06d78ebed9a7915cb3544acb37e6.zip | |
whitespace and debug cleanup
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 10 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell_serializer.rb | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index abd60661..e83e456a 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -302,7 +302,7 @@ module Axlsx def to_xml_string(r_index, c_index, str = '') CellSerializer.to_xml_string r_index, c_index, self, str end - + def is_formula? @type == :string && @value.to_s.start_with?('=') end @@ -318,9 +318,9 @@ module Axlsx end # returns the absolute or relative string style reference for - # this cell. + # this cell. # @param [Boolean] absolute -when false a relative reference will be - # returned. + # returned. # @return [String] def reference(absolute=true) absolute ? r_abs : r @@ -353,7 +353,7 @@ module Axlsx # assigns the owning row for this cell. def row=(v) @row=v end - + # Determines the cell type based on the cell value. # @note This is only used when a cell is created but no :type option is specified, the following rules apply: # 1. If the value is an instance of Date, the type is set to :date @@ -375,7 +375,7 @@ module Axlsx :float # \A(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9]) # T(2[0-3]|[0-1][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)? - # (Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?\Z + # (Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?\Z elsif v.to_s =~/\A(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])T(2[0-3]|[0-1][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?\Z/ :iso_8601 else diff --git a/lib/axlsx/workbook/worksheet/cell_serializer.rb b/lib/axlsx/workbook/worksheet/cell_serializer.rb index e4c35c3a..1fb8f5d8 100644 --- a/lib/axlsx/workbook/worksheet/cell_serializer.rb +++ b/lib/axlsx/workbook/worksheet/cell_serializer.rb @@ -136,7 +136,7 @@ module Axlsx def value_serialization(serialization_type, serialization_value, str = '') str << 't="' << serialization_type << '"' if serialization_type str << '><v>' << serialization_value << '</v>' - end + end end |
