axlsx 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. data/README.md +21 -3
  2. data/doc/Axlsx.html +150 -6
  3. data/doc/Axlsx/App.html +1 -1
  4. data/doc/Axlsx/Axis.html +1 -1
  5. data/doc/Axlsx/Bar3DChart.html +1 -1
  6. data/doc/Axlsx/BarSeries.html +1 -1
  7. data/doc/Axlsx/Border.html +1 -1
  8. data/doc/Axlsx/BorderPr.html +1 -1
  9. data/doc/Axlsx/CatAxis.html +1 -1
  10. data/doc/Axlsx/CatAxisData.html +7 -5
  11. data/doc/Axlsx/Cell.html +1 -1
  12. data/doc/Axlsx/CellAlignment.html +1 -1
  13. data/doc/Axlsx/CellProtection.html +1 -1
  14. data/doc/Axlsx/CellStyle.html +1 -1
  15. data/doc/Axlsx/Chart.html +16 -16
  16. data/doc/Axlsx/Color.html +1 -1
  17. data/doc/Axlsx/ContentType.html +1 -1
  18. data/doc/Axlsx/Core.html +1 -1
  19. data/doc/Axlsx/DataTypeValidator.html +1 -1
  20. data/doc/Axlsx/Default.html +1 -1
  21. data/doc/Axlsx/Drawing.html +243 -65
  22. data/doc/Axlsx/Fill.html +1 -1
  23. data/doc/Axlsx/Font.html +1 -1
  24. data/doc/Axlsx/GradientFill.html +1 -1
  25. data/doc/Axlsx/GradientStop.html +1 -1
  26. data/doc/Axlsx/GraphicFrame.html +21 -21
  27. data/doc/Axlsx/Line3DChart.html +1 -1
  28. data/doc/Axlsx/LineSeries.html +6 -8
  29. data/doc/Axlsx/Marker.html +1 -1
  30. data/doc/Axlsx/NumFmt.html +1 -1
  31. data/doc/Axlsx/OneCellAnchor.html +988 -0
  32. data/doc/Axlsx/Override.html +1 -1
  33. data/doc/Axlsx/Package.html +127 -75
  34. data/doc/Axlsx/PatternFill.html +1 -1
  35. data/doc/Axlsx/Pic.html +1532 -0
  36. data/doc/Axlsx/Pie3DChart.html +5 -7
  37. data/doc/Axlsx/PieSeries.html +1 -1
  38. data/doc/Axlsx/RegexValidator.html +1 -1
  39. data/doc/Axlsx/Relationship.html +6 -6
  40. data/doc/Axlsx/Relationships.html +1 -1
  41. data/doc/Axlsx/RestrictionValidator.html +1 -1
  42. data/doc/Axlsx/Row.html +1 -1
  43. data/doc/Axlsx/Scaling.html +1 -1
  44. data/doc/Axlsx/SerAxis.html +1 -1
  45. data/doc/Axlsx/Series.html +1 -1
  46. data/doc/Axlsx/SeriesTitle.html +1 -1
  47. data/doc/Axlsx/SimpleTypedList.html +1 -1
  48. data/doc/Axlsx/Styles.html +1 -1
  49. data/doc/Axlsx/TableStyle.html +1 -1
  50. data/doc/Axlsx/TableStyleElement.html +1 -1
  51. data/doc/Axlsx/TableStyles.html +1 -1
  52. data/doc/Axlsx/Title.html +1 -1
  53. data/doc/Axlsx/TwoCellAnchor.html +165 -61
  54. data/doc/Axlsx/ValAxis.html +1 -1
  55. data/doc/Axlsx/ValAxisData.html +1 -1
  56. data/doc/Axlsx/View3D.html +1 -1
  57. data/doc/Axlsx/Workbook.html +151 -47
  58. data/doc/Axlsx/Worksheet.html +172 -35
  59. data/doc/Axlsx/Xf.html +1 -1
  60. data/doc/_index.html +15 -1
  61. data/doc/class_list.html +1 -1
  62. data/doc/file.README.html +29 -4
  63. data/doc/index.html +29 -4
  64. data/doc/method_list.html +571 -363
  65. data/doc/top-level-namespace.html +1 -1
  66. data/examples/example.rb +13 -0
  67. data/examples/image1.gif +0 -0
  68. data/examples/image1.jpeg +0 -0
  69. data/examples/image1.jpg +0 -0
  70. data/examples/image1.png +0 -0
  71. data/lib/axlsx/drawing/bar_series.rb +0 -1
  72. data/lib/axlsx/drawing/cat_axis_data.rb +1 -0
  73. data/lib/axlsx/drawing/chart.rb +0 -1
  74. data/lib/axlsx/drawing/drawing.rb +31 -7
  75. data/lib/axlsx/drawing/graphic_frame.rb +0 -2
  76. data/lib/axlsx/drawing/line_series.rb +0 -1
  77. data/lib/axlsx/drawing/one_cell_anchor.rb +89 -0
  78. data/lib/axlsx/drawing/pic.rb +158 -0
  79. data/lib/axlsx/drawing/pie_3D_chart.rb +0 -1
  80. data/lib/axlsx/drawing/two_cell_anchor.rb +17 -4
  81. data/lib/axlsx/package.rb +31 -5
  82. data/lib/axlsx/rels/relationship.rb +1 -2
  83. data/lib/axlsx/util/constants.rb +24 -0
  84. data/lib/axlsx/util/validators.rb +2 -2
  85. data/lib/axlsx/version.rb +1 -1
  86. data/lib/axlsx/workbook/workbook.rb +8 -0
  87. data/lib/axlsx/workbook/worksheet/worksheet.rb +10 -1
  88. data/test/drawing/tc_drawing.rb +10 -1
  89. data/test/drawing/tc_one_cell_anchor.rb +67 -0
  90. data/test/drawing/tc_pic.rb +71 -0
  91. data/test/tc_package.rb +0 -2
  92. metadata +13 -118
  93. data/examples/#example.rb# +0 -87
  94. data/examples/example.rb~ +0 -79
  95. data/examples/multi_chart.xlsx +0 -0
  96. data/lib/axlsx.rb~ +0 -67
  97. data/lib/axlsx/content_type/content_type.rb~ +0 -20
  98. data/lib/axlsx/content_type/default.rb~ +0 -32
  99. data/lib/axlsx/content_type/override.rb~ +0 -30
  100. data/lib/axlsx/doc_props/app.rb~ +0 -127
  101. data/lib/axlsx/doc_props/core.rb~ +0 -25
  102. data/lib/axlsx/drawing/#bar_series.rb# +0 -62
  103. data/lib/axlsx/drawing/axis.rb~ +0 -0
  104. data/lib/axlsx/drawing/bar_3D_chart.rb~ +0 -64
  105. data/lib/axlsx/drawing/bar_series.rb~ +0 -92
  106. data/lib/axlsx/drawing/cat_axis.rb~ +0 -32
  107. data/lib/axlsx/drawing/cat_axis_data.rb~ +0 -28
  108. data/lib/axlsx/drawing/chart.rb~ +0 -0
  109. data/lib/axlsx/drawing/drawing.rb~ +0 -102
  110. data/lib/axlsx/drawing/graphic_frame.rb~ +0 -40
  111. data/lib/axlsx/drawing/line_3D_chart.rb~ +0 -138
  112. data/lib/axlsx/drawing/line_series.rb~ +0 -91
  113. data/lib/axlsx/drawing/marker.rb~ +0 -50
  114. data/lib/axlsx/drawing/pie_3D_chart.rb~ +0 -132
  115. data/lib/axlsx/drawing/pie_series.rb~ +0 -0
  116. data/lib/axlsx/drawing/scaling.rb~ +0 -0
  117. data/lib/axlsx/drawing/ser_axis.rb~ +0 -48
  118. data/lib/axlsx/drawing/series.rb~ +0 -114
  119. data/lib/axlsx/drawing/series_title.rb~ +0 -18
  120. data/lib/axlsx/drawing/title.rb~ +0 -69
  121. data/lib/axlsx/drawing/two_cell_anchor.rb~ +0 -70
  122. data/lib/axlsx/drawing/val_axis.rb~ +0 -34
  123. data/lib/axlsx/drawing/val_axis_data.rb~ +0 -29
  124. data/lib/axlsx/drawing/view_3D.rb~ +0 -21
  125. data/lib/axlsx/package.rb~ +0 -181
  126. data/lib/axlsx/rels/relationship.rb~ +0 -18
  127. data/lib/axlsx/rels/relationships.rb~ +0 -23
  128. data/lib/axlsx/stylesheet/border.rb~ +0 -24
  129. data/lib/axlsx/stylesheet/border_pr.rb~ +0 -64
  130. data/lib/axlsx/stylesheet/cell_alignment.rb~ +0 -93
  131. data/lib/axlsx/stylesheet/cell_protection.rb~ +0 -16
  132. data/lib/axlsx/stylesheet/cell_style.rb~ +0 -61
  133. data/lib/axlsx/stylesheet/color.rb~ +0 -56
  134. data/lib/axlsx/stylesheet/fill.rb~ +0 -31
  135. data/lib/axlsx/stylesheet/font.rb~ +0 -33
  136. data/lib/axlsx/stylesheet/gradient_fill.rb~ +0 -70
  137. data/lib/axlsx/stylesheet/gradient_stop.rb~ +0 -15
  138. data/lib/axlsx/stylesheet/num_fmt.rb~ +0 -60
  139. data/lib/axlsx/stylesheet/pattern_fill.rb~ +0 -63
  140. data/lib/axlsx/stylesheet/styles.rb~ +0 -279
  141. data/lib/axlsx/stylesheet/table_style.rb~ +0 -43
  142. data/lib/axlsx/stylesheet/table_style_element.rb~ +0 -66
  143. data/lib/axlsx/stylesheet/table_styles.rb~ +0 -36
  144. data/lib/axlsx/stylesheet/xf.rb~ +0 -37
  145. data/lib/axlsx/util/constants.rb~ +0 -187
  146. data/lib/axlsx/util/monkey_patches_for_true_zip_stream.rb~ +0 -61
  147. data/lib/axlsx/util/simple_typed_list.rb~ +0 -79
  148. data/lib/axlsx/util/validators.rb~ +0 -132
  149. data/lib/axlsx/util/xml_escape.rb~ +0 -6
  150. data/lib/axlsx/workbook/workbook.rb~ +0 -130
  151. data/lib/axlsx/workbook/worksheet/cell.rb~ +0 -185
  152. data/lib/axlsx/workbook/worksheet/row.rb~ +0 -92
  153. data/lib/axlsx/workbook/worksheet/worksheet.rb~ +0 -194
  154. data/test/content_type/tc_content_type.rb~ +0 -81
  155. data/test/content_type/tc_default.rb~ +0 -40
  156. data/test/content_type/tc_override.rb~ +0 -40
  157. data/test/doc_props/tc_app.rb~ +0 -19
  158. data/test/drawing/tc_axis.rb~ +0 -0
  159. data/test/drawing/tc_bar_3D_chart.rb~ +0 -66
  160. data/test/drawing/tc_bar_series.rb~ +0 -31
  161. data/test/drawing/tc_cat_axis.rb~ +0 -39
  162. data/test/drawing/tc_cat_axis_data.rb~ +0 -32
  163. data/test/drawing/tc_chart.rb~ +0 -59
  164. data/test/drawing/tc_graphic_frame.rb~ +0 -21
  165. data/test/drawing/tc_line_3d_chart.rb~ +0 -48
  166. data/test/drawing/tc_line_series.rb~ +0 -34
  167. data/test/drawing/tc_marker.rb~ +0 -26
  168. data/test/drawing/tc_pie_3D_chart.rb~ +0 -33
  169. data/test/drawing/tc_pie_series.rb~ +0 -26
  170. data/test/drawing/tc_scaling.rb~ +0 -45
  171. data/test/drawing/tc_ser_axis.rb~ +0 -20
  172. data/test/drawing/tc_series.rb~ +0 -31
  173. data/test/drawing/tc_series_title.rb~ +0 -34
  174. data/test/drawing/tc_title.rb~ +0 -34
  175. data/test/drawing/tc_two_cell_anchor.rb~ +0 -37
  176. data/test/drawing/tc_val_axis.rb~ +0 -32
  177. data/test/drawing/tc_val_axis_data.rb~ +0 -18
  178. data/test/drawing/tc_view_3D.rb~ +0 -37
  179. data/test/rels/tc_relationship.rb~ +0 -39
  180. data/test/rels/tc_relationships.rb~ +0 -37
  181. data/test/stylesheet/tc_border.rb~ +0 -31
  182. data/test/stylesheet/tc_border_pr.rb~ +0 -31
  183. data/test/stylesheet/tc_cell_alignment.rb~ +0 -38
  184. data/test/stylesheet/tc_cell_protection.rb~ +0 -77
  185. data/test/stylesheet/tc_cell_style.rb~ +0 -30
  186. data/test/stylesheet/tc_color.rb~ +0 -38
  187. data/test/stylesheet/tc_fill.rb~ +0 -19
  188. data/test/stylesheet/tc_font.rb~ +0 -19
  189. data/test/stylesheet/tc_gradient_fill.rb~ +0 -114
  190. data/test/stylesheet/tc_gradient_stop.rb~ +0 -65
  191. data/test/stylesheet/tc_num_fmt.rb~ +0 -32
  192. data/test/stylesheet/tc_pattern_fill.rb~ +0 -31
  193. data/test/stylesheet/tc_table_style.rb~ +0 -38
  194. data/test/stylesheet/tc_table_style_element.rb~ +0 -37
  195. data/test/stylesheet/tc_table_styles.rb~ +0 -37
  196. data/test/stylesheet/tc_xf.rb~ +0 -30
  197. data/test/tc_app.rb~ +0 -19
  198. data/test/tc_border_pr.rb~ +0 -21
  199. data/test/tc_package.rb~ +0 -64
  200. data/test/tc_pie_3D_chart.rb~ +0 -66
  201. data/test/tc_relationships.rb~ +0 -37
  202. data/test/tc_series.rb~ +0 -31
  203. data/test/tc_styles.rb~ +0 -64
  204. data/test/tc_validators.rb~ +0 -77
  205. data/test/tc_worksheet.rb~ +0 -85
  206. data/test/workbook/worksheet/tc_row.rb~ +0 -30
  207. data/test/workbook/worksheet/tc_worksheet.rb~ +0 -85
