rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.3.16 vs rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.3.17
- old
+ new
@@ -2,11 +2,11 @@
<html>
<head>
<meta charset="UTF-8">
-<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.3.16</title>
+<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.3.17</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
</script>
@@ -161,16 +161,12 @@
<li ><a href="#method-i-get_row_font_size">#get_row_font_size</a>
<li ><a href="#method-i-get_row_height">#get_row_height</a>
- <li ><a href="#method-i-get_row_horizontal_alignment">#get_row_horizontal_alignment</a>
-
<li ><a href="#method-i-get_row_style">#get_row_style</a>
- <li ><a href="#method-i-get_row_vertical_alignment">#get_row_vertical_alignment</a>
-
<li ><a href="#method-i-insert_cell">#insert_cell</a>
<li ><a href="#method-i-insert_column">#insert_column</a>
<li ><a href="#method-i-insert_row">#insert_row</a>
@@ -290,11 +286,11 @@
<div class="method-source-code" id="change_column_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 742</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 733</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
<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_alignment</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
@@ -334,11 +330,11 @@
<div class="method-source-code" id="change_column_bold-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 688</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 679</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_bold</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
@@ -370,11 +366,11 @@
<div class="method-source-code" id="change_column_border-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 717</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 708</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_border</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
<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_border</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
@@ -411,11 +407,11 @@
<div class="method-source-code" id="change_column_fill-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 505</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 496</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_fill</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">color_code</span> = <span class="ruby-string">'ffffff'</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color_code</span>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
@@ -454,11 +450,11 @@
<div class="method-source-code" id="change_column_font-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 645</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 636</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
@@ -496,11 +492,11 @@
<div class="method-source-code" id="change_column_font_color-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 672</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 663</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_color</span>=<span class="ruby-string">'000000'</span>)
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
@@ -534,11 +530,11 @@
<div class="method-source-code" id="change_column_font_name-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 658</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 649</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font_name</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">'Verdana'</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
@@ -570,11 +566,11 @@
<div class="method-source-code" id="change_column_font_size-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 665</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 656</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font_size</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
@@ -606,11 +602,11 @@
<div class="method-source-code" id="change_column_horizontal_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 709</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 700</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_horizontal_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
<span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -639,11 +635,11 @@
<div class="method-source-code" id="change_column_italics-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 681</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 672</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_italics</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
@@ -675,11 +671,11 @@
<div class="method-source-code" id="change_column_strikethrough-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 702</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 693</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_strikethrough</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
@@ -711,11 +707,11 @@
<div class="method-source-code" id="change_column_underline-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 695</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 686</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_underline</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">underlined</span> = <span class="ruby-keyword">false</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
@@ -747,11 +743,11 @@
<div class="method-source-code" id="change_column_vertical_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 713</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 704</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_vertical_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
<span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -781,11 +777,11 @@
<div class="method-source-code" id="change_column_width-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 488</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 479</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_width</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width_in_chars</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span>)
<span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, ((<span class="ruby-identifier">width_in_chars</span> <span class="ruby-operator">+</span> (<span class="ruby-value">5.0</span> <span class="ruby-operator">/</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Font</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_DIGIT_WIDTH</span>)) <span class="ruby-operator">*</span> <span class="ruby-value">256</span>).<span class="ruby-identifier">to_i</span> <span class="ruby-operator">/</span> <span class="ruby-value">256.0</span>)
<span class="ruby-keyword">end</span></pre>
</div>
@@ -814,11 +810,11 @@
<div class="method-source-code" id="change_column_width_raw-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 478</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 469</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">range</span>.<span class="ruby-identifier">width</span> = <span class="ruby-identifier">width</span>
@@ -851,11 +847,11 @@
<div class="method-source-code" id="change_row_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 729</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 720</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
@@ -893,11 +889,11 @@
<div class="method-source-code" id="change_row_bold-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 613</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 604</span>
<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>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<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>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>)
@@ -929,11 +925,11 @@
<div class="method-source-code" id="change_row_border-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 551</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 542</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<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-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
@@ -969,11 +965,11 @@
<div class="method-source-code" id="change_row_fill-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 562</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 553</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_fill</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">rgb</span> = <span class="ruby-string">'ffffff'</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">rgb</span>)
@@ -1011,11 +1007,11 @@
<div class="method-source-code" id="change_row_font-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 574</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 565</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">font</span>, <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row_index</span>))
@@ -1050,11 +1046,11 @@
<div class="method-source-code" id="change_row_font_color-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 598</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 589</span>
<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>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
<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>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_rgb_color</span>(<span class="ruby-identifier">font_color</span>)
@@ -1087,11 +1083,11 @@
<div class="method-source-code" id="change_row_font_name-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 584</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 575</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">'Verdana'</span>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<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>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>)
@@ -1123,11 +1119,11 @@
<div class="method-source-code" id="change_row_font_size-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 591</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 582</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<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>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>)
@@ -1159,11 +1155,11 @@
<div class="method-source-code" id="change_row_height-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 634</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 625</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">height</span> = <span class="ruby-value">10</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]
@@ -1197,11 +1193,11 @@
<div class="method-source-code" id="change_row_horizontal_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 539</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 530</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_horizontal_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
<span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
@@ -1232,11 +1228,11 @@
<div class="method-source-code" id="change_row_italics-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 606</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 597</span>
<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>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<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>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>)
@@ -1268,11 +1264,11 @@
<div class="method-source-code" id="change_row_strikethrough-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 627</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 618</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_strikethrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<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>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>)
@@ -1304,11 +1300,11 @@
<div class="method-source-code" id="change_row_underline-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 620</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 611</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_underline</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">underlined</span>=<span class="ruby-keyword">false</span>)
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
<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>
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>)
@@ -1340,11 +1336,11 @@
<div class="method-source-code" id="change_row_vertical_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 545</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 536</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_vertical_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
<span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
@@ -1375,11 +1371,11 @@
<div class="method-source-code" id="column_font-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 526</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 517</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)].<span class="ruby-identifier">font_id</span>]
<span class="ruby-keyword">end</span></pre>
@@ -1412,11 +1408,11 @@
<div class="method-source-code" id="delete_cell-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 218</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 216</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_cell</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">shift</span>=<span class="ruby-keyword">nil</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
@@ -1466,11 +1462,11 @@
<div class="method-source-code" id="delete_column-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 324</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 325</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-comment"># Delete column</span>
@@ -1512,11 +1508,11 @@
<div class="method-source-code" id="delete_row-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 280</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 281</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_row</span>(<span class="ruby-identifier">row_index</span>=<span class="ruby-value">0</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
<span class="ruby-identifier">deleted</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">row_index</span>)
@@ -1556,11 +1552,11 @@
<div class="method-source-code" id="get_col_style-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 493</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 484</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1590,11 +1586,11 @@
<div class="method-source-code" id="get_cols_style_index-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 419</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 410</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</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>
<span class="ruby-keyword">end</span></pre>
@@ -1625,11 +1621,11 @@
<div class="method-source-code" id="get_column_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 532</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 523</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">type</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span>)
@@ -1661,11 +1657,11 @@
<div class="method-source-code" id="get_column_border-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 518</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 509</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
<span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>]
@@ -1698,11 +1694,11 @@
<div class="method-source-code" id="get_column_fill-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 498</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 489</span>
<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>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">get_fill_color</span>(<span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">col</span>))
@@ -1734,11 +1730,11 @@
<div class="method-source-code" id="get_column_font_color-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 435</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 426</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<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>)
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1768,11 +1764,11 @@
<div class="method-source-code" id="get_column_font_name-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 425</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 416</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1802,11 +1798,11 @@
<div class="method-source-code" id="get_column_font_size-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 430</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 421</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1837,11 +1833,11 @@
<div class="method-source-code" id="get_column_width-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 471</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 462</span>
<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>)
<span class="ruby-identifier">width</span> = <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-keyword">return</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">width</span>.<span class="ruby-identifier">nil?</span>
(<span class="ruby-identifier">width</span> <span class="ruby-operator">-</span> (<span class="ruby-value">5.0</span> <span class="ruby-operator">/</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Font</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_DIGIT_WIDTH</span>)).<span class="ruby-identifier">round</span>
<span class="ruby-keyword">end</span></pre>
@@ -1872,11 +1868,11 @@
<div class="method-source-code" id="get_column_width_raw-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 461</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 452</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
@@ -1909,11 +1905,11 @@
<div class="method-source-code" id="get_row_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 398</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 399</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">is_horizontal</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">xf_obj</span> = <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>)
<span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">xf_obj</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">nil?</span>
@@ -1949,11 +1945,11 @@
<div class="method-source-code" id="get_row_border-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 387</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 388</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">border_id</span>]
<span class="ruby-identifier">border</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>)
@@ -1985,11 +1981,11 @@
<div class="method-source-code" id="get_row_fill-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 346</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 347</span>
<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>)
(<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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2018,11 +2014,11 @@
<div class="method-source-code" id="get_row_font_color-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 358</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 359</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
<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>
<span class="ruby-identifier">color</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">color</span>.<span class="ruby-identifier">rgb</span> <span class="ruby-operator">||</span> <span class="ruby-string">'000000'</span>)
<span class="ruby-keyword">end</span></pre>
@@ -2053,11 +2049,11 @@
<div class="method-source-code" id="get_row_font_name-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 350</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 351</span>
<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>)
(<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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2086,11 +2082,11 @@
<div class="method-source-code" id="get_row_font_size-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 354</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 355</span>
<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>)
(<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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2119,11 +2115,11 @@
<div class="method-source-code" id="get_row_height-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 380</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 381</span>
<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>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
<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-identifier">row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">ht</span> <span class="ruby-operator">||</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Row</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_HEIGHT</span>
@@ -2136,44 +2132,10 @@
</div>
- <div id="method-i-get_row_horizontal_alignment" class="method-detail ">
-
- <div class="method-heading">
- <span class="method-name">get_row_horizontal_alignment</span><span
- class="method-args">(row = 0)</span>
-
- <span class="method-click-advice">click to toggle source</span>
-
- </div>
-
-
- <div class="method-description">
-
-
-
-
-
-
- <div class="method-source-code" id="get_row_horizontal_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 409</span>
-<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>)
- <span class="ruby-identifier">warn</span> <span class="ruby-node">"[DEPRECATION] `#{__method__}` is deprecated. Please use `get_row_alignment` instead."</span>
- <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>)
-<span class="ruby-keyword">end</span></pre>
- </div>
-
- </div>
-
-
-
-
- </div>
-
-
<div id="method-i-get_row_style" class="method-detail ">
<div class="method-heading">
<span class="method-name">get_row_style</span><span
class="method-args">(row_index)</span>
@@ -2189,11 +2151,11 @@
<div class="method-source-code" id="get_row_style-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 341</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 342</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row_index</span>)
<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>]
(<span class="ruby-identifier">row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2204,44 +2166,10 @@
</div>
- <div id="method-i-get_row_vertical_alignment" class="method-detail ">
-
- <div class="method-heading">
- <span class="method-name">get_row_vertical_alignment</span><span
- class="method-args">(row = 0)</span>
-
- <span class="method-click-advice">click to toggle source</span>
-
- </div>
-
-
- <div class="method-description">
-
-
-
-
-
-
- <div class="method-source-code" id="get_row_vertical_alignment-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 414</span>
-<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>)
- <span class="ruby-identifier">warn</span> <span class="ruby-node">"[DEPRECATION] `#{__method__}` is deprecated. Please use `get_row_alignment` instead."</span>
- <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>)
-<span class="ruby-keyword">end</span></pre>
- </div>
-
- </div>
-
-
-
-
- </div>
-
-
<div id="method-i-insert_cell" class="method-detail ">
<div class="method-heading">
<span class="method-name">insert_cell</span><span
class="method-args">(row = 0, col = 0, data = nil, formula = nil, shift = nil)</span>
@@ -2257,11 +2185,11 @@
<div class="method-source-code" id="insert_cell-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 195</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 193</span>
<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>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>)
<span class="ruby-keyword">case</span> <span class="ruby-identifier">shift</span>
@@ -2308,11 +2236,11 @@
<div class="method-source-code" id="insert_column-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 297</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 298</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
<span class="ruby-identifier">old_range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)
@@ -2366,11 +2294,11 @@
<div class="method-source-code" id="insert_row-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 245</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 243</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_row</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
<span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">new_cells</span> = <span class="ruby-keyword">nil</span>
@@ -2393,14 +2321,17 @@
<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>)
<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>)
<span class="ruby-comment"># Update row values for all rows below</span>
- <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>
- <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">i</span>]
+ <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">r</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">r</span>]
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
- <span class="ruby-identifier">row</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">row</span> = <span class="ruby-identifier">i</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
+ <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">cell</span>, <span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">nil?</span>
+ <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">r</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>, <span class="ruby-identifier">c</span>)
+ }
}
<span class="ruby-keyword">return</span> <span class="ruby-identifier">new_row</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2430,11 +2361,11 @@
<div class="method-source-code" id="is_column_bolded-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 445</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 436</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2464,11 +2395,11 @@
<div class="method-source-code" id="is_column_italicized-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 440</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 431</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2498,11 +2429,11 @@
<div class="method-source-code" id="is_column_struckthrough-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 455</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 446</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2532,11 +2463,11 @@
<div class="method-source-code" id="is_column_underlined-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 450</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 441</span>
<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>)
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2566,11 +2497,11 @@
<div class="method-source-code" id="is_row_bolded-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 368</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 369</span>
<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>)
(<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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2599,11 +2530,11 @@
<div class="method-source-code" id="is_row_italicized-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 364</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 365</span>
<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>)
(<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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2632,11 +2563,11 @@
<div class="method-source-code" id="is_row_struckthrough-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 376</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 377</span>
<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>)
(<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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2665,11 +2596,11 @@
<div class="method-source-code" id="is_row_underlined-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 372</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 373</span>
<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>)
(<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>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -2698,11 +2629,11 @@
<div class="method-source-code" id="merge_cells-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 758</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 749</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">merge_cells</span>(<span class="ruby-identifier">start_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">end_col</span>)
<span class="ruby-identifier">validate_workbook</span>
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCells</span>.<span class="ruby-identifier">new</span>
<span class="ruby-comment"># TODO: add validation to make sure ranges are not intersecting with existing ones</span>
@@ -2735,10 +2666,10 @@
<div class="method-source-code" id="row_font-source">
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 394</span>
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 395</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
(<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_font</span>
<span class="ruby-keyword">end</span></pre>
</div>