axlsx 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/CHANGELOG.md +14 -0
  2. data/Gemfile +3 -7
  3. data/Gemfile.lock +17 -8
  4. data/README.md +88 -59
  5. data/axlsx.gemspec +9 -3
  6. data/doc/Axlsx.html +482 -248
  7. data/doc/Axlsx/App.html +237 -159
  8. data/doc/Axlsx/Axis.html +75 -51
  9. data/doc/Axlsx/Bar3DChart.html +75 -53
  10. data/doc/Axlsx/BarSeries.html +45 -31
  11. data/doc/Axlsx/Border.html +70 -50
  12. data/doc/Axlsx/BorderPr.html +80 -62
  13. data/doc/Axlsx/CatAxis.html +62 -43
  14. data/doc/Axlsx/CatAxisData.html +23 -16
  15. data/doc/Axlsx/Cell.html +2022 -393
  16. data/doc/Axlsx/CellAlignment.html +103 -75
  17. data/doc/Axlsx/CellProtection.html +44 -30
  18. data/doc/Axlsx/CellStyle.html +66 -46
  19. data/doc/Axlsx/Chart.html +159 -108
  20. data/doc/Axlsx/Color.html +73 -52
  21. data/doc/Axlsx/ContentType.html +20 -14
  22. data/doc/Axlsx/Core.html +29 -20
  23. data/doc/Axlsx/DataTypeValidator.html +27 -19
  24. data/doc/Axlsx/Default.html +39 -27
  25. data/doc/Axlsx/Drawing.html +104 -70
  26. data/doc/Axlsx/Fill.html +33 -23
  27. data/doc/Axlsx/Font.html +132 -98
  28. data/doc/Axlsx/GradientFill.html +70 -48
  29. data/doc/Axlsx/GradientStop.html +31 -21
  30. data/doc/Axlsx/GraphicFrame.html +40 -27
  31. data/doc/Axlsx/Line3DChart.html +62 -43
  32. data/doc/Axlsx/LineSeries.html +37 -25
  33. data/doc/Axlsx/Marker.html +63 -43
  34. data/doc/Axlsx/NumFmt.html +79 -65
  35. data/doc/Axlsx/OneCellAnchor.html +78 -54
  36. data/doc/Axlsx/Override.html +39 -27
  37. data/doc/Axlsx/Package.html +103 -163
  38. data/doc/Axlsx/Parser.html +549 -0
  39. data/doc/Axlsx/PatternFill.html +66 -51
  40. data/doc/Axlsx/Pic.html +230 -123
  41. data/doc/Axlsx/PictureLocking.html +1159 -0
  42. data/doc/Axlsx/Pie3DChart.html +23 -16
  43. data/doc/Axlsx/PieSeries.html +44 -30
  44. data/doc/Axlsx/RegexValidator.html +14 -10
  45. data/doc/Axlsx/Relationship.html +40 -27
  46. data/doc/Axlsx/Relationships.html +20 -14
  47. data/doc/Axlsx/RestrictionValidator.html +25 -17
  48. data/doc/Axlsx/Row.html +73 -53
  49. data/doc/Axlsx/Scaling.html +46 -31
  50. data/doc/Axlsx/SerAxis.html +49 -33
  51. data/doc/Axlsx/Series.html +51 -35
  52. data/doc/Axlsx/SeriesTitle.html +14 -10
  53. data/doc/Axlsx/Styles.html +210 -156
  54. data/doc/Axlsx/TableStyle.html +47 -32
  55. data/doc/Axlsx/TableStyleElement.html +75 -61
  56. data/doc/Axlsx/TableStyles.html +42 -28
  57. data/doc/Axlsx/Title.html +36 -25
  58. data/doc/Axlsx/TwoCellAnchor.html +83 -58
  59. data/doc/Axlsx/ValAxis.html +35 -24
  60. data/doc/Axlsx/ValAxisData.html +13 -9
  61. data/doc/Axlsx/View3D.html +64 -43
  62. data/doc/Axlsx/Workbook.html +305 -147
  63. data/doc/Axlsx/Worksheet.html +567 -271
  64. data/doc/Axlsx/Xf.html +114 -77
  65. data/doc/_index.html +15 -1
  66. data/doc/class_list.html +1 -1
  67. data/doc/css/style.css +1 -1
  68. data/doc/file.LICENSE.html +25 -21
  69. data/doc/file.README.html +89 -66
  70. data/doc/index.html +89 -66
  71. data/doc/js/app.js +4 -4
  72. data/doc/method_list.html +717 -413
  73. data/doc/top-level-namespace.html +1 -1
  74. data/examples/example.rb +52 -25
  75. data/examples/follow_20111202.xlsx +0 -0
  76. data/lib/axlsx.rb +14 -1
  77. data/lib/axlsx/drawing/chart.rb +20 -4
  78. data/lib/axlsx/drawing/drawing.rb +1 -1
  79. data/lib/axlsx/drawing/pic.rb +5 -2
  80. data/lib/axlsx/drawing/picture_locking.rb +72 -0
  81. data/lib/axlsx/package.rb +9 -7
  82. data/lib/axlsx/stylesheet/color.rb +19 -9
  83. data/lib/axlsx/stylesheet/styles.rb +2 -0
  84. data/lib/axlsx/util/constants.rb +6 -0
  85. data/lib/axlsx/util/parser.rb +43 -0
  86. data/lib/axlsx/version.rb +1 -1
  87. data/lib/axlsx/workbook/workbook.rb +21 -1
  88. data/lib/axlsx/workbook/worksheet/cell.rb +159 -7
  89. data/lib/axlsx/workbook/worksheet/row.rb +4 -2
  90. data/lib/axlsx/workbook/worksheet/worksheet.rb +38 -4
  91. data/test/drawing/tc_picture_locking.rb +73 -0
  92. data/test/rels/tc_relationships.rb +0 -1
  93. data/test/stylesheet/tc_styles.rb +0 -12
  94. data/test/tc_package.rb +5 -3
  95. data/test/workbook/tc_workbook.rb +7 -0
  96. data/test/workbook/worksheet/tc_cell.rb +102 -1
  97. data/test/workbook/worksheet/tc_worksheet.rb +17 -0
  98. metadata +79 -19
  99. data/doc/Axlsx/Ar.html +0 -196
  100. data/doc/Axlsx/Ar/ClassMethods.html +0 -188
  101. data/doc/Axlsx/Ar/InstanceMethods.html +0 -108
  102. data/doc/Axlsx/Ar/SingletonMethods.html +0 -312