@@ -529,7 +529,7 @@ The document builder instance this objects xml will be added to.
529
529
  </div>
530
530
 
531
531
  <div id="footer">
532
- Generated on Wed Nov 23 12:30:30 2011 by
532
+ Generated on Wed Nov 23 21:47:47 2011 by
533
533
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
534
534
  0.7.3 (ruby-1.8.7).
535
535
  </div>
@@ -317,7 +317,7 @@ The document builder instance this objects xml will be added to.
317
317
  </div>
318
318
 
319
319
  <div id="footer">
320
- Generated on Wed Nov 23 12:30:12 2011 by
320
+ Generated on Wed Nov 23 21:48:02 2011 by
321
321
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
322
322
  0.7.3 (ruby-1.8.7).
323
323
  </div>
@@ -962,7 +962,7 @@ The document builder instance this objects xml will be added to.
962
962
  </div>
963
963
 
964
964
  <div id="footer">
965
- Generated on Wed Nov 23 12:30:22 2011 by
965
+ Generated on Wed Nov 23 21:47:55 2011 by
966
966
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
967
967
  0.7.3 (ruby-1.8.7).
968
968
  </div>
@@ -237,6 +237,33 @@ A colllection of drawings associated with this workbook.
237
237
  </p>
238
238
  </div></span>
