axlsx 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +14 -0
- data/README.md +22 -21
- data/Rakefile +1 -1
- data/axlsx.gemspec +36 -0
- data/doc/Axlsx.html +373 -559
- data/doc/Axlsx/App.html +257 -360
- data/doc/Axlsx/Axis.html +113 -144
- data/doc/Axlsx/Bar3DChart.html +122 -152
- data/doc/Axlsx/BarSeries.html +67 -81
- data/doc/Axlsx/Border.html +96 -119
- data/doc/Axlsx/BorderPr.html +89 -114
- data/doc/Axlsx/CatAxis.html +79 -104
- data/doc/Axlsx/CatAxisData.html +40 -54
- data/doc/Axlsx/Cell.html +193 -679
- data/doc/Axlsx/CellAlignment.html +116 -157
- data/doc/Axlsx/CellProtection.html +50 -68
- data/doc/Axlsx/CellStyle.html +78 -106
- data/doc/Axlsx/Chart.html +361 -432
- data/doc/Axlsx/Color.html +56 -78
- data/doc/Axlsx/ContentType.html +28 -41
- data/doc/Axlsx/Core.html +43 -55
- data/doc/Axlsx/DataTypeValidator.html +34 -43
- data/doc/Axlsx/Default.html +55 -81
- data/doc/Axlsx/Drawing.html +322 -412
- data/doc/Axlsx/Fill.html +34 -47
- data/doc/Axlsx/Font.html +157 -207
- data/doc/Axlsx/GradientFill.html +90 -122
- data/doc/Axlsx/GradientStop.html +36 -50
- data/doc/Axlsx/GraphicFrame.html +106 -130
- data/doc/Axlsx/Line3DChart.html +108 -134
- data/doc/Axlsx/LineSeries.html +58 -67
- data/doc/Axlsx/Marker.html +84 -111
- data/doc/Axlsx/NumFmt.html +83 -102
- data/doc/Axlsx/OneCellAnchor.html +158 -196
- data/doc/Axlsx/Override.html +60 -92
- data/doc/Axlsx/Package.html +190 -759
- data/doc/Axlsx/PatternFill.html +78 -99
- data/doc/Axlsx/Pic.html +451 -405
- data/doc/Axlsx/Pie3DChart.html +33 -42
- data/doc/Axlsx/PieSeries.html +68 -80
- data/doc/Axlsx/RegexValidator.html +15 -20
- data/doc/Axlsx/Relationship.html +49 -66
- data/doc/Axlsx/Relationships.html +28 -41
- data/doc/Axlsx/RestrictionValidator.html +23 -32
- data/doc/Axlsx/Row.html +132 -161
- data/doc/Axlsx/Scaling.html +71 -90
- data/doc/Axlsx/SerAxis.html +61 -79
- data/doc/Axlsx/Series.html +125 -201
- data/doc/Axlsx/SeriesTitle.html +26 -31
- data/doc/Axlsx/Styles.html +286 -355
- data/doc/Axlsx/TableStyle.html +62 -87
- data/doc/Axlsx/TableStyleElement.html +84 -104
- data/doc/Axlsx/TableStyles.html +59 -82
- data/doc/Axlsx/Title.html +58 -155
- data/doc/Axlsx/TwoCellAnchor.html +165 -204
- data/doc/Axlsx/ValAxis.html +39 -53
- data/doc/Axlsx/ValAxisData.html +29 -39
- data/doc/Axlsx/View3D.html +93 -122
- data/doc/Axlsx/Workbook.html +359 -362
- data/doc/Axlsx/Worksheet.html +471 -816
- data/doc/Axlsx/Xf.html +341 -296
- data/doc/_index.html +7 -11
- data/doc/class_list.html +1 -1
- data/doc/file.LICENSE.html +86 -0
- data/doc/file.README.html +105 -107
- data/doc/file_list.html +3 -0
- data/doc/frames.html +1 -1
- data/doc/index.html +105 -107
- data/doc/method_list.html +426 -602
- data/doc/top-level-namespace.html +3 -3
- data/examples/example.rb +20 -1
- data/lib/axlsx.rb +20 -15
- data/lib/axlsx/content_type/default.rb +8 -3
- data/lib/axlsx/content_type/override.rb +11 -4
- data/lib/axlsx/doc_props/app.rb +53 -23
- data/lib/axlsx/drawing/axis.rb +16 -5
- data/lib/axlsx/drawing/bar_3D_chart.rb +15 -7
- data/lib/axlsx/drawing/bar_series.rb +7 -5
- data/lib/axlsx/drawing/cat_axis.rb +10 -3
- data/lib/axlsx/drawing/chart.rb +21 -15
- data/lib/axlsx/drawing/drawing.rb +16 -30
- data/lib/axlsx/drawing/graphic_frame.rb +2 -4
- data/lib/axlsx/drawing/line_3D_chart.rb +5 -2
- data/lib/axlsx/drawing/line_series.rb +6 -5
- data/lib/axlsx/drawing/marker.rb +9 -5
- data/lib/axlsx/drawing/one_cell_anchor.rb +7 -7
- data/lib/axlsx/drawing/pic.rb +29 -37
- data/lib/axlsx/drawing/pie_series.rb +7 -5
- data/lib/axlsx/drawing/scaling.rb +11 -5
- data/lib/axlsx/drawing/ser_axis.rb +6 -2
- data/lib/axlsx/drawing/series.rb +11 -11
- data/lib/axlsx/drawing/series_title.rb +1 -1
- data/lib/axlsx/drawing/title.rb +5 -12
- data/lib/axlsx/drawing/two_cell_anchor.rb +2 -3
- data/lib/axlsx/drawing/val_axis.rb +2 -2
- data/lib/axlsx/drawing/view_3D.rb +16 -9
- data/lib/axlsx/package.rb +25 -27
- data/lib/axlsx/rels/relationship.rb +4 -2
- data/lib/axlsx/stylesheet/border.rb +9 -4
- data/lib/axlsx/stylesheet/border_pr.rb +7 -4
- data/lib/axlsx/stylesheet/cell_alignment.rb +18 -9
- data/lib/axlsx/stylesheet/cell_protection.rb +5 -2
- data/lib/axlsx/stylesheet/cell_style.rb +12 -7
- data/lib/axlsx/stylesheet/color.rb +8 -6
- data/lib/axlsx/stylesheet/fill.rb +2 -1
- data/lib/axlsx/stylesheet/font.rb +24 -13
- data/lib/axlsx/stylesheet/gradient_fill.rb +16 -10
- data/lib/axlsx/stylesheet/gradient_stop.rb +5 -3
- data/lib/axlsx/stylesheet/num_fmt.rb +4 -2
- data/lib/axlsx/stylesheet/pattern_fill.rb +6 -4
- data/lib/axlsx/stylesheet/styles.rb +12 -12
- data/lib/axlsx/stylesheet/table_style.rb +6 -3
- data/lib/axlsx/stylesheet/table_style_element.rb +9 -4
- data/lib/axlsx/stylesheet/table_styles.rb +4 -4
- data/lib/axlsx/stylesheet/xf.rb +52 -31
- data/lib/axlsx/util/validators.rb +3 -3
- data/lib/axlsx/version.rb +1 -1
- data/lib/axlsx/workbook/workbook.rb +8 -9
- data/lib/axlsx/workbook/worksheet/cell.rb +25 -16
- data/lib/axlsx/workbook/worksheet/row.rb +2 -4
- data/lib/axlsx/workbook/worksheet/worksheet.rb +23 -32
- data/test/drawing/tc_one_cell_anchor.rb +1 -1
- metadata +135 -165
- data/doc/Axlsx/SimpleTypedList.html +0 -1686
- data/lib/schema/dc.xsd~ +0 -118
- data/lib/schema/dcterms.xsd~ +0 -331
- data/lib/schema/opc-coreProperties.xsd~ +0 -50
- data/test/drawing/tc_line_series.tc~ +0 -34
data/doc/Axlsx/BarSeries.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Axlsx::BarSeries
|
8
8
|
|
9
|
-
—
|
9
|
+
— AXLSX
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -99,15 +99,13 @@
|
|
99
99
|
|
100
100
|
<div class="note notetag">
|
101
101
|
<strong>Note:</strong>
|
102
|
-
<div class='inline'
|
103
|
-
The recommended way to manage series is to use Chart#add_series
|
104
|
-
</p>
|
102
|
+
<div class='inline'>
|
103
|
+
<p>The recommended way to manage series is to use Chart#add_series</p>
|
105
104
|
</div>
|
106
105
|
</div>
|
107
106
|
|
108
|
-
|
109
|
-
A BarSeries defines the title, data and labels for bar charts
|
110
|
-
</p>
|
107
|
+
|
108
|
+
<p>A BarSeries defines the title, data and labels for bar charts</p>
|
111
109
|
|
112
110
|
|
113
111
|
</div>
|
@@ -152,9 +150,8 @@ A BarSeries defines the title, data and labels for bar charts
|
|
152
150
|
|
153
151
|
|
154
152
|
|
155
|
-
<span class="summary_desc"><div class='inline'
|
156
|
-
The data for this series
|
157
|
-
</p>
|
153
|
+
<span class="summary_desc"><div class='inline'>
|
154
|
+
<p>The data for this series.</p>
|
158
155
|
</div></span>
|
159
156
|
|
160
157
|
</li>
|
@@ -179,9 +176,8 @@ The data for this series.
|
|
179
176
|
|
180
177
|
|
181
178
|
|
182
|
-
<span class="summary_desc"><div class='inline'
|
183
|
-
The labels for this series
|
184
|
-
</p>
|
179
|
+
<span class="summary_desc"><div class='inline'>
|
180
|
+
<p>The labels for this series.</p>
|
185
181
|
</div></span>
|
186
182
|
|
187
183
|
</li>
|
@@ -206,10 +202,9 @@ The labels for this series.
|
|
206
202
|
|
207
203
|
|
208
204
|
|
209
|
-
<span class="summary_desc"><div class='inline'
|
210
|
-
The shabe of the bars or columns must be one of
|
211
|
-
:clustered, :standard, :stacked]
|
212
|
-
</p>
|
205
|
+
<span class="summary_desc"><div class='inline'>
|
206
|
+
<p>The shabe of the bars or columns must be one of [:percentStacked,
|
207
|
+
:clustered, :standard, :stacked].</p>
|
213
208
|
</div></span>
|
214
209
|
|
215
210
|
</li>
|
@@ -225,7 +220,7 @@ The shabe of the bars or columns must be one of [:percentStacked,
|
|
225
220
|
|
226
221
|
|
227
222
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Series.html" title="Axlsx::Series (class)">Series</a></span></h3>
|
228
|
-
<p class="inherited"><span class='object_link'><a href="Series.html#chart-instance_method" title="Axlsx::Series#chart (method)">chart</a></span>, <span class='object_link'><a href="Series.html#
|
223
|
+
<p class="inherited"><span class='object_link'><a href="Series.html#chart-instance_method" title="Axlsx::Series#chart (method)">chart</a></span>, <span class='object_link'><a href="Series.html#title-instance_method" title="Axlsx::Series#title (method)">title</a></span></p>
|
229
224
|
|
230
225
|
|
231
226
|
|
@@ -254,9 +249,8 @@ The shabe of the bars or columns must be one of [:percentStacked,
|
|
254
249
|
|
255
250
|
|
256
251
|
|
257
|
-
<span class="summary_desc"><div class='inline'
|
258
|
-
Creates a new series
|
259
|
-
</p>
|
252
|
+
<span class="summary_desc"><div class='inline'>
|
253
|
+
<p>Creates a new series.</p>
|
260
254
|
</div></span>
|
261
255
|
|
262
256
|
</li>
|
@@ -278,9 +272,8 @@ Creates a new series.
|
|
278
272
|
|
279
273
|
|
280
274
|
|
281
|
-
<span class="summary_desc"><div class='inline'
|
282
|
-
Serializes the series
|
283
|
-
</p>
|
275
|
+
<span class="summary_desc"><div class='inline'>
|
276
|
+
<p>Serializes the series.</p>
|
284
277
|
</div></span>
|
285
278
|
|
286
279
|
</li>
|
@@ -294,7 +287,12 @@ Serializes the series.
|
|
294
287
|
|
295
288
|
|
296
289
|
|
297
|
-
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Series.html" title="Axlsx::Series (class)">Series</a></span></h3>
|
294
|
+
<p class="inherited"><span class='object_link'><a href="Series.html#index-instance_method" title="Axlsx::Series#index (method)">#index</a></span>, <span class='object_link'><a href="Series.html#order-instance_method" title="Axlsx::Series#order (method)">#order</a></span>, <span class='object_link'><a href="Series.html#order%3D-instance_method" title="Axlsx::Series#order= (method)">#order=</a></span></p>
|
295
|
+
<div id="constructor_details" class="method_details_list">
|
298
296
|
<h2>Constructor Details</h2>
|
299
297
|
|
300
298
|
<div class="method_details first">
|
@@ -306,9 +304,8 @@ Serializes the series.
|
|
306
304
|
|
307
305
|
</p><div class="docstring">
|
308
306
|
<div class="discussion">
|
309
|
-
|
310
|
-
Creates a new series
|
311
|
-
</p>
|
307
|
+
|
308
|
+
<p>Creates a new series</p>
|
312
309
|
|
313
310
|
|
314
311
|
</div>
|
@@ -340,9 +337,8 @@ Creates a new series
|
|
340
337
|
|
341
338
|
|
342
339
|
—
|
343
|
-
<div class='inline'
|
344
|
-
a customizable set of options
|
345
|
-
</p>
|
340
|
+
<div class='inline'>
|
341
|
+
<p>a customizable set of options</p>
|
346
342
|
</div>
|
347
343
|
|
348
344
|
</li>
|
@@ -413,13 +409,12 @@ a customizable set of options
|
|
413
409
|
<td>
|
414
410
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 28</span>
|
415
411
|
|
416
|
-
<span class='
|
417
|
-
<span class='
|
418
|
-
<span class='
|
419
|
-
<span class='
|
420
|
-
<span class='
|
421
|
-
<span class='
|
422
|
-
</pre>
|
412
|
+
<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id chart'>chart</span><span class='comma'>,</span> <span class='id options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
413
|
+
<span class='ivar'>@shape</span> <span class='op'>=</span> <span class='symbol'>:box</span>
|
414
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id chart'>chart</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span>
|
415
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id labels'>labels</span> <span class='op'>=</span> <span class='const'>CatAxisData</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:labels</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:labels</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
416
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id data'>data</span> <span class='op'>=</span> <span class='const'>ValAxisData</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
417
|
+
<span class='kw'>end</span></pre>
|
423
418
|
</td>
|
424
419
|
</tr>
|
425
420
|
</table>
|
@@ -442,9 +437,8 @@ a customizable set of options
|
|
442
437
|
|
443
438
|
</p><div class="docstring">
|
444
439
|
<div class="discussion">
|
445
|
-
|
446
|
-
The data for this series
|
447
|
-
</p>
|
440
|
+
|
441
|
+
<p>The data for this series.</p>
|
448
442
|
|
449
443
|
|
450
444
|
</div>
|
@@ -478,10 +472,9 @@ The data for this series.
|
|
478
472
|
<td>
|
479
473
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 11</span>
|
480
474
|
|
481
|
-
<span class='
|
482
|
-
<span class='
|
483
|
-
<span class='
|
484
|
-
</pre>
|
475
|
+
<span class='kw'>def</span> <span class='id data'>data</span>
|
476
|
+
<span class='ivar'>@data</span>
|
477
|
+
<span class='kw'>end</span></pre>
|
485
478
|
</td>
|
486
479
|
</tr>
|
487
480
|
</table>
|
@@ -499,9 +492,8 @@ The data for this series.
|
|
499
492
|
|
500
493
|
</p><div class="docstring">
|
501
494
|
<div class="discussion">
|
502
|
-
|
503
|
-
The labels for this series
|
504
|
-
</p>
|
495
|
+
|
496
|
+
<p>The labels for this series.</p>
|
505
497
|
|
506
498
|
|
507
499
|
</div>
|
@@ -535,10 +527,9 @@ The labels for this series.
|
|
535
527
|
<td>
|
536
528
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 15</span>
|
537
529
|
|
538
|
-
<span class='
|
539
|
-
<span class='
|
540
|
-
<span class='
|
541
|
-
</pre>
|
530
|
+
<span class='kw'>def</span> <span class='id labels'>labels</span>
|
531
|
+
<span class='ivar'>@labels</span>
|
532
|
+
<span class='kw'>end</span></pre>
|
542
533
|
</td>
|
543
534
|
</tr>
|
544
535
|
</table>
|
@@ -556,10 +547,9 @@ The labels for this series.
|
|
556
547
|
|
557
548
|
</p><div class="docstring">
|
558
549
|
<div class="discussion">
|
559
|
-
|
560
|
-
The shabe of the bars or columns must be one of
|
561
|
-
:clustered, :standard, :stacked]
|
562
|
-
</p>
|
550
|
+
|
551
|
+
<p>The shabe of the bars or columns must be one of [:percentStacked,
|
552
|
+
:clustered, :standard, :stacked]</p>
|
563
553
|
|
564
554
|
|
565
555
|
</div>
|
@@ -593,10 +583,9 @@ The shabe of the bars or columns must be one of [:percentStacked,
|
|
593
583
|
<td>
|
594
584
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 20</span>
|
595
585
|
|
596
|
-
<span class='
|
597
|
-
<span class='
|
598
|
-
<span class='
|
599
|
-
</pre>
|
586
|
+
<span class='kw'>def</span> <span class='id shape'>shape</span>
|
587
|
+
<span class='ivar'>@shape</span>
|
588
|
+
<span class='kw'>end</span></pre>
|
600
589
|
</td>
|
601
590
|
</tr>
|
602
591
|
</table>
|
@@ -618,9 +607,8 @@ The shabe of the bars or columns must be one of [:percentStacked,
|
|
618
607
|
|
619
608
|
</p><div class="docstring">
|
620
609
|
<div class="discussion">
|
621
|
-
|
622
|
-
Serializes the series
|
623
|
-
</p>
|
610
|
+
|
611
|
+
<p>Serializes the series</p>
|
624
612
|
|
625
613
|
|
626
614
|
</div>
|
@@ -639,9 +627,8 @@ Serializes the series
|
|
639
627
|
|
640
628
|
|
641
629
|
—
|
642
|
-
<div class='inline'
|
643
|
-
The document builder instance this objects xml will be added to
|
644
|
-
</p>
|
630
|
+
<div class='inline'>
|
631
|
+
<p>The document builder instance this objects xml will be added to.</p>
|
645
632
|
</div>
|
646
633
|
|
647
634
|
</li>
|
@@ -668,25 +655,24 @@ The document builder instance this objects xml will be added to.
|
|
668
655
|
<pre class="lines">
|
669
656
|
|
670
657
|
|
671
|
-
43
|
672
|
-
44
|
673
658
|
45
|
674
659
|
46
|
675
660
|
47
|
676
661
|
48
|
677
|
-
49
|
662
|
+
49
|
663
|
+
50
|
664
|
+
51</pre>
|
678
665
|
</td>
|
679
666
|
<td>
|
680
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line
|
681
|
-
|
682
|
-
<span class='
|
683
|
-
<span class='
|
684
|
-
<span class='
|
685
|
-
<span class='
|
686
|
-
<span class='
|
687
|
-
<span class='
|
688
|
-
<span class='
|
689
|
-
</pre>
|
667
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/bar_series.rb', line 45</span>
|
668
|
+
|
669
|
+
<span class='kw'>def</span> <span class='id to_xml'>to_xml</span><span class='lparen'>(</span><span class='id xml'>xml</span><span class='rparen'>)</span>
|
670
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id xml'>xml</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id xml_inner'>xml_inner</span><span class='op'>|</span>
|
671
|
+
<span class='ivar'>@labels</span><span class='period'>.</span><span class='id to_xml'>to_xml</span><span class='lparen'>(</span><span class='id xml_inner'>xml_inner</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@labels</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
672
|
+
<span class='ivar'>@data</span><span class='period'>.</span><span class='id to_xml'>to_xml</span><span class='lparen'>(</span><span class='id xml_inner'>xml_inner</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
673
|
+
<span class='id xml_inner'>xml_inner</span><span class='period'>.</span><span class='id send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>c:shape</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:val</span><span class='op'>=></span><span class='ivar'>@shape</span><span class='rparen'>)</span>
|
674
|
+
<span class='kw'>end</span>
|
675
|
+
<span class='kw'>end</span></pre>
|
690
676
|
</td>
|
691
677
|
</tr>
|
692
678
|
</table>
|
@@ -697,9 +683,9 @@ The document builder instance this objects xml will be added to.
|
|
697
683
|
</div>
|
698
684
|
|
699
685
|
<div id="footer">
|
700
|
-
Generated on
|
686
|
+
Generated on Sat Nov 26 13:16:38 2011 by
|
701
687
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
702
|
-
0.7.3 (ruby-1.
|
688
|
+
0.7.3 (ruby-1.9.3).
|
703
689
|
</div>
|
704
690
|
|
705
691
|
</body>
|
data/doc/Axlsx/Border.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Axlsx::Border
|
8
8
|
|
9
|
-
—
|
9
|
+
— AXLSX
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -94,9 +94,8 @@
|
|
94
94
|
|
95
95
|
<h2>Overview</h2><div class="docstring">
|
96
96
|
<div class="discussion">
|
97
|
-
|
98
|
-
This class details a border used in Office Open XML spreadsheet styles
|
99
|
-
</p>
|
97
|
+
|
98
|
+
<p>This class details a border used in Office Open XML spreadsheet styles.</p>
|
100
99
|
|
101
100
|
|
102
101
|
</div>
|
@@ -128,11 +127,10 @@ This class details a border used in Office Open XML spreadsheet styles.
|
|
128
127
|
|
129
128
|
|
130
129
|
|
131
|
-
<span class="summary_desc"><div class='inline'
|
132
|
-
The diagonal down property for the border that indicates if the border
|
130
|
+
<span class="summary_desc"><div class='inline'>
|
131
|
+
<p>The diagonal down property for the border that indicates if the border
|
133
132
|
should include a diagonal line from the top left to the top right of the
|
134
|
-
cell
|
135
|
-
</p>
|
133
|
+
cell.</p>
|
136
134
|
</div></span>
|
137
135
|
|
138
136
|
</li>
|
@@ -157,10 +155,9 @@ cell.
|
|
157
155
|
|
158
156
|
|
159
157
|
|
160
|
-
<span class="summary_desc"><div class='inline'
|
161
|
-
The diagonal up property for the border that indicates if the border should
|
162
|
-
include a diagonal line from the bottom left to the top right of the cell
|
163
|
-
</p>
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>The diagonal up property for the border that indicates if the border should
|
160
|
+
include a diagonal line from the bottom left to the top right of the cell.</p>
|
164
161
|
</div></span>
|
165
162
|
|
166
163
|
</li>
|
@@ -185,11 +182,10 @@ include a diagonal line from the bottom left to the top right of the cell.
|
|
185
182
|
|
186
183
|
|
187
184
|
|
188
|
-
<span class="summary_desc"><div class='inline'
|
189
|
-
The outline property for the border indicating that top, left, right and
|
185
|
+
<span class="summary_desc"><div class='inline'>
|
186
|
+
<p>The outline property for the border indicating that top, left, right and
|
190
187
|
bottom borders should only be applied to the outside border of a range of
|
191
|
-
cells
|
192
|
-
</p>
|
188
|
+
cells.</p>
|
193
189
|
</div></span>
|
194
190
|
|
195
191
|
</li>
|
@@ -214,9 +210,8 @@ cells.
|
|
214
210
|
|
215
211
|
|
216
212
|
|
217
|
-
<span class="summary_desc"><div class='inline'
|
218
|
-
A list of BorderPr objects for this border
|
219
|
-
</p>
|
213
|
+
<span class="summary_desc"><div class='inline'>
|
214
|
+
<p>A list of BorderPr objects for this border.</p>
|
220
215
|
</div></span>
|
221
216
|
|
222
217
|
</li>
|
@@ -253,9 +248,8 @@ A list of BorderPr objects for this border.
|
|
253
248
|
|
254
249
|
|
255
250
|
|
256
|
-
<span class="summary_desc"><div class='inline'
|
257
|
-
Creates a new Border object
|
258
|
-
</p>
|
251
|
+
<span class="summary_desc"><div class='inline'>
|
252
|
+
<p>Creates a new Border object.</p>
|
259
253
|
</div></span>
|
260
254
|
|
261
255
|
</li>
|
@@ -277,9 +271,8 @@ Creates a new Border object.
|
|
277
271
|
|
278
272
|
|
279
273
|
|
280
|
-
<span class="summary_desc"><div class='inline'
|
281
|
-
Serializes the border element
|
282
|
-
</p>
|
274
|
+
<span class="summary_desc"><div class='inline'>
|
275
|
+
<p>Serializes the border element.</p>
|
283
276
|
</div></span>
|
284
277
|
|
285
278
|
</li>
|
@@ -300,9 +293,8 @@ Serializes the border element.
|
|
300
293
|
|
301
294
|
</p><div class="docstring">
|
302
295
|
<div class="discussion">
|
303
|
-
|
304
|
-
Creates a new Border object
|
305
|
-
</p>
|
296
|
+
|
297
|
+
<p>Creates a new Border object</p>
|
306
298
|
|
307
299
|
|
308
300
|
</div>
|
@@ -312,20 +304,18 @@ Creates a new Border object
|
|
312
304
|
<div class="examples">
|
313
305
|
<h3>Examples:</h3>
|
314
306
|
|
315
|
-
<h4><div class='inline'
|
316
|
-
Making a border
|
317
|
-
</p>
|
307
|
+
<h4><div class='inline'>
|
308
|
+
<p>Making a border</p>
|
318
309
|
</div></h4>
|
319
|
-
<pre class="example code"
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
</pre>
|
310
|
+
<pre class="example code">p = Package.new
|
311
|
+
red_border = Border.new
|
312
|
+
[:left, :right, :top, :bottom].each do |item|
|
313
|
+
red_border.prs << BorderPr.new(:name=>item, :style=>:thin, :color=>Color.new(:rgb=>"FFFF0000")) #
|
314
|
+
end
|
315
|
+
# this sets red_border to be the index for the created border.
|
316
|
+
red_border = p.workbook.styles.@borders << red_border
|
317
|
+
#used in row creation as follows. This will add a red border to each of the cells in the row.
|
318
|
+
p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border</pre>
|
329
319
|
|
330
320
|
</div>
|
331
321
|
<h3>Parameters:</h3>
|
@@ -343,9 +333,8 @@ Making a border
|
|
343
333
|
|
344
334
|
|
345
335
|
—
|
346
|
-
<div class='inline'
|
347
|
-
a customizable set of options
|
348
|
-
</p>
|
336
|
+
<div class='inline'>
|
337
|
+
<p>a customizable set of options</p>
|
349
338
|
</div>
|
350
339
|
|
351
340
|
</li>
|
@@ -405,13 +394,12 @@ a customizable set of options
|
|
405
394
|
<td>
|
406
395
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 31</span>
|
407
396
|
|
408
|
-
<span class='
|
409
|
-
<span class='
|
410
|
-
<span class='options
|
411
|
-
<span class='
|
412
|
-
<span class='
|
413
|
-
<span class='
|
414
|
-
</pre>
|
397
|
+
<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
398
|
+
<span class='ivar'>@prs</span> <span class='op'>=</span> <span class='const'>SimpleTypedList</span><span class='period'>.</span><span class='id new'>new</span> <span class='const'>BorderPr</span>
|
399
|
+
<span class='id options'>options</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id o'>o</span><span class='op'>|</span>
|
400
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id o'>o</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id o'>o</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id o'>o</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span>
|
401
|
+
<span class='kw'>end</span>
|
402
|
+
<span class='kw'>end</span></pre>
|
415
403
|
</td>
|
416
404
|
</tr>
|
417
405
|
</table>
|
@@ -434,11 +422,10 @@ a customizable set of options
|
|
434
422
|
|
435
423
|
</p><div class="docstring">
|
436
424
|
<div class="discussion">
|
437
|
-
|
438
|
-
The diagonal down property for the border that indicates if the border
|
425
|
+
|
426
|
+
<p>The diagonal down property for the border that indicates if the border
|
439
427
|
should include a diagonal line from the top left to the top right of the
|
440
|
-
cell
|
441
|
-
</p>
|
428
|
+
cell.</p>
|
442
429
|
|
443
430
|
|
444
431
|
</div>
|
@@ -456,11 +443,10 @@ cell.
|
|
456
443
|
|
457
444
|
|
458
445
|
—
|
459
|
-
<div class='inline'
|
460
|
-
The diagonal down property for the border that indicates if the border
|
446
|
+
<div class='inline'>
|
447
|
+
<p>The diagonal down property for the border that indicates if the border
|
461
448
|
should include a diagonal line from the top left to the top right of the
|
462
|
-
cell
|
463
|
-
</p>
|
449
|
+
cell.</p>
|
464
450
|
</div>
|
465
451
|
|
466
452
|
</li>
|
@@ -480,10 +466,9 @@ cell.
|
|
480
466
|
<td>
|
481
467
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 9</span>
|
482
468
|
|
483
|
-
<span class='
|
484
|
-
<span class='
|
485
|
-
<span class='
|
486
|
-
</pre>
|
469
|
+
<span class='kw'>def</span> <span class='id diagonalDown'>diagonalDown</span>
|
470
|
+
<span class='ivar'>@diagonalDown</span>
|
471
|
+
<span class='kw'>end</span></pre>
|
487
472
|
</td>
|
488
473
|
</tr>
|
489
474
|
</table>
|
@@ -501,10 +486,9 @@ cell.
|
|
501
486
|
|
502
487
|
</p><div class="docstring">
|
503
488
|
<div class="discussion">
|
504
|
-
|
505
|
-
The diagonal up property for the border that indicates if the border should
|
506
|
-
include a diagonal line from the bottom left to the top right of the cell
|
507
|
-
</p>
|
489
|
+
|
490
|
+
<p>The diagonal up property for the border that indicates if the border should
|
491
|
+
include a diagonal line from the bottom left to the top right of the cell.</p>
|
508
492
|
|
509
493
|
|
510
494
|
</div>
|
@@ -522,10 +506,9 @@ include a diagonal line from the bottom left to the top right of the cell.
|
|
522
506
|
|
523
507
|
|
524
508
|
—
|
525
|
-
<div class='inline'
|
526
|
-
The diagonal up property for the border that indicates if the border should
|
527
|
-
include a diagonal line from the bottom left to the top right of the cell
|
528
|
-
</p>
|
509
|
+
<div class='inline'>
|
510
|
+
<p>The diagonal up property for the border that indicates if the border should
|
511
|
+
include a diagonal line from the bottom left to the top right of the cell.</p>
|
529
512
|
</div>
|
530
513
|
|
531
514
|
</li>
|
@@ -545,10 +528,9 @@ include a diagonal line from the bottom left to the top right of the cell.
|
|
545
528
|
<td>
|
546
529
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 6</span>
|
547
530
|
|
548
|
-
<span class='
|
549
|
-
<span class='
|
550
|
-
<span class='
|
551
|
-
</pre>
|
531
|
+
<span class='kw'>def</span> <span class='id diagonalUp'>diagonalUp</span>
|
532
|
+
<span class='ivar'>@diagonalUp</span>
|
533
|
+
<span class='kw'>end</span></pre>
|
552
534
|
</td>
|
553
535
|
</tr>
|
554
536
|
</table>
|
@@ -566,11 +548,10 @@ include a diagonal line from the bottom left to the top right of the cell.
|
|
566
548
|
|
567
549
|
</p><div class="docstring">
|
568
550
|
<div class="discussion">
|
569
|
-
|
570
|
-
The outline property for the border indicating that top, left, right and
|
551
|
+
|
552
|
+
<p>The outline property for the border indicating that top, left, right and
|
571
553
|
bottom borders should only be applied to the outside border of a range of
|
572
|
-
cells
|
573
|
-
</p>
|
554
|
+
cells.</p>
|
574
555
|
|
575
556
|
|
576
557
|
</div>
|
@@ -588,11 +569,10 @@ cells.
|
|
588
569
|
|
589
570
|
|
590
571
|
—
|
591
|
-
<div class='inline'
|
592
|
-
The outline property for the border indicating that top, left, right and
|
572
|
+
<div class='inline'>
|
573
|
+
<p>The outline property for the border indicating that top, left, right and
|
593
574
|
bottom borders should only be applied to the outside border of a range of
|
594
|
-
cells
|
595
|
-
</p>
|
575
|
+
cells.</p>
|
596
576
|
</div>
|
597
577
|
|
598
578
|
</li>
|
@@ -612,10 +592,9 @@ cells.
|
|
612
592
|
<td>
|
613
593
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 12</span>
|
614
594
|
|
615
|
-
<span class='
|
616
|
-
<span class='
|
617
|
-
<span class='
|
618
|
-
</pre>
|
595
|
+
<span class='kw'>def</span> <span class='id outline'>outline</span>
|
596
|
+
<span class='ivar'>@outline</span>
|
597
|
+
<span class='kw'>end</span></pre>
|
619
598
|
</td>
|
620
599
|
</tr>
|
621
600
|
</table>
|
@@ -633,9 +612,8 @@ cells.
|
|
633
612
|
|
634
613
|
</p><div class="docstring">
|
635
614
|
<div class="discussion">
|
636
|
-
|
637
|
-
A list of BorderPr objects for this border
|
638
|
-
</p>
|
615
|
+
|
616
|
+
<p>A list of BorderPr objects for this border.</p>
|
639
617
|
|
640
618
|
|
641
619
|
</div>
|
@@ -653,9 +631,8 @@ A list of BorderPr objects for this border.
|
|
653
631
|
|
654
632
|
|
655
633
|
—
|
656
|
-
<div class='inline'
|
657
|
-
A list of BorderPr objects for this border
|
658
|
-
</p>
|
634
|
+
<div class='inline'>
|
635
|
+
<p>A list of BorderPr objects for this border.</p>
|
659
636
|
</div>
|
660
637
|
|
661
638
|
</li>
|
@@ -675,10 +652,9 @@ A list of BorderPr objects for this border.
|
|
675
652
|
<td>
|
676
653
|
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 15</span>
|
677
654
|
|
678
|
-
<span class='
|
679
|
-
<span class='
|
680
|
-
<span class='
|
681
|
-
</pre>
|
655
|
+
<span class='kw'>def</span> <span class='id prs'>prs</span>
|
656
|
+
<span class='ivar'>@prs</span>
|
657
|
+
<span class='kw'>end</span></pre>
|
682
658
|
</td>
|
683
659
|
</tr>
|
684
660
|
</table>
|
@@ -700,9 +676,8 @@ A list of BorderPr objects for this border.
|
|
700
676
|
|
701
677
|
</p><div class="docstring">
|
702
678
|
<div class="discussion">
|
703
|
-
|
704
|
-
Serializes the border element
|
705
|
-
</p>
|
679
|
+
|
680
|
+
<p>Serializes the border element</p>
|
706
681
|
|
707
682
|
|
708
683
|
</div>
|
@@ -721,9 +696,8 @@ Serializes the border element
|
|
721
696
|
|
722
697
|
|
723
698
|
—
|
724
|
-
<div class='inline'
|
725
|
-
The document builder instance this objects xml will be added to
|
726
|
-
</p>
|
699
|
+
<div class='inline'>
|
700
|
+
<p>The document builder instance this objects xml will be added to.</p>
|
727
701
|
</div>
|
728
702
|
|
729
703
|
</li>
|
@@ -737,25 +711,28 @@ The document builder instance this objects xml will be added to.
|
|
737
711
|
<pre class="lines">
|
738
712
|
|
739
713
|
|
740
|
-
44
|
741
|
-
45
|
742
|
-
46
|
743
714
|
47
|
744
715
|
48
|
745
716
|
49
|
746
|
-
50
|
717
|
+
50
|
718
|
+
51
|
719
|
+
52
|
720
|
+
53
|
721
|
+
54
|
722
|
+
55</pre>
|
747
723
|
</td>
|
748
724
|
<td>
|
749
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line
|
750
|
-
|
751
|
-
<span class='
|
752
|
-
<span class='xml
|
753
|
-
<span class='
|
754
|
-
<span class='
|
755
|
-
|
756
|
-
|
757
|
-
<span class='
|
758
|
-
</
|
725
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/stylesheet/border.rb', line 47</span>
|
726
|
+
|
727
|
+
<span class='kw'>def</span> <span class='id to_xml'>to_xml</span><span class='lparen'>(</span><span class='id xml'>xml</span><span class='rparen'>)</span>
|
728
|
+
<span class='id xml'>xml</span><span class='period'>.</span><span class='id border'>border</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id instance_values'>instance_values</span><span class='period'>.</span><span class='id select'>select</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id k'>k</span><span class='comma'>,</span><span class='id v'>v</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='symbol'>:diagonalUp</span><span class='comma'>,</span> <span class='symbol'>:diagonalDown</span><span class='comma'>,</span> <span class='symbol'>:outline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id include?'>include?</span> <span class='id k'>k</span> <span class='rbrace'>}</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
|
729
|
+
<span class='lbracket'>[</span><span class='symbol'>:start</span><span class='comma'>,</span> <span class='symbol'>:end</span><span class='comma'>,</span> <span class='symbol'>:left</span><span class='comma'>,</span> <span class='symbol'>:right</span><span class='comma'>,</span> <span class='symbol'>:top</span><span class='comma'>,</span> <span class='symbol'>:bottom</span><span class='comma'>,</span> <span class='symbol'>:diagonal</span><span class='comma'>,</span> <span class='symbol'>:vertical</span><span class='comma'>,</span> <span class='symbol'>:horizontal</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id k'>k</span><span class='op'>|</span>
|
730
|
+
<span class='ivar'>@prs</span><span class='period'>.</span><span class='id select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id pr'>pr</span><span class='op'>|</span> <span class='id pr'>pr</span><span class='period'>.</span><span class='id name'>name</span> <span class='op'>==</span> <span class='id k'>k</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id part'>part</span><span class='op'>|</span>
|
731
|
+
<span class='id part'>part</span><span class='period'>.</span><span class='id to_xml'>to_xml</span><span class='lparen'>(</span><span class='id xml'>xml</span><span class='rparen'>)</span>
|
732
|
+
<span class='kw'>end</span>
|
733
|
+
<span class='kw'>end</span>
|
734
|
+
<span class='rbrace'>}</span>
|
735
|
+
<span class='kw'>end</span></pre>
|
759
736
|
</td>
|
760
737
|
</tr>
|
761
738
|
</table>
|
@@ -766,9 +743,9 @@ The document builder instance this objects xml will be added to.
|
|
766
743
|
</div>
|
767
744
|
|
768
745
|
<div id="footer">
|
769
|
-
Generated on
|
746
|
+
Generated on Sat Nov 26 13:16:37 2011 by
|
770
747
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
771
|
-
0.7.3 (ruby-1.
|
748
|
+
0.7.3 (ruby-1.9.3).
|
772
749
|
</div>
|
773
750
|
|
774
751
|
</body>
|