rubyXL 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rubyXL/objects/calculation_chain.rb +1 -1
- data/lib/rubyXL/objects/column_range.rb +1 -1
- data/lib/rubyXL/objects/sheet_data.rb +7 -7
- data/lib/rubyXL/objects/worksheet.rb +1 -1
- data/lib/rubyXL/worksheet.rb +23 -26
- data/rdoc/RubyXL/LegacyWorksheet.html +49 -52
- data/rdoc/created.rid +41 -41
- data/rdoc/js/search_index.js +1 -1
- data/rubyXL.gemspec +2 -2
- metadata +76 -107
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.1
|
@@ -19,7 +19,7 @@ module RubyXL
|
|
19
19
|
define_child_node(RubyXL::ExtensionStorageArea)
|
20
20
|
|
21
21
|
define_element_name 'calcChain'
|
22
|
-
set_namespaces('xmlns'
|
22
|
+
set_namespaces('xmlns' => 'http://schemas.openxmlformats.org/spreadsheetml/2006/main')
|
23
23
|
|
24
24
|
def self.filepath
|
25
25
|
File.join('xl', 'calcChain.xml')
|
@@ -7,7 +7,7 @@ module RubyXL
|
|
7
7
|
define_attribute(:min, :int, :required => true)
|
8
8
|
define_attribute(:max, :int, :required => true)
|
9
9
|
define_attribute(:width, :float)
|
10
|
-
define_attribute(:style, :int, :default => 0)
|
10
|
+
define_attribute(:style, :int, :default => 0, :accessor => :style_index)
|
11
11
|
define_attribute(:hidden, :bool, :default => false)
|
12
12
|
define_attribute(:bestFit, :bool, :default => false)
|
13
13
|
define_attribute(:customWidth, :bool, :default => false)
|
@@ -14,11 +14,11 @@ module RubyXL
|
|
14
14
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_c-2.html
|
15
15
|
class Cell < OOXMLObject
|
16
16
|
define_attribute(:r, :ref)
|
17
|
-
define_attribute(:s, :int,
|
18
|
-
define_attribute(:t, RubyXL::ST_CellType,
|
19
|
-
define_attribute(:cm, :int)
|
20
|
-
define_attribute(:vm, :int)
|
21
|
-
define_attribute(:ph, :bool)
|
17
|
+
define_attribute(:s, :int, :default => 0, :accessor => :style_index)
|
18
|
+
define_attribute(:t, RubyXL::ST_CellType, :accessor => :datatype, :default => 'n' )
|
19
|
+
define_attribute(:cm, :int, :default => 0)
|
20
|
+
define_attribute(:vm, :int, :default => 0)
|
21
|
+
define_attribute(:ph, :bool, :default => false)
|
22
22
|
define_child_node(RubyXL::Formula, :accessor => :formula)
|
23
23
|
define_child_node(RubyXL::CellValue, :accessor => :value_container)
|
24
24
|
define_child_node(RubyXL::RichText) # is
|
@@ -78,7 +78,7 @@ module RubyXL
|
|
78
78
|
class Row < OOXMLObject
|
79
79
|
define_attribute(:r, :int)
|
80
80
|
define_attribute(:spans, :string)
|
81
|
-
define_attribute(:s, :int)
|
81
|
+
define_attribute(:s, :int, :default => 0, :accessor => :style_index)
|
82
82
|
define_attribute(:customFormat, :bool, :default => false)
|
83
83
|
define_attribute(:ht, :float)
|
84
84
|
define_attribute(:hidden, :bool, :default => false)
|
@@ -124,7 +124,7 @@ module RubyXL
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def xf
|
127
|
-
@worksheet.workbook.cell_xfs[self.
|
127
|
+
@worksheet.workbook.cell_xfs[self.style_index || 0]
|
128
128
|
end
|
129
129
|
|
130
130
|
def get_fill_color
|
data/lib/rubyXL/worksheet.rb
CHANGED
@@ -106,7 +106,7 @@ module LegacyWorksheet
|
|
106
106
|
ensure_cell_exists(row_index)
|
107
107
|
Color.validate_color(rgb)
|
108
108
|
|
109
|
-
sheet_data.rows[row_index].
|
109
|
+
sheet_data.rows[row_index].style_index = @workbook.modify_fill(get_row_style(row_index), rgb)
|
110
110
|
sheet_data[row_index].cells.each { |c| c.change_fill(rgb) unless c.nil? }
|
111
111
|
end
|
112
112
|
|
@@ -124,7 +124,7 @@ module LegacyWorksheet
|
|
124
124
|
change_row_font(row, Worksheet::SIZE, font_size, font)
|
125
125
|
end
|
126
126
|
|
127
|
-
def change_row_font_color(row = 0, font_color='000000')
|
127
|
+
def change_row_font_color(row = 0, font_color = '000000')
|
128
128
|
ensure_cell_exists(row)
|
129
129
|
Color.validate_color(font_color)
|
130
130
|
font = row_font(row).dup
|
@@ -132,14 +132,14 @@ module LegacyWorksheet
|
|
132
132
|
change_row_font(row, Worksheet::COLOR, font_color, font)
|
133
133
|
end
|
134
134
|
|
135
|
-
def change_row_italics(row = 0, italicized=false)
|
135
|
+
def change_row_italics(row = 0, italicized = false)
|
136
136
|
ensure_cell_exists(row)
|
137
137
|
font = row_font(row).dup
|
138
138
|
font.set_italic(italicized)
|
139
139
|
change_row_font(row, Worksheet::ITALICS, italicized, font)
|
140
140
|
end
|
141
141
|
|
142
|
-
def change_row_bold(row = 0, bolded=false)
|
142
|
+
def change_row_bold(row = 0, bolded = false)
|
143
143
|
ensure_cell_exists(row)
|
144
144
|
font = row_font(row).dup
|
145
145
|
font.set_bold(bolded)
|
@@ -276,7 +276,7 @@ module LegacyWorksheet
|
|
276
276
|
Color.validate_color(color_index)
|
277
277
|
ensure_cell_exists(0, column_index)
|
278
278
|
|
279
|
-
cols.get_range(column_index).
|
279
|
+
cols.get_range(column_index).style_index = @workbook.modify_fill(get_col_style(column_index), color_index)
|
280
280
|
|
281
281
|
sheet_data.rows.each { |row|
|
282
282
|
c = row[column_index]
|
@@ -340,7 +340,7 @@ module LegacyWorksheet
|
|
340
340
|
c.formula = formula
|
341
341
|
|
342
342
|
range = cols && cols.find(column)
|
343
|
-
c.style_index = sheet_data.rows[row].
|
343
|
+
c.style_index = sheet_data.rows[row].style_index || (range && range.style_index) || 0
|
344
344
|
|
345
345
|
sheet_data.rows[row].cells[column] = c
|
346
346
|
end
|
@@ -384,7 +384,7 @@ module LegacyWorksheet
|
|
384
384
|
end
|
385
385
|
|
386
386
|
sheet_data.rows.insert(row_index, nil)
|
387
|
-
new_row = add_row(row_index, :cells => new_cells, :
|
387
|
+
new_row = add_row(row_index, :cells => new_cells, :style_index => old_row && old_row.style_index)
|
388
388
|
|
389
389
|
#update row value for all rows below
|
390
390
|
row_index.upto(sheet_data.rows.size - 1) { |i|
|
@@ -428,14 +428,11 @@ module LegacyWorksheet
|
|
428
428
|
c = nil
|
429
429
|
|
430
430
|
if old_cell && old_cell.style_index != 0 &&
|
431
|
-
old_range && old_range.
|
432
|
-
|
433
|
-
c = Cell.new
|
434
|
-
|
435
|
-
|
436
|
-
c.column = column_index
|
437
|
-
c.datatype = RubyXL::Cell::SHARED_STRING
|
438
|
-
c.style_index = old_cell.style_index
|
431
|
+
old_range && old_range.style_index != old_cell.style_index then
|
432
|
+
|
433
|
+
c = RubyXL::Cell.new(:style_index => old_cell.style_index, :worksheet => self,
|
434
|
+
:row => row_index, :column => column_index,
|
435
|
+
:datatype => RubyXL::Cell::SHARED_STRING)
|
439
436
|
end
|
440
437
|
|
441
438
|
row.insert_cell_shift_right(c, column_index)
|
@@ -722,7 +719,7 @@ module LegacyWorksheet
|
|
722
719
|
|
723
720
|
def get_cols_style_index(column_index)
|
724
721
|
range = cols.find(column_index)
|
725
|
-
(range && range.
|
722
|
+
(range && range.style_index) || 0
|
726
723
|
end
|
727
724
|
|
728
725
|
# Helper method to update the row styles array
|
@@ -733,7 +730,7 @@ module LegacyWorksheet
|
|
733
730
|
ensure_cell_exists(row)
|
734
731
|
|
735
732
|
xf = workbook.register_new_font(font, get_row_xf(row))
|
736
|
-
sheet_data.rows[row].
|
733
|
+
sheet_data.rows[row].style_index = workbook.register_new_xf(xf, get_row_style(row))
|
737
734
|
|
738
735
|
sheet_data[row].cells.each { |c| font_switch(c, change_type, arg) unless c.nil? }
|
739
736
|
end
|
@@ -746,7 +743,7 @@ module LegacyWorksheet
|
|
746
743
|
|
747
744
|
xf = workbook.register_new_font(font, xf)
|
748
745
|
|
749
|
-
cols.get_range(column_index).
|
746
|
+
cols.get_range(column_index).style_index = workbook.register_new_xf(xf, get_col_style(column_index))
|
750
747
|
|
751
748
|
sheet_data.rows.each { |row|
|
752
749
|
c = row[column_index]
|
@@ -828,12 +825,12 @@ module LegacyWorksheet
|
|
828
825
|
# Helper method to get the style index for a column
|
829
826
|
def get_col_style(column_index)
|
830
827
|
range = cols.find(column_index)
|
831
|
-
(range && range.
|
828
|
+
(range && range.style_index) || 0
|
832
829
|
end
|
833
830
|
|
834
|
-
def get_row_style(
|
835
|
-
|
836
|
-
(
|
831
|
+
def get_row_style(row_index)
|
832
|
+
row = sheet_data.rows[row_index]
|
833
|
+
(row && row.style_index) || 0
|
837
834
|
end
|
838
835
|
|
839
836
|
def get_col_xf(column_index)
|
@@ -849,7 +846,7 @@ module LegacyWorksheet
|
|
849
846
|
validate_nonnegative(row)
|
850
847
|
ensure_cell_exists(row)
|
851
848
|
|
852
|
-
sheet_data.rows[row].
|
849
|
+
sheet_data.rows[row].style_index = @workbook.modify_alignment(get_row_style(row), is_horizontal, alignment)
|
853
850
|
|
854
851
|
sheet_data[row].cells.each { |c|
|
855
852
|
next if c.nil?
|
@@ -863,7 +860,7 @@ module LegacyWorksheet
|
|
863
860
|
validate_workbook
|
864
861
|
ensure_cell_exists(0, column_index)
|
865
862
|
|
866
|
-
cols.get_range(column_index).
|
863
|
+
cols.get_range(column_index).style_index = @workbook.modify_alignment(get_col_style(column_index), is_horizontal, alignment)
|
867
864
|
|
868
865
|
sheet_data.rows.each { |row|
|
869
866
|
c = row[column_index]
|
@@ -880,7 +877,7 @@ module LegacyWorksheet
|
|
880
877
|
validate_workbook
|
881
878
|
ensure_cell_exists(row)
|
882
879
|
|
883
|
-
sheet_data.rows[row].
|
880
|
+
sheet_data.rows[row].style_index = @workbook.modify_border(get_row_style(row), direction, weight)
|
884
881
|
|
885
882
|
sheet_data[row].cells.each { |c|
|
886
883
|
next if c.nil?
|
@@ -899,7 +896,7 @@ module LegacyWorksheet
|
|
899
896
|
validate_workbook
|
900
897
|
ensure_cell_exists(0, column_index)
|
901
898
|
|
902
|
-
cols.get_range(column_index).
|
899
|
+
cols.get_range(column_index).style_index = @workbook.modify_border(get_col_style(column_index), direction, weight)
|
903
900
|
|
904
901
|
sheet_data.rows.each { |row|
|
905
902
|
c = row.cells[column_index]
|
@@ -478,7 +478,7 @@
|
|
478
478
|
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">formula</span> = <span class="ruby-identifier">formula</span>
|
479
479
|
|
480
480
|
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">column</span>)
|
481
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">
|
481
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
|
482
482
|
|
483
483
|
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column</span>] = <span class="ruby-identifier">c</span>
|
484
484
|
<span class="ruby-keyword">end</span>
|
@@ -758,7 +758,7 @@
|
|
758
758
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color_index</span>)
|
759
759
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
760
760
|
|
761
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">
|
761
|
+
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">color_index</span>)
|
762
762
|
|
763
763
|
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
|
764
764
|
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
@@ -1101,7 +1101,7 @@
|
|
1101
1101
|
|
1102
1102
|
<div class="method-heading">
|
1103
1103
|
<span class="method-name">change_row_bold</span><span
|
1104
|
-
class="method-args">(row = 0, bolded=false)</span>
|
1104
|
+
class="method-args">(row = 0, bolded = false)</span>
|
1105
1105
|
|
1106
1106
|
<span class="method-click-advice">click to toggle source</span>
|
1107
1107
|
|
@@ -1117,7 +1117,7 @@
|
|
1117
1117
|
|
1118
1118
|
<div class="method-source-code" id="change_row_bold-source">
|
1119
1119
|
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 142</span>
|
1120
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_bold</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">bolded</span
|
1120
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_bold</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
|
1121
1121
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1122
1122
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
1123
1123
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
|
@@ -1323,7 +1323,7 @@
|
|
1323
1323
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
|
1324
1324
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">rgb</span>)
|
1325
1325
|
|
1326
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">
|
1326
|
+
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row_index</span>), <span class="ruby-identifier">rgb</span>)
|
1327
1327
|
<span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">rgb</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
|
1328
1328
|
<span class="ruby-keyword">end</span></pre>
|
1329
1329
|
</div>
|
@@ -1340,7 +1340,7 @@
|
|
1340
1340
|
|
1341
1341
|
<div class="method-heading">
|
1342
1342
|
<span class="method-name">change_row_font_color</span><span
|
1343
|
-
class="method-args">(row = 0, font_color='000000')</span>
|
1343
|
+
class="method-args">(row = 0, font_color = '000000')</span>
|
1344
1344
|
|
1345
1345
|
<span class="method-click-advice">click to toggle source</span>
|
1346
1346
|
|
@@ -1356,7 +1356,7 @@
|
|
1356
1356
|
|
1357
1357
|
<div class="method-source-code" id="change_row_font_color-source">
|
1358
1358
|
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 127</span>
|
1359
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_color</span
|
1359
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_color</span> = <span class="ruby-string">'000000'</span>)
|
1360
1360
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1361
1361
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
|
1362
1362
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
@@ -1529,7 +1529,7 @@
|
|
1529
1529
|
|
1530
1530
|
<div class="method-heading">
|
1531
1531
|
<span class="method-name">change_row_italics</span><span
|
1532
|
-
class="method-args">(row = 0, italicized=false)</span>
|
1532
|
+
class="method-args">(row = 0, italicized = false)</span>
|
1533
1533
|
|
1534
1534
|
<span class="method-click-advice">click to toggle source</span>
|
1535
1535
|
|
@@ -1545,7 +1545,7 @@
|
|
1545
1545
|
|
1546
1546
|
<div class="method-source-code" id="change_row_italics-source">
|
1547
1547
|
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 135</span>
|
1548
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_italics</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">italicized</span
|
1548
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_italics</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
|
1549
1549
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1550
1550
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
1551
1551
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
|
@@ -1689,7 +1689,7 @@ specified, method will shift column contents below the deleted cell upward</p>
|
|
1689
1689
|
|
1690
1690
|
|
1691
1691
|
<div class="method-source-code" id="delete_cell-source">
|
1692
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
1692
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 469</span>
|
1693
1693
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_cell</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">shift</span>=<span class="ruby-keyword">nil</span>)
|
1694
1694
|
<span class="ruby-identifier">validate_workbook</span>
|
1695
1695
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
@@ -1906,7 +1906,7 @@ information)</p>
|
|
1906
1906
|
|
1907
1907
|
|
1908
1908
|
<div class="method-source-code" id="get_column_border_bottom-source">
|
1909
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
1909
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 637</span>
|
1910
1910
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border_bottom</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
1911
1911
|
<span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-value">:bottom</span>)
|
1912
1912
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1939,7 +1939,7 @@ information)</p>
|
|
1939
1939
|
|
1940
1940
|
|
1941
1941
|
<div class="method-source-code" id="get_column_border_diagonal-source">
|
1942
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
1942
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 641</span>
|
1943
1943
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border_diagonal</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
1944
1944
|
<span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-value">:diagonal</span>)
|
1945
1945
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1972,7 +1972,7 @@ information)</p>
|
|
1972
1972
|
|
1973
1973
|
|
1974
1974
|
<div class="method-source-code" id="get_column_border_left-source">
|
1975
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
1975
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 629</span>
|
1976
1976
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border_left</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
1977
1977
|
<span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-value">:left</span>)
|
1978
1978
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2005,7 +2005,7 @@ information)</p>
|
|
2005
2005
|
|
2006
2006
|
|
2007
2007
|
<div class="method-source-code" id="get_column_border_right-source">
|
2008
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2008
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 633</span>
|
2009
2009
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border_right</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
2010
2010
|
<span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-value">:right</span>)
|
2011
2011
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2038,7 +2038,7 @@ information)</p>
|
|
2038
2038
|
|
2039
2039
|
|
2040
2040
|
<div class="method-source-code" id="get_column_border_top-source">
|
2041
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2041
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 625</span>
|
2042
2042
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border_top</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
2043
2043
|
<span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-value">:top</span>)
|
2044
2044
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2071,7 +2071,7 @@ information)</p>
|
|
2071
2071
|
|
2072
2072
|
|
2073
2073
|
<div class="method-source-code" id="get_column_fill-source">
|
2074
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2074
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 609</span>
|
2075
2075
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_fill</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
2076
2076
|
<span class="ruby-identifier">validate_workbook</span>
|
2077
2077
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">col</span>)
|
@@ -2108,7 +2108,7 @@ information)</p>
|
|
2108
2108
|
|
2109
2109
|
|
2110
2110
|
<div class="method-source-code" id="get_column_font_color-source">
|
2111
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2111
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 575</span>
|
2112
2112
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_color</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
2113
2113
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2114
2114
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_rgb_color</span> <span class="ruby-operator">||</span> <span class="ruby-string">'000000'</span>)
|
@@ -2142,7 +2142,7 @@ information)</p>
|
|
2142
2142
|
|
2143
2143
|
|
2144
2144
|
<div class="method-source-code" id="get_column_font_name-source">
|
2145
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2145
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 565</span>
|
2146
2146
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_name</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
2147
2147
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2148
2148
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
|
@@ -2176,7 +2176,7 @@ information)</p>
|
|
2176
2176
|
|
2177
2177
|
|
2178
2178
|
<div class="method-source-code" id="get_column_font_size-source">
|
2179
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2179
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 570</span>
|
2180
2180
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_size</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
2181
2181
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2182
2182
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
|
@@ -2210,7 +2210,7 @@ information)</p>
|
|
2210
2210
|
|
2211
2211
|
|
2212
2212
|
<div class="method-source-code" id="get_column_horizontal_alignment-source">
|
2213
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2213
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 617</span>
|
2214
2214
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_horizontal_alignment</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
2215
2215
|
<span class="ruby-identifier">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-value">:horizontal</span>)
|
2216
2216
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2243,7 +2243,7 @@ information)</p>
|
|
2243
2243
|
|
2244
2244
|
|
2245
2245
|
<div class="method-source-code" id="get_column_vertical_alignment-source">
|
2246
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2246
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 621</span>
|
2247
2247
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_vertical_alignment</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
2248
2248
|
<span class="ruby-identifier">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-value">:vertical</span>)
|
2249
2249
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2276,7 +2276,7 @@ information)</p>
|
|
2276
2276
|
|
2277
2277
|
|
2278
2278
|
<div class="method-source-code" id="get_column_width-source">
|
2279
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2279
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 600</span>
|
2280
2280
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_width</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
2281
2281
|
<span class="ruby-identifier">validate_workbook</span>
|
2282
2282
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
@@ -2314,7 +2314,7 @@ information)</p>
|
|
2314
2314
|
|
2315
2315
|
|
2316
2316
|
<div class="method-source-code" id="get_row_border_bottom-source">
|
2317
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2317
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 557</span>
|
2318
2318
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_bottom</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2319
2319
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-value">:bottom</span>)
|
2320
2320
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2347,7 +2347,7 @@ information)</p>
|
|
2347
2347
|
|
2348
2348
|
|
2349
2349
|
<div class="method-source-code" id="get_row_border_diagonal-source">
|
2350
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2350
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 561</span>
|
2351
2351
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_diagonal</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2352
2352
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-value">:diagonal</span>)
|
2353
2353
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2380,7 +2380,7 @@ information)</p>
|
|
2380
2380
|
|
2381
2381
|
|
2382
2382
|
<div class="method-source-code" id="get_row_border_left-source">
|
2383
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2383
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 549</span>
|
2384
2384
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_left</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2385
2385
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-value">:left</span>)
|
2386
2386
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2413,7 +2413,7 @@ information)</p>
|
|
2413
2413
|
|
2414
2414
|
|
2415
2415
|
<div class="method-source-code" id="get_row_border_right-source">
|
2416
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2416
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 553</span>
|
2417
2417
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_right</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2418
2418
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-value">:right</span>)
|
2419
2419
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2446,7 +2446,7 @@ information)</p>
|
|
2446
2446
|
|
2447
2447
|
|
2448
2448
|
<div class="method-source-code" id="get_row_border_top-source">
|
2449
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2449
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 545</span>
|
2450
2450
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_top</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2451
2451
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-value">:top</span>)
|
2452
2452
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2479,7 +2479,7 @@ information)</p>
|
|
2479
2479
|
|
2480
2480
|
|
2481
2481
|
<div class="method-source-code" id="get_row_fill-source">
|
2482
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2482
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 495</span>
|
2483
2483
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_fill</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2484
2484
|
(<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]) <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_fill_color</span>
|
2485
2485
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2512,7 +2512,7 @@ information)</p>
|
|
2512
2512
|
|
2513
2513
|
|
2514
2514
|
<div class="method-source-code" id="get_row_font_color-source">
|
2515
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2515
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 507</span>
|
2516
2516
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2517
2517
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
|
2518
2518
|
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">color</span>
|
@@ -2547,7 +2547,7 @@ information)</p>
|
|
2547
2547
|
|
2548
2548
|
|
2549
2549
|
<div class="method-source-code" id="get_row_font_name-source">
|
2550
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2550
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 499</span>
|
2551
2551
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2552
2552
|
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
|
2553
2553
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2580,7 +2580,7 @@ information)</p>
|
|
2580
2580
|
|
2581
2581
|
|
2582
2582
|
<div class="method-source-code" id="get_row_font_size-source">
|
2583
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2583
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 503</span>
|
2584
2584
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2585
2585
|
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
|
2586
2586
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2613,7 +2613,7 @@ information)</p>
|
|
2613
2613
|
|
2614
2614
|
|
2615
2615
|
<div class="method-source-code" id="get_row_height-source">
|
2616
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2616
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 529</span>
|
2617
2617
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2618
2618
|
<span class="ruby-identifier">validate_workbook</span>
|
2619
2619
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
@@ -2650,7 +2650,7 @@ information)</p>
|
|
2650
2650
|
|
2651
2651
|
|
2652
2652
|
<div class="method-source-code" id="get_row_horizontal_alignment-source">
|
2653
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2653
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 537</span>
|
2654
2654
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_horizontal_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2655
2655
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-keyword">true</span>)
|
2656
2656
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2683,7 +2683,7 @@ information)</p>
|
|
2683
2683
|
|
2684
2684
|
|
2685
2685
|
<div class="method-source-code" id="get_row_vertical_alignment-source">
|
2686
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2686
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 541</span>
|
2687
2687
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_vertical_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
2688
2688
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-keyword">false</span>)
|
2689
2689
|
<span class="ruby-keyword">end</span></pre>
|
@@ -2797,7 +2797,7 @@ information)</p>
|
|
2797
2797
|
|
2798
2798
|
|
2799
2799
|
<div class="method-source-code" id="insert_cell-source">
|
2800
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2800
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 446</span>
|
2801
2801
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_cell</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">data</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">formula</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">shift</span> = <span class="ruby-keyword">nil</span>)
|
2802
2802
|
<span class="ruby-identifier">validate_workbook</span>
|
2803
2803
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>)
|
@@ -2861,14 +2861,11 @@ reference cells which are being “pushed down”</p>
|
|
2861
2861
|
<span class="ruby-identifier">c</span> = <span class="ruby-keyword">nil</span>
|
2862
2862
|
|
2863
2863
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">old_cell</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span>
|
2864
|
-
<span class="ruby-identifier">old_range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">old_range</span>.<span class="ruby-identifier">
|
2865
|
-
|
2866
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>
|
2867
|
-
|
2868
|
-
|
2869
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">column</span> = <span class="ruby-identifier">column_index</span>
|
2870
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">datatype</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span><span class="ruby-operator">::</span><span class="ruby-constant">SHARED_STRING</span>
|
2871
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span>
|
2864
|
+
<span class="ruby-identifier">old_range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">old_range</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-keyword">then</span>
|
2865
|
+
|
2866
|
+
<span class="ruby-identifier">c</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-value">:worksheet</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>,
|
2867
|
+
<span class="ruby-value">:row</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">row_index</span>, <span class="ruby-value">:column</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">column_index</span>,
|
2868
|
+
<span class="ruby-value">:datatype</span> =<span class="ruby-operator">></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span><span class="ruby-operator">::</span><span class="ruby-constant">SHARED_STRING</span>)
|
2872
2869
|
<span class="ruby-keyword">end</span>
|
2873
2870
|
|
2874
2871
|
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">insert_cell_shift_right</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">column_index</span>)
|
@@ -2927,7 +2924,7 @@ being “pushed down”</p>
|
|
2927
2924
|
<span class="ruby-keyword">end</span>
|
2928
2925
|
|
2929
2926
|
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-keyword">nil</span>)
|
2930
|
-
<span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-value">:cells</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">new_cells</span>, <span class="ruby-value">:
|
2927
|
+
<span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-value">:cells</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">new_cells</span>, <span class="ruby-value">:style_index</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">old_row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">style_index</span>)
|
2931
2928
|
|
2932
2929
|
<span class="ruby-comment">#update row value for all rows below</span>
|
2933
2930
|
<span class="ruby-identifier">row_index</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
@@ -2966,7 +2963,7 @@ being “pushed down”</p>
|
|
2966
2963
|
|
2967
2964
|
|
2968
2965
|
<div class="method-source-code" id="is_column_bolded-source">
|
2969
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
2966
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 585</span>
|
2970
2967
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_bolded</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
2971
2968
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2972
2969
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
|
@@ -3000,7 +2997,7 @@ being “pushed down”</p>
|
|
3000
2997
|
|
3001
2998
|
|
3002
2999
|
<div class="method-source-code" id="is_column_italicized-source">
|
3003
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
3000
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 580</span>
|
3004
3001
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_italicized</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
3005
3002
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
3006
3003
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
|
@@ -3034,7 +3031,7 @@ being “pushed down”</p>
|
|
3034
3031
|
|
3035
3032
|
|
3036
3033
|
<div class="method-source-code" id="is_column_struckthrough-source">
|
3037
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
3034
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 595</span>
|
3038
3035
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_struckthrough</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
3039
3036
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
3040
3037
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
|
@@ -3068,7 +3065,7 @@ being “pushed down”</p>
|
|
3068
3065
|
|
3069
3066
|
|
3070
3067
|
<div class="method-source-code" id="is_column_underlined-source">
|
3071
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
3068
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 590</span>
|
3072
3069
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_underlined</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
3073
3070
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
3074
3071
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
|
@@ -3102,7 +3099,7 @@ being “pushed down”</p>
|
|
3102
3099
|
|
3103
3100
|
|
3104
3101
|
<div class="method-source-code" id="is_row_bolded-source">
|
3105
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
3102
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 517</span>
|
3106
3103
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_bolded</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
3107
3104
|
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
|
3108
3105
|
<span class="ruby-keyword">end</span></pre>
|
@@ -3135,7 +3132,7 @@ being “pushed down”</p>
|
|
3135
3132
|
|
3136
3133
|
|
3137
3134
|
<div class="method-source-code" id="is_row_italicized-source">
|
3138
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
3135
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 513</span>
|
3139
3136
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_italicized</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
3140
3137
|
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
|
3141
3138
|
<span class="ruby-keyword">end</span></pre>
|
@@ -3168,7 +3165,7 @@ being “pushed down”</p>
|
|
3168
3165
|
|
3169
3166
|
|
3170
3167
|
<div class="method-source-code" id="is_row_struckthrough-source">
|
3171
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
3168
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 525</span>
|
3172
3169
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_struckthrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
3173
3170
|
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
|
3174
3171
|
<span class="ruby-keyword">end</span></pre>
|
@@ -3201,7 +3198,7 @@ being “pushed down”</p>
|
|
3201
3198
|
|
3202
3199
|
|
3203
3200
|
<div class="method-source-code" id="is_row_underlined-source">
|
3204
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line
|
3201
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/worksheet.rb, line 521</span>
|
3205
3202
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_underlined</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
3206
3203
|
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
|
3207
3204
|
<span class="ruby-keyword">end</span></pre>
|