239
239
 
240
+ </li>
241
+
242
+
243
+ <li class="public ">
244
+ <span class="summary_signature">
245
+
246
+ <a href="#images-instance_method" title="#images (instance method)">- (SimpleTypedList) <strong>images</strong> </a>
247
+
248
+
249
+
250
+ </span>
251
+
252
+
253
+ <span class="note title readonly">readonly</span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+ <span class="summary_desc"><div class='inline'><p>
263
+ A colllection of images associated with this workbook.
264
+ </p>
265
+ </div></span>
266
+
240
267
  </li>
241
268
 
242
269
 
@@ -571,23 +598,25 @@ the object that the method was called on
571
598
  <pre class="lines">
572
599
 
573
600
 
574
- 75
575
- 76
576
- 77
577
- 78
578
- 79
579
- 80
580
- 81
581
- 82</pre>
601
+ 82
602
+ 83
603
+ 84
604
+ 85
605
+ 86
606
+ 87
607
+ 88
608
+ 89
609
+ 90</pre>
582
610
  </td>
583
611
  <td>
584
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 75</span>
612
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 82</span>
585
613
 
586
614
  <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
587
615
  <span class='@styles ivar id'>@styles</span> <span class='assign token'>=</span> <span class='Styles constant id'>Styles</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
588
616
  <span class='@worksheets ivar id'>@worksheets</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='Worksheet constant id'>Worksheet</span>