data/doc/Axlsx/Color.html CHANGED
@@ -94,8 +94,9 @@
94
94
 
95
95
  <h2>Overview</h2><div class="docstring">
96
96
  <div class="discussion">
97
-
98
- <p>The color class represents a color used for borders, fills an fonts</p>
97
+ <p>
98
+ The color class represents a color used for borders, fills an fonts
99
+ </p>
99
100
 
100
101
 
101
102
  </div>
@@ -127,8 +128,9 @@
127
128
 
128
129
 
129
130
 
130
- <span class="summary_desc"><div class='inline'>
131
- <p>Determines if the color is system color dependant.</p>
131
+ <span class="summary_desc"><div class='inline'><p>
132
+ Determines if the color is system color dependant.
133
+ </p>
132
134
  </div></span>
133
135
 
134
136
  </li>
@@ -153,8 +155,9 @@
153
155
 
154
156
 
155
157
 
156
- <span class="summary_desc"><div class='inline'>
157
- <p>The color as defined in rgb terms.</p>
158
+ <span class="summary_desc"><div class='inline'><p>
159
+ The color as defined in rgb terms.
160
+ </p>
158
161
  </div></span>
159
162
 
160
163
  </li>
@@ -179,8 +182,9 @@
179
182
 
180
183
 
181
184
 
182
- <span class="summary_desc"><div class='inline'>
183
- <p>The tint value.</p>
185
+ <span class="summary_desc"><div class='inline'><p>
186
+ The tint value.
187
+ </p>
184
188
  </div></span>
185
189
 
186
190
  </li>
@@ -217,8 +221,9 @@
217
221
 
218
222
 
219
223
 
220
- <span class="summary_desc"><div class='inline'>
221
- <p>Creates a new Color object.</p>
224
+ <span class="summary_desc"><div class='inline'><p>
225
+ Creates a new Color object.
226
+ </p>
222
227
  </div></span>
223
228
 
224
229
  </li>
@@ -240,8 +245,9 @@
240
245
 
241
246
 
242
247
 
243
- <span class="summary_desc"><div class='inline'>
244
- <p>Serializes the color.</p>
248
+ <span class="summary_desc"><div class='inline'><p>
249
+ Serializes the color.
250
+ </p>
245
251
  </div></span>
246
252
 
247
253
  </li>
