rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.3.26 vs rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.3.27

- old
+ new

@@ -2,11 +2,11 @@ <html> <head> <meta charset="UTF-8"> -<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.3.26</title> +<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.3.27</title> <script type="text/javascript"> var rdoc_rel_prefix = "../"; var index_rel_prefix = "../"; </script> @@ -295,11 +295,11 @@ <div class="method-source-code" id="change_column_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 789</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 802</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">&amp;</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">&amp;</span><span class="ruby-identifier">block</span>) @@ -339,11 +339,11 @@ <div class="method-source-code" id="change_column_bold-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 722</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 735</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>) @@ -375,11 +375,11 @@ <div class="method-source-code" id="change_column_border-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 751</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 764</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>) @@ -416,11 +416,11 @@ <div class="method-source-code" id="change_column_border_color-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 763</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 776</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_border_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</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-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>) @@ -458,11 +458,11 @@ <div class="method-source-code" id="change_column_fill-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 519</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 532</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">&#39;ffffff&#39;</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>) @@ -501,11 +501,11 @@ <div class="method-source-code" id="change_column_font-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 679</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 692</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>) @@ -543,11 +543,11 @@ <div class="method-source-code" id="change_column_font_color-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 706</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 719</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">&#39;000000&#39;</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> @@ -581,11 +581,11 @@ <div class="method-source-code" id="change_column_font_name-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 692</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 705</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">&#39;Verdana&#39;</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>) @@ -617,11 +617,11 @@ <div class="method-source-code" id="change_column_font_size-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 699</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 712</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>) @@ -653,11 +653,11 @@ <div class="method-source-code" id="change_column_horizontal_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 743</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 756</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">&#39;center&#39;</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> @@ -686,11 +686,11 @@ <div class="method-source-code" id="change_column_italics-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 715</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 728</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>) @@ -722,11 +722,11 @@ <div class="method-source-code" id="change_column_strikethrough-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 736</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">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>) @@ -758,11 +758,11 @@ <div class="method-source-code" id="change_column_underline-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 742</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>) @@ -794,11 +794,11 @@ <div class="method-source-code" id="change_column_vertical_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 747</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 760</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">&#39;center&#39;</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> @@ -828,11 +828,11 @@ <div class="method-source-code" id="change_column_width-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 502</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 515</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> @@ -861,11 +861,11 @@ <div class="method-source-code" id="change_column_width_raw-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 492</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 505</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> @@ -898,11 +898,11 @@ <div class="method-source-code" id="change_row_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 776</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 789</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">&amp;</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>) @@ -940,11 +940,11 @@ <div class="method-source-code" id="change_row_bold-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 647</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 660</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>) @@ -976,11 +976,11 @@ <div class="method-source-code" id="change_row_border-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 573</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 586</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>) @@ -1016,11 +1016,11 @@ <div class="method-source-code" id="change_row_border_color-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 597</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span> = <span class="ruby-string">&#39;000000&#39;</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-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>) @@ -1057,11 +1057,11 @@ <div class="method-source-code" id="change_row_fill-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 596</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 609</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">&#39;ffffff&#39;</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>) @@ -1099,11 +1099,11 @@ <div class="method-source-code" id="change_row_font-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 608</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 621</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>)) @@ -1138,11 +1138,11 @@ <div class="method-source-code" id="change_row_font_color-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 632</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 645</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">&#39;000000&#39;</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>) @@ -1175,11 +1175,11 @@ <div class="method-source-code" id="change_row_font_name-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 618</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 631</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">&#39;Verdana&#39;</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>) @@ -1211,11 +1211,11 @@ <div class="method-source-code" id="change_row_font_size-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 625</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 638</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>) @@ -1247,11 +1247,11 @@ <div class="method-source-code" id="change_row_height-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 668</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 681</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>] @@ -1285,11 +1285,11 @@ <div class="method-source-code" id="change_row_horizontal_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 561</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 574</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">&#39;center&#39;</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> @@ -1320,11 +1320,11 @@ <div class="method-source-code" id="change_row_italics-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 640</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 653</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>) @@ -1356,11 +1356,11 @@ <div class="method-source-code" id="change_row_strikethrough-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 661</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 674</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>) @@ -1392,11 +1392,11 @@ <div class="method-source-code" id="change_row_underline-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 654</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 667</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>) @@ -1428,11 +1428,11 @@ <div class="method-source-code" id="change_row_vertical_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 567</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 580</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">&#39;center&#39;</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> @@ -1463,11 +1463,11 @@ <div class="method-source-code" id="column_font-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 548</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 561</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> @@ -1500,11 +1500,11 @@ <div class="method-source-code" id="delete_cell-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 232</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 245</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>) @@ -1554,11 +1554,11 @@ <div class="method-source-code" id="delete_column-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 354</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> @@ -1600,11 +1600,11 @@ <div class="method-source-code" id="delete_row-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 310</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>) @@ -1644,11 +1644,11 @@ <div class="method-source-code" id="get_col_style-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 507</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 520</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">&amp;&amp;</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> @@ -1678,11 +1678,11 @@ <div class="method-source-code" id="get_cols_style_index-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 433</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">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">&amp;&amp;</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> @@ -1713,11 +1713,11 @@ <div class="method-source-code" id="get_column_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 554</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 567</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">&amp;&amp;</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>) @@ -1749,11 +1749,11 @@ <div class="method-source-code" id="get_column_border-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 545</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>] @@ -1786,11 +1786,11 @@ <div class="method-source-code" id="get_column_border_color-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 540</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">get_column_border_color</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>] @@ -1823,11 +1823,11 @@ <div class="method-source-code" id="get_column_fill-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 512</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 525</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>)) @@ -1859,11 +1859,11 @@ <div class="method-source-code" id="get_column_font_color-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 449</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_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">&amp;&amp;</span> (<span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_rgb_color</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;000000&#39;</span>) <span class="ruby-keyword">end</span></pre> </div> @@ -1893,11 +1893,11 @@ <div class="method-source-code" id="get_column_font_name-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 439</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_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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span> <span class="ruby-keyword">end</span></pre> </div> @@ -1927,11 +1927,11 @@ <div class="method-source-code" id="get_column_font_size-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 444</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 457</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span> <span class="ruby-keyword">end</span></pre> </div> @@ -1962,11 +1962,11 @@ <div class="method-source-code" id="get_column_width-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 485</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 498</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> @@ -1997,11 +1997,11 @@ <div class="method-source-code" id="get_column_width_raw-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 475</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 488</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>) @@ -2034,11 +2034,11 @@ <div class="method-source-code" id="get_row_alignment-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 422</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 435</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> @@ -2074,11 +2074,11 @@ <div class="method-source-code" id="get_row_border-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 404</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 417</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">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>) @@ -2110,11 +2110,11 @@ <div class="method-source-code" id="get_row_border_color-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 411</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 424</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_color</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">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_color</span>(<span class="ruby-identifier">border_direction</span>) @@ -2146,11 +2146,11 @@ <div class="method-source-code" id="get_row_fill-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 363</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 376</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">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_fill_color</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2179,11 +2179,11 @@ <div class="method-source-code" id="get_row_font_color-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 375</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_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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">color</span> <span class="ruby-identifier">color</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">color</span>.<span class="ruby-identifier">rgb</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;000000&#39;</span>) <span class="ruby-keyword">end</span></pre> @@ -2214,11 +2214,11 @@ <div class="method-source-code" id="get_row_font_name-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 367</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 380</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2247,11 +2247,11 @@ <div class="method-source-code" id="get_row_font_size-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 371</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 384</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2280,11 +2280,11 @@ <div class="method-source-code" id="get_row_height-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 397</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_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">&amp;&amp;</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> @@ -2316,11 +2316,11 @@ <div class="method-source-code" id="get_row_style-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 371</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">&amp;&amp;</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> @@ -2350,11 +2350,11 @@ <div class="method-source-code" id="insert_cell-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 209</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 222</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> @@ -2401,11 +2401,11 @@ <div class="method-source-code" id="insert_column-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 314</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 327</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>) @@ -2459,11 +2459,11 @@ <div class="method-source-code" id="insert_row-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 259</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 272</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> @@ -2526,11 +2526,11 @@ <div class="method-source-code" id="is_column_bolded-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 459</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 472</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2560,11 +2560,11 @@ <div class="method-source-code" id="is_column_italicized-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 454</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 467</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2594,11 +2594,11 @@ <div class="method-source-code" id="is_column_struckthrough-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 469</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 482</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2628,11 +2628,11 @@ <div class="method-source-code" id="is_column_underlined-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 464</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 477</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2662,11 +2662,11 @@ <div class="method-source-code" id="is_row_bolded-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 385</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 398</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2695,11 +2695,11 @@ <div class="method-source-code" id="is_row_italicized-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 381</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 394</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2728,11 +2728,11 @@ <div class="method-source-code" id="is_row_struckthrough-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 393</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 406</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2761,11 +2761,11 @@ <div class="method-source-code" id="is_row_underlined-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 389</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 402</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">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span> <span class="ruby-keyword">end</span></pre> </div> @@ -2794,11 +2794,11 @@ <div class="method-source-code" id="merge_cells-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 805</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 818</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> @@ -2831,10 +2831,10 @@ <div class="method-source-code" id="row_font-source"> - <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 418</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">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">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_font</span> <span class="ruby-keyword">end</span></pre> </div>