589
617
  <span class='@drawings ivar id'>@drawings</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='Drawing constant id'>Drawing</span>
590
618
  <span class='@charts ivar id'>@charts</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='Chart constant id'>Chart</span>
619
+ <span class='@images ivar id'>@images</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='Pic constant id'>Pic</span>
591
620
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span><span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:date1904</span><span class='rbrack token'>]</span> <span class='unless unless_mod kw'>unless</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:date1904</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
592
621
  <span class='yield yield kw'>yield</span> <span class='self self kw'>self</span> <span class='if if_mod kw'>if</span> <span class='block_given? fid id'>block_given?</span>
593
622
  <span class='end end kw'>end</span>
@@ -718,10 +747,10 @@ Instance level access to the class variable 1904
718
747
  <pre class="lines">
719
748
 
720
749
 
721
- 67</pre>
750
+ 74</pre>
722
751
  </td>
723
752
  <td>
724
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 67</span>
753
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 74</span>
725
754
 
726
755
  <span class='def def kw'>def</span> <span class='date1904 identifier id'>date1904</span><span class='lparen token'>(</span><span class='rparen token'>)</span> <span class='@@date1904 ivar id'>@@date1904</span><span class='semicolon token'>;</span> <span class='end end kw'>end</span>
727
756
  </pre>
