rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.3.33 vs rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.4.0

- old
+ new

@@ -2,11 +2,11 @@ <html> <head> <meta charset="UTF-8"> -<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.3.33</title> +<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.0</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 803</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 592</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 736</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 525</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 765</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 554</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 777</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 566</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 533</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 322</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 693</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 482</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 720</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 509</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 706</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 495</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 713</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 502</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 757</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 546</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 729</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 518</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 750</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 539</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 743</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 532</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 761</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 550</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 516</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 305</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 506</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 295</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 790</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 579</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 661</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 450</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 587</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 376</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 598</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 387</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 610</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 399</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 622</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 411</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 646</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 435</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 632</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 421</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 639</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 428</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 682</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 471</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 575</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 364</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 654</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 443</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 675</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 464</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 668</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 457</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 581</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 370</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 562</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 351</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 246</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 35</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 355</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 144</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 311</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 100</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 521</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 310</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 447</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 236</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 568</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 357</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 546</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 335</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 554</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 343</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 526</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 315</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 463</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 252</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 453</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 242</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 458</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 247</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 499</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 288</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 489</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 278</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 436</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 225</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 418</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 207</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 425</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 214</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 377</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 166</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 389</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 178</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 381</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 170</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 385</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 174</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 411</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 200</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 372</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 161</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 223</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 12</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 328</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 117</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 273</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 62</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 473</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 262</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 468</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 257</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 483</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 272</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 478</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 267</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 399</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 188</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 395</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 184</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 407</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 196</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 403</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 192</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 819</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 608</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 432</span> + <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 221</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>