@@ -262,8 +268,9 @@
262
268
 
263
269
  </p><div class="docstring">
264
270
  <div class="discussion">
265
-
266
- <p>Creates a new Color object</p>
271
+ <p>
272
+ Creates a new Color object
273
+ </p>
267
274
 
268
275
 
269
276
  </div>
@@ -284,8 +291,9 @@
284
291
 
285
292
 
286
293
  &mdash;
287
- <div class='inline'>
288
- <p>a customizable set of options</p>
294
+ <div class='inline'><p>
295
+ a customizable set of options
296
+ </p>
289
297
  </div>
290
298
 
291
299
  </li>
@@ -335,15 +343,15 @@
335
343
  <pre class="lines">
336
344
 
337
345
 
338
- 34
339
- 35
340
- 36
341
346
  37
342
347
  38
343
- 39</pre>
348
+ 39
349
+ 40
350
+ 41
351
+ 42</pre>
344
352
  </td>
345
353
  <td>
346
- <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 34</span>
354
+ <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 37</span>
347
355
 
348
356
  <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>
349
357
  <span class='@rgb ivar id'>@rgb</span> <span class='assign token'>=</span> <span class='string val'>&quot;FF000000&quot;</span>
@@ -374,8 +382,9 @@
374
382
 
375
383
  </p><div class="docstring">
376
384
  <div class="discussion">
377
-
378
- <p>Determines if the color is system color dependant</p>
385
+ <p>
386
+ Determines if the color is system color dependant
387
+ </p>
379
388
 
380
389
 
381
390
  </div>
@@ -433,14 +442,20 @@
433
442
 
434
443
  <div class="note notetag">
435
444
  <strong>Note:</strong>
436
- <div class='inline'>
437
- <p>rgb colors need to conform to ST_UnsignedIntHex. That basically means put
438
- FF before you color</p>
445
+ <div class='inline'><p>
446
+ rgb colors need to conform to ST_UnsignedIntHex. That basically means put
447
+ &#8216;FF&#8217; before you color
448
+ </p>
439
449
  </div>
440
450
  </div>
441
451
 
442
-
443
- <p>The color as defined in rgb terms.</p>
452
+ <p>
453
+ The color as defined in rgb terms. When assigning the rgb value the
454
+ behavior is much like CSS selectors and can use shorthand versions as
455
+ follows: If you provide a two character value it will be repeated for each
456
+ r, g, b assignment If you provide data that is not 2 characters in length,
457
+ and is less than 8 characters it will be padded with &quot;F&quot;
458
+ </p>
444
459
 
445
460
 
446
461
  </div>
@@ -450,11 +465,13 @@
450
465
  <div class="examples">
451
466
  <h3>Examples:</h3>
452
467
 
453
- <h4><div class='inline'>
454
- <p>rgb colors</p>
455
- </div></h4>
456
- <pre class="example code"><span class='string val'>&quot;FF000000&quot;</span> <span class='is identifier id'>is</span> <span class='black identifier id'>black</span>
457
- <span class='string val'>&quot;FFFFFFFF&quot;</span> <span class='is identifier id'>is</span> <span class='white identifier id'>white</span>
468
+ <h4><div class='inline'></div></h4>
469
+ <pre class="example code"><span class='Color constant id'>Color</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='symbol val'>:rgb</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FF000000&quot;</span>
470
+ <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='comment val'>#&lt;Axlsx::Color:0x102106b68 @rgb=&quot;FF000000&quot;&gt;</span>
471
+ <span class='Color constant id'>Color</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='symbol val'>:rgb</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;0A&quot;</span>
472
+ <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='comment val'>#&lt;Axlsx::Color:0x102106b68 @rgb=&quot;FF0A0A0A&quot;&gt;</span>
473
+ <span class='Color constant id'>Color</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='symbol val'>:rgb</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;00BB&quot;</span>
474
+ <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='comment val'>#&lt;Axlsx::Color:0x102106b68 @rgb=&quot;FFFF00BB&quot;&gt;</span>
458
475
  </pre>
459
476
 
460
477
  </div>
@@ -479,12 +496,12 @@
479
496
  <pre class="lines">
480
497
 
481
498
 
482
- 19
483
- 20
484
- 21</pre>
499
+ 22
500
+ 23
501
+ 24</pre>
485
502
  </td>
486
503
  <td>
487
- <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 19</span>
504
+ <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 22</span>
488
505
 