@@ -789,6 +818,81 @@ A colllection of drawings associated with this workbook
789
818
  <pre class="lines">
790
819
 
791
820
 
821
+ 59
822
+ 60
823
+ 61</pre>
824
+ </td>
825
+ <td>
826
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 59</span>
827
+
828
+ <span class='def def kw'>def</span> <span class='drawings identifier id'>drawings</span>
829
+ <span class='@drawings ivar id'>@drawings</span>
830
+ <span class='end end kw'>end</span>
831
+ </pre>
832
+ </td>
833
+ </tr>
834
+ </table>
835
+ </div>
836
+
837
+
838
+ <span id=""></span>
839
+ <span id="images-instance_method"></span>
840
+ <div class="method_details ">
841
+ <p class="signature " id="images-instance_method">
842
+
843
+ - (<tt><span class='object_link'><a href="SimpleTypedList.html" title="Axlsx::SimpleTypedList (class)">SimpleTypedList</a></span></tt>) <strong>images</strong> <span class="extras">(readonly)</span>
844
+
845
+
846
+
847
+ </p><div class="docstring">
848
+ <div class="discussion">
849
+
850
+ <div class="note notetag">
851
+ <strong>Note:</strong>
852
+ <div class='inline'><p>
853
+ The recommended way to manage images is Worksheet#add_image
854
+ </p>
855
+ </div>
856
+ </div>
857
+
858
+ <p>
859
+ A colllection of images associated with this workbook
860
+ </p>
861
+
862
+
863
+ </div>
864
+ </div>
865
+ <div class="tags">
866
+
867
+ <h3>Returns:</h3>
868
+ <ul class="return">
869
+
870
+ <li>
871
+
872
+
873
+ <span class='type'>(<tt><span class='object_link'><a href="SimpleTypedList.html" title="Axlsx::SimpleTypedList (class)">SimpleTypedList</a></span></tt>)</span>
874
+
875
+
876
+
877
+ </li>
878
+
879
+ </ul>
880
+
881
+ <h3>See Also:</h3>
882
+ <ul class="see">
883
+
884
+ <li><span class='object_link'><a href="Worksheet.html#add_image-instance_method" title="Axlsx::Worksheet#add_image (method)">Axlsx::Worksheet#add_image</a></span></li>
885
+
886
+ <li><span class='object_link'><a href="Pic.html" title="Axlsx::Pic (class)">Pic</a></span></li>
887
+
888
+ </ul>
889
+
890
+ </div><table class="source_code">
891
+ <tr>
892
+ <td>
893
+ <pre class="lines">
894
+
895
+
792
896
  52
793
897
  53
794
898
  54</pre>
@@ -796,8 +900,8 @@ A colllection of drawings associated with this workbook
796
900
  <td>
797
901
  <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 52</span>
798
902
 
799
- <span class='def def kw'>def</span> <span class='drawings identifier id'>drawings</span>
800
- <span class='@drawings ivar id'>@drawings</span>
903
+ <span class='def def kw'>def</span> <span class='images identifier id'>images</span>
904
+ <span class='@images ivar id'>@images</span>
801
905
  <span class='end end kw'>end</span>
802
906
  </pre>
803
907
  </td>
@@ -846,17 +950,17 @@ The workbook relationships. This is managed automatically by the workbook
846
950
  <pre class="lines">
847
951
 
848
952
 
849
- 63
850
- 64
851
- 65
852
- 66
853
- 67
854
- 68
855
- 69
856
- 70</pre>
953
+ 70
954
+ 71
955
+ 72
956
+ 73
957
+ 74
958
+ 75
959
+ 76
960
+ 77</pre>
857
961
  </td>
858
962
  <td>
859
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 63</span>
963
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 70</span>
860
964
 
861
965
  <span class='def def kw'>def</span> <span class='relationships identifier id'>relationships</span>
862
966
  <span class='r identifier id'>r</span> <span class='assign token'>=</span> <span class='Relationships constant id'>Relationships</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
@@ -931,12 +1035,12 @@ The styles associated with this workbook
931
1035
  <pre class="lines">
932
1036
 
933
1037
 
934
- 59
935
- 60
936
- 61</pre>
1038
+ 66
1039
+ 67
1040
+ 68</pre>
937
1041
  </td>
938
1042
  <td>
939
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 59</span>
1043
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 66</span>
940
1044
 
941
1045
  <span class='def def kw'>def</span> <span class='styles identifier id'>styles</span>
942
1046
  <span class='@styles ivar id'>@styles</span>
@@ -1067,10 +1171,10 @@ retrieves the date1904 attribute
1067
1171
  <pre class="lines">
1068
1172
 
1069
1173
 
1070
- 93</pre>
1174
+ 101</pre>
1071
1175
  </td>
1072
1176
  <td>
1073
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 93</span>
1177
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 101</span>
1074
1178
 
1075
1179
  <span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span><span class='lparen token'>(</span><span class='rparen token'>)</span> <span class='@@date1904 ivar id'>@@date1904</span><span class='semicolon token'>;</span> <span class='end end kw'>end</span>
1076
1180
  </pre>
@@ -1117,10 +1221,10 @@ Sets the date1904 attribute to the provided boolean
1117
1221
  <pre class="lines">
1118
1222
 
1119
1223
 
1120
- 89</pre>
1224
+ 97</pre>
1121
1225
  </td>
1122
1226
  <td>
1123
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 89</span>
1227
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 97</span>
1124
1228
 
1125
1229
  <span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span><span class='assign token'>=</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='validate_boolean identifier id'>validate_boolean</span> <span class='v identifier id'>v</span><span class='semicolon token'>;</span> <span class='@@date1904 ivar id'>@@date1904</span> <span class='assign token'>=</span> <span class='v identifier id'>v</span> <span class='end end kw'>end</span>
1126
1230
  </pre>
@@ -1237,14 +1341,14 @@ The name of the worksheet.
1237
1341
  <pre class="lines">
1238
1342
 
1239
1343
 
1240
- 99
1241
- 100
1242
- 101
1243
- 102
1244
- 103</pre>
1344
+ 107
1345
+ 108
1346
+ 109
1347
+ 110
1348
+ 111</pre>
1245
1349
  </td>
1246
1350
  <td>
1247
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 99</span>
1351
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 107</span>
1248
1352
 
1249
1353
  <span class='def def kw'>def</span> <span class='add_worksheet identifier id'>add_worksheet</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
1250
1354
  <span class='worksheet identifier id'>worksheet</span> <span class='assign token'>=</span> <span class='Worksheet constant id'>Worksheet</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span>
@@ -1295,23 +1399,23 @@ Serializes the workbook document
1295
1399
  <pre class="lines">
1296
1400
 
1297
1401
 
1298
- 116
1299
- 117
1300
- 118
1301
- 119
1302
- 120
1303
- 121
1304
- 122
1305
- 123
1306
1402
  124
1307
1403
  125
1308
1404
  126
1309
1405
  127
1310
1406
  128
1311
- 129</pre>
1407
+ 129
1408
+ 130
1409
+ 131
1410
+ 132
1411
+ 133
1412
+ 134
1413
+ 135
1414
+ 136
1415
+ 137</pre>
1312
1416
  </td>
1313
1417
  <td>
1314
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 116</span>
1418
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/workbook.rb', line 124</span>
1315
1419
 
1316
1420
  <span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
1317
1421
  <span class='add_worksheet identifier id'>add_worksheet</span> <span class='unless unless_mod kw'>unless</span> <span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='size identifier id'>size</span> <span class='gt op'>&gt;</span> <span class='integer val'>0</span>
@@ -1338,7 +1442,7 @@ Serializes the workbook document
1338
1442
  </div>
1339
1443
 
1340
1444
  <div id="footer">
1341
- Generated on Wed Nov 23 12:30:24 2011 by
1445
+ Generated on Wed Nov 23 21:48:03 2011 by
1342
1446
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1343
1447
  0.7.3 (ruby-1.8.7).
1344
1448
  </div>
@@ -413,6 +413,30 @@ Adds a chart to this worksheets drawing.
413
413
  </p>
414
414
  </div></span>
415
415
 