489
506
  <span class='def def kw'>def</span> <span class='rgb identifier id'>rgb</span>
490
507
  <span class='@rgb ivar id'>@rgb</span>
@@ -510,13 +527,15 @@
510
527
 
511
528
  <div class="note notetag">
512
529
  <strong>Note:</strong>
513
- <div class='inline'>
514
- <p>valid values are between -1.0 and 1.0</p>
530
+ <div class='inline'><p>
531
+ valid values are between -1.0 and 1.0
532
+ </p>
515
533
  </div>
516
534
  </div>
517
535
 
518
-
519
- <p>The tint value.</p>
536
+ <p>
537
+ The tint value.
538
+ </p>
520
539
 
521
540
 
522
541
  </div>
@@ -543,12 +562,12 @@
543
562
  <pre class="lines">
544
563
 
545
564
 
546
- 28
547
- 29
548
- 30</pre>
565
+ 31
566
+ 32
567
+ 33</pre>
549
568
  </td>
550
569
  <td>
551
- <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 28</span>
570
+ <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 31</span>
552
571
 
553
572
  <span class='def def kw'>def</span> <span class='tint identifier id'>tint</span>
554
573
  <span class='@tint ivar id'>@tint</span>
@@ -575,8 +594,9 @@
575
594
 
576
595
  </p><div class="docstring">
577
596
  <div class="discussion">
578
-
579
- <p>Serializes the color</p>
597
+ <p>
598
+ Serializes the color
599
+ </p>
580
600
 
581
601
 
582
602
  </div>
@@ -595,8 +615,9 @@
595
615
 
596
616
 
597
617
  &mdash;
598
- <div class='inline'>
599
- <p>The document builder instance this objects xml will be added to.</p>
618
+ <div class='inline'><p>
619
+ The document builder instance this objects xml will be added to.
620
+ </p>
600
621
  </div>
601
622
 
602
623
  </li>
@@ -623,10 +644,10 @@
623
644
  <pre class="lines">
624
645
 
625
646
 
626
- 57</pre>
647
+ 67</pre>
627
648
  </td>
628
649
  <td>
629
- <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 57</span>
650
+ <pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/color.rb', line 67</span>
630
651
 
631
652
  <span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span> <span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='color identifier id'>color</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='instance_values identifier id'>instance_values</span><span class='rparen token'>)</span> <span class='end end kw'>end</span>
632
653
  </pre>
@@ -640,7 +661,7 @@
640
661
  </div>
641
662
 
642
663
  <div id="footer">
643
- Generated on Wed Nov 30 08:53:43 2011 by
664
+ Generated on Mon Dec 5 14:21:12 2011 by
644
665
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
645
666
  0.7.3 (ruby-1.8.7).
646
667
  </div>
@@ -96,9 +96,10 @@
96
96
 
97
97
  <h2>Overview</h2><div class="docstring">
98
98
  <div class="discussion">
99
-
100
- <p>ContentTypes used in the package. This is automatcially managed by the
101
- package package.</p>
99
+ <p>
100
+ ContentTypes used in the package. This is automatcially managed by the
101
+ package package.
102
+ </p>
102
103
 
103
104
 
104
105
  </div>
@@ -149,8 +150,9 @@ package package.</p>
149
150
 
150
151
 
151
152
 
152
- <span class="summary_desc"><div class='inline'>
153
- <p>A new instance of ContentType.</p>
153
+ <span class="summary_desc"><div class='inline'><p>
154
+ A new instance of ContentType.
155
+ </p>
154
156
  </div></span>
155
157
 
156
158
  </li>
@@ -172,8 +174,9 @@ package package.</p>
172
174
 
173
175
 
174
176
 
175
- <span class="summary_desc"><div class='inline'>
176
- <p>Generates the xml document for [Content_Types].xml.</p>
177
+ <span class="summary_desc"><div class='inline'><p>
178
+ Generates the xml document for [Content_Types].xml.
179
+ </p>
177
180
  </div></span>
178
181
 
179
182
  </li>
@@ -199,8 +202,9 @@ package package.</p>
199
202
 
200
203
  </p><div class="docstring">
201
204
  <div class="discussion">
202
-
203
- <p>A new instance of ContentType</p>
205
+ <p>
206
+ A new instance of ContentType
207
+ </p>
204
208
 
205
209
 
206
210
  </div>
@@ -256,8 +260,9 @@ package package.</p>
256
260
 
257
261
  </p><div class="docstring">
258
262
  <div class="discussion">