416
+ </li>
417
+
418
+
419
+ <li class="public ">
420
+ <span class="summary_signature">
421
+
422
+ <a href="#add_image-instance_method" title="#add_image (instance method)">- (Object) <strong>add_image</strong>(options = {}) {|image| ... }</a>
423
+
424
+
425
+
426
+ </span>
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+ <span class="summary_desc"><div class='inline'><p>
436
+ Adds a media item to the worksheets drawing.
437
+ </p>
438
+ </div></span>
439
+
416
440
  </li>
417
441
 
418
442
 
@@ -1451,6 +1475,119 @@ a customizable set of options
1451
1475
  </td>
1452
1476
  </tr>
1453
1477
  </table>
1478
+ </div>
1479
+
1480
+ <div class="method_details ">
1481
+ <p class="signature " id="add_image-instance_method">
1482
+
1483
+ - (<tt>Object</tt>) <strong>add_image</strong>(options = {}) {|image| ... }
1484
+
1485
+
1486
+
1487
+ </p><div class="docstring">
1488
+ <div class="discussion">
1489
+ <p>
1490
+ Adds a media item to the worksheets drawing
1491
+ </p>
1492
+
1493
+
1494
+ </div>
1495
+ </div>
1496
+ <div class="tags">
1497
+ <h3>Parameters:</h3>
1498
+ <ul class="param">
1499
+
1500
+ <li>
1501
+
1502
+ <span class='name'>media_type</span>
1503
+
1504
+
1505
+ <span class='type'>(<tt>Class</tt>)</span>
1506
+
1507
+
1508
+
1509
+ </li>
1510
+
1511
+ <li>
1512
+
1513
+ <span class='name'>options</span>
1514
+
1515
+
1516
+ <span class='type'>(<tt>Hash</tt>)</span>
1517
+
1518
+
1519
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1520
+
1521
+
1522
+ &mdash;
1523
+ <div class='inline'><p>
1524
+ a customizable set of options
1525
+ </p>
1526
+ </div>
1527
+
1528
+ </li>
1529
+
1530
+ </ul>
1531
+
1532
+
1533
+
1534
+
1535
+ <h3>Options Hash (<tt>options</tt>):</h3>
1536
+ <ul class="option">
1537
+
1538
+ <li>
1539
+ <span class="name">[]</span>
1540
+ <span class="type">(<tt>Object</tt>)</span>
1541
+ <span class="default">
1542
+
1543
+ </span>
1544
+ &mdash; <div class='inline'><p>
1545
+ unknown
1546
+ </p>
1547
+ </div>
1548
+ </li>
1549
+
1550
+ </ul>
1551
+
1552
+
1553
+ <h3>Yields:</h3>
1554
+ <ul class="yield">
1555
+
1556
+ <li>
1557
+
1558
+
1559
+ <span class='type'>(<tt>image</tt>)</span>
1560
+
1561
+
1562
+
1563
+ </li>
1564
+
1565
+ </ul>
1566
+
1567
+ </div><table class="source_code">
1568
+ <tr>
1569
+ <td>
1570
+ <pre class="lines">
1571
+
1572
+
1573
+ 125
1574
+ 126
1575
+ 127
1576
+ 128
1577
+ 129</pre>
1578
+ </td>
1579
+ <td>
1580
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 125</span>
1581
+
1582
+ <span class='def def kw'>def</span> <span class='add_image identifier id'>add_image</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
1583
+ <span class='image identifier id'>image</span> <span class='assign token'>=</span> <span class='drawing identifier id'>drawing</span><span class='dot token'>.</span><span class='add_image identifier id'>add_image</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>
1584
+ <span class='yield yield kw'>yield</span> <span class='image identifier id'>image</span> <span class='if if_mod kw'>if</span> <span class='block_given? fid id'>block_given?</span>
1585
+ <span class='image identifier id'>image</span>
1586
+ <span class='end end kw'>end</span>
1587
+ </pre>
1588
+ </td>
1589
+ </tr>
1590
+ </table>
1454
1591
  </div>
1455
1592
 
1456
1593
  <div class="method_details ">
@@ -1660,22 +1797,22 @@ hash of auto_fit_data
1660
1797
  <pre class="lines">
1661
1798
 
1662
1799
 
1663
- 190
1664
- 191
1665
- 192
1666
- 193
1667
- 194
1668
- 195
1669
- 196
1670
- 197
1671
- 198
1672
- 199</pre>
1800
+ 199
1801
+ 200
1802
+ 201
1803
+ 202
1804
+ 203
1805
+ 204
1806
+ 205
1807
+ 206
1808
+ 207
1809
+ 208</pre>
1673
1810
  </td>