259
-
260
- <p>Generates the xml document for [Content_Types].xml</p>
263
+ <p>
264
+ Generates the xml document for [Content_Types].xml
265
+ </p>
261
266
 
262
267
 
263
268
  </div>
@@ -275,8 +280,9 @@ package package.</p>
275
280
 
276
281
 
277
282
  &mdash;
278
- <div class='inline'>
279
- <p>The document as a string.</p>
283
+ <div class='inline'><p>
284
+ The document as a string.
285
+ </p>
280
286
  </div>
281
287
 
282
288
  </li>
@@ -320,7 +326,7 @@ package package.</p>
320
326
  </div>
321
327
 
322
328
  <div id="footer">
323
- Generated on Wed Nov 30 08:53:39 2011 by
329
+ Generated on Mon Dec 5 14:21:07 2011 by
324
330
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
325
331
  0.7.3 (ruby-1.8.7).
326
332
  </div>
data/doc/Axlsx/Core.html CHANGED
@@ -97,13 +97,15 @@
97
97
 
98
98
  <div class="note notetag">
99
99
  <strong>Note:</strong>
100
- <div class='inline'>
101
- <p>Packages manage their own core object.</p>
100
+ <div class='inline'><p>
101
+ Packages manage their own core object.
102
+ </p>
102
103
  </div>
103
104
  </div>
104
105
 
105
-
106
- <p>The core object for the package.</p>
106
+ <p>
107
+ The core object for the package.
108
+ </p>
107
109
 
108
110
 
109
111
  </div>
@@ -142,8 +144,9 @@
142
144
 
143
145
 
144
146
 
145
- <span class="summary_desc"><div class='inline'>
146
- <p>The author of the document.</p>
147
+ <span class="summary_desc"><div class='inline'><p>
148
+ The author of the document.
149
+ </p>
147
150
  </div></span>
148
151
 
149
152
  </li>
@@ -180,8 +183,9 @@
180
183
 
181
184
 
182
185
 
183
- <span class="summary_desc"><div class='inline'>
184
- <p>Creates a new Core object.</p>
186
+ <span class="summary_desc"><div class='inline'><p>
187
+ Creates a new Core object.
188
+ </p>
185
189
  </div></span>
186
190
 
187
191
  </li>
@@ -203,8 +207,9 @@
203
207
 
204
208
 
205
209
 
206
- <span class="summary_desc"><div class='inline'>
207
- <p>Serializes the core object.</p>
210
+ <span class="summary_desc"><div class='inline'><p>
211
+ Serializes the core object.
212
+ </p>
208
213
  </div></span>
209
214
 
210
215
  </li>
@@ -225,8 +230,9 @@
225
230
 
226
231
  </p><div class="docstring">
227
232
  <div class="discussion">
228
-
229
- <p>Creates a new Core object.</p>
233
+ <p>
234
+ Creates a new Core object.
235
+ </p>
230
236
 
231
237
 
232
238
  </div>
@@ -247,8 +253,9 @@
247
253
 
248
254
 
249
255
  &mdash;
250
- <div class='inline'>
251
- <p>a customizable set of options</p>
256
+ <div class='inline'><p>
257
+ a customizable set of options
258
+ </p>
252
259
  </div>
253
260
 
254
261
  </li>
@@ -313,8 +320,9 @@
313
320
 
314
321
  </p><div class="docstring">
315
322
  <div class="discussion">
316
-
317
- <p>The author of the document. By default this is axlsx’</p>
323
+ <p>
324
+ The author of the document. By default this is &#8216;axlsx&#8217;
325
+ </p>
318
326
 
319
327
 
320
328
  </div>
@@ -373,9 +381,10 @@
373
381
 
374
382
  </p><div class="docstring">
375
383
  <div class="discussion">
376
-
377
- <p>Serializes the core object. The created dcterms item is set to the current
378
- time when this method is called.</p>
384
+ <p>
385
+ Serializes the core object. The created dcterms item is set to the current
386
+ time when this method is called.
387
+ </p>
379
388
 
380
389
 
381
390
  </div>
@@ -447,7 +456,7 @@ time when this method is called.</p>
447
456
  </div>
448
457
 
449
458
  <div id="footer">
450
- Generated on Wed Nov 30 08:53:44 2011 by
459
+ Generated on Mon Dec 5 14:21:11 2011 by
451
460
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
452
461
  0.7.3 (ruby-1.8.7).
453
462
  </div>