1674
1811
  <td>
1675
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 190</span>
1812
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 199</span>
1676
1813
 
1677
1814
  <span class='def def kw'>def</span> <span class='auto_width identifier id'>auto_width</span><span class='lparen token'>(</span><span class='col identifier id'>col</span><span class='rparen token'>)</span>
1678
- <span class='mdw identifier id'>mdw</span> <span class='assign token'>=</span> <span class='float val'>6.0</span> <span class='comment val'># maximum digit with is always 6.0 in testable fonts so instead of beating RMagick every time, I am hardcoding it here.</span>
1815
+ <span class='mdw identifier id'>mdw</span> <span class='assign token'>=</span> <span class='float val'>6.0</span> <span class='comment val'># maximum digit with is always 6.0 with RMagick's default font</span>
1679
1816
  <span class='mdw_count identifier id'>mdw_count</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
1680
1817
  <span class='best_guess identifier id'>best_guess</span> <span class='assign token'>=</span> <span class='float val'>1.5</span> <span class='comment val'>#direct testing shows the results of the documented formula to be a bit too small. This is a best guess scaling</span>
1681
1818
  <span class='font_scale identifier id'>font_scale</span> <span class='assign token'>=</span> <span class='col identifier id'>col</span><span class='lbrack token'>[</span><span class='symbol val'>:sz</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='div op'>/</span> <span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='fonts identifier id'>fonts</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='sz identifier id'>sz</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='orop op'>||</span> <span class='float val'>11.0</span><span class='rparen token'>)</span>
@@ -1728,15 +1865,6 @@ Serializes the worksheet document
1728
1865
  <pre class="lines">
1729
1866
 
1730
1867
 
1731
- 124
1732
- 125
1733
- 126
1734
- 127
1735
- 128
1736
- 129
1737
- 130
1738
- 131
1739
- 132
1740
1868
  133
1741
1869
  134
1742
1870
  135
@@ -1748,10 +1876,19 @@ Serializes the worksheet document
1748
1876
  141
1749
1877
  142
1750
1878
  143
1751
- 144</pre>
1879
+ 144
1880
+ 145
1881
+ 146
1882
+ 147
1883
+ 148
1884
+ 149
1885
+ 150
1886
+ 151
1887
+ 152
1888
+ 153</pre>
1752
1889
  </td>
1753
1890
  <td>
1754
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 124</span>
1891
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 133</span>
1755
1892
 
1756
1893
  <span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span>
1757
1894
  <span class='builder identifier id'>builder</span> <span class='assign token'>=</span> <span class='Nokogiri constant id'>Nokogiri</span><span class='colon2 op'>::</span><span class='XML constant id'>XML</span><span class='colon2 op'>::</span><span class='Builder constant id'>Builder</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:encoding</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='ENCODING constant id'>ENCODING</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='xml identifier id'>xml</span><span class='bitor op'>|</span>
@@ -1847,15 +1984,6 @@ of Cell objects
1847
1984
  <pre class="lines">
1848
1985
 
1849
1986
 
1850
- 162
1851
- 163
1852
- 164
1853
- 165
1854
- 166
1855
- 167
1856
- 168
1857
- 169
1858
- 170
1859
1987
  171
1860
1988
  172
1861
1989
  173
@@ -1865,10 +1993,19 @@ of Cell objects
1865
1993
  177
1866
1994
  178
1867
1995
  179
1868
- 180</pre>
1996
+ 180
1997
+ 181
1998
+ 182
1999
+ 183
2000
+ 184
2001
+ 185
2002
+ 186
2003
+ 187
2004
+ 188
2005
+ 189</pre>
1869
2006
  </td>
1870
2007
  <td>
1871
- <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 162</span>
2008
+ <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 171</span>
1872
2009
 
1873
2010
  <span class='def def kw'>def</span> <span class='update_auto_fit_data identifier id'>update_auto_fit_data</span><span class='lparen token'>(</span><span class='cells identifier id'>cells</span><span class='rparen token'>)</span>
1874
2011
  <span class='styles identifier id'>styles</span> <span class='assign token'>=</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span>
@@ -1900,7 +2037,7 @@ of Cell objects
1900
2037
  </div>
1901
2038
 
1902
2039
  <div id="footer">
1903
- Generated on Wed Nov 23 12:30:19 2011 by
2040
+ Generated on Wed Nov 23 21:47:51 2011 by
1904
2041
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1905
2042
  0.7.3 (ruby-1.8.7).
1906
2043
  </div>