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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Axlsx::DataTypeValidator
|
|
8
8
|
|
|
9
|
-
—
|
|
9
|
+
— AXLSX
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -94,11 +94,10 @@
|
|
|
94
94
|
|
|
95
95
|
<h2>Overview</h2><div class="docstring">
|
|
96
96
|
<div class="discussion">
|
|
97
|
-
|
|
98
|
-
Validate that the class of the value provided is either an instance or the
|
|
97
|
+
|
|
98
|
+
<p>Validate that the class of the value provided is either an instance or the
|
|
99
99
|
class of the allowed types and that any specified additional validation
|
|
100
|
-
returns true
|
|
101
|
-
</p>
|
|
100
|
+
returns true.</p>
|
|
102
101
|
|
|
103
102
|
|
|
104
103
|
</div>
|
|
@@ -122,7 +121,7 @@ returns true.
|
|
|
122
121
|
<li class="public ">
|
|
123
122
|
<span class="summary_signature">
|
|
124
123
|
|
|
125
|
-
<a href="#validate-class_method" title="validate (class method)">+ (Boolean) <strong>validate</strong>(name, types, v, other = lambda{|
|
|
124
|
+
<a href="#validate-class_method" title="validate (class method)">+ (Boolean) <strong>validate</strong>(name, types, v, other = lambda{|arg| true }) </a>
|
|
126
125
|
|
|
127
126
|
|
|
128
127
|
|
|
@@ -135,9 +134,8 @@ returns true.
|
|
|
135
134
|
|
|
136
135
|
|
|
137
136
|
|
|
138
|
-
<span class="summary_desc"><div class='inline'
|
|
139
|
-
Perform validation
|
|
140
|
-
</p>
|
|
137
|
+
<span class="summary_desc"><div class='inline'>
|
|
138
|
+
<p>Perform validation.</p>
|
|
141
139
|
</div></span>
|
|
142
140
|
|
|
143
141
|
</li>
|
|
@@ -155,15 +153,14 @@ Perform validation.
|
|
|
155
153
|
<div class="method_details first">
|
|
156
154
|
<p class="signature first" id="validate-class_method">
|
|
157
155
|
|
|
158
|
-
+ (<tt>Boolean</tt>) <strong>validate</strong>(name, types, v, other = lambda{|
|
|
156
|
+
+ (<tt>Boolean</tt>) <strong>validate</strong>(name, types, v, other = lambda{|arg| true })
|
|
159
157
|
|
|
160
158
|
|
|
161
159
|
|
|
162
160
|
</p><div class="docstring">
|
|
163
161
|
<div class="discussion">
|
|
164
|
-
|
|
165
|
-
Perform validation
|
|
166
|
-
</p>
|
|
162
|
+
|
|
163
|
+
<p>Perform validation</p>
|
|
167
164
|
|
|
168
165
|
|
|
169
166
|
</div>
|
|
@@ -182,9 +179,8 @@ Perform validation
|
|
|
182
179
|
|
|
183
180
|
|
|
184
181
|
—
|
|
185
|
-
<div class='inline'
|
|
186
|
-
The name of what is being validated. This is included in the error message
|
|
187
|
-
</p>
|
|
182
|
+
<div class='inline'>
|
|
183
|
+
<p>The name of what is being validated. This is included in the error message</p>
|
|
188
184
|
</div>
|
|
189
185
|
|
|
190
186
|
</li>
|
|
@@ -199,9 +195,8 @@ The name of what is being validated. This is included in the error message
|
|
|
199
195
|
|
|
200
196
|
|
|
201
197
|
—
|
|
202
|
-
<div class='inline'
|
|
203
|
-
A single class or array of classes that the value is validated against
|
|
204
|
-
</p>
|
|
198
|
+
<div class='inline'>
|
|
199
|
+
<p>A single class or array of classes that the value is validated against.</p>
|
|
205
200
|
</div>
|
|
206
201
|
|
|
207
202
|
</li>
|
|
@@ -214,13 +209,12 @@ A single class or array of classes that the value is validated against.
|
|
|
214
209
|
<span class='type'>(<tt>Block</tt>)</span>
|
|
215
210
|
|
|
216
211
|
|
|
217
|
-
<em class="default">(defaults to: <tt>lambda{|
|
|
212
|
+
<em class="default">(defaults to: <tt>lambda{|arg| true }</tt>)</em>
|
|
218
213
|
|
|
219
214
|
|
|
220
215
|
—
|
|
221
|
-
<div class='inline'
|
|
222
|
-
Any block that must evaluate to true for the value to be valid
|
|
223
|
-
</p>
|
|
216
|
+
<div class='inline'>
|
|
217
|
+
<p>Any block that must evaluate to true for the value to be valid</p>
|
|
224
218
|
</div>
|
|
225
219
|
|
|
226
220
|
</li>
|
|
@@ -238,9 +232,8 @@ Any block that must evaluate to true for the value to be valid
|
|
|
238
232
|
|
|
239
233
|
|
|
240
234
|
—
|
|
241
|
-
<div class='inline'
|
|
242
|
-
true if validation succeeds
|
|
243
|
-
</p>
|
|
235
|
+
<div class='inline'>
|
|
236
|
+
<p>true if validation succeeds.</p>
|
|
244
237
|
</div>
|
|
245
238
|
|
|
246
239
|
</li>
|
|
@@ -257,10 +250,9 @@ true if validation succeeds.
|
|
|
257
250
|
|
|
258
251
|
|
|
259
252
|
—
|
|
260
|
-
<div class='inline'
|
|
261
|
-
Raised if the class of the value provided is not in the specified array of
|
|
262
|
-
types or the block passed returns false
|
|
263
|
-
</p>
|
|
253
|
+
<div class='inline'>
|
|
254
|
+
<p>Raised if the class of the value provided is not in the specified array of
|
|
255
|
+
types or the block passed returns false</p>
|
|
264
256
|
</div>
|
|
265
257
|
|
|
266
258
|
</li>
|
|
@@ -294,17 +286,16 @@ types or the block passed returns false
|
|
|
294
286
|
<td>
|
|
295
287
|
<pre class="code"><span class="info file"># File 'lib/axlsx/util/validators.rb', line 34</span>
|
|
296
288
|
|
|
297
|
-
<span class='
|
|
298
|
-
<span class='types
|
|
299
|
-
<span class='valid_type
|
|
300
|
-
<span class='
|
|
301
|
-
<span class='types
|
|
302
|
-
<span class='
|
|
303
|
-
<span class='types
|
|
304
|
-
<span class='
|
|
305
|
-
<span class='raise
|
|
306
|
-
<span class='
|
|
307
|
-
</pre>
|
|
289
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id validate'>validate</span><span class='lparen'>(</span><span class='id name'>name</span><span class='comma'>,</span> <span class='id types'>types</span><span class='comma'>,</span> <span class='id v'>v</span><span class='comma'>,</span> <span class='id other'>other</span><span class='op'>=</span> <span class='id lambda'>lambda</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id arg'>arg</span><span class='op'>|</span> <span class='kw'>true</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
290
|
+
<span class='id types'>types</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id types'>types</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id types'>types</span><span class='period'>.</span><span class='id is_a?'>is_a?</span> <span class='const'>Array</span>
|
|
291
|
+
<span class='id valid_type'>valid_type</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
292
|
+
<span class='kw'>if</span> <span class='id v'>v</span><span class='period'>.</span><span class='id class'>class</span> <span class='op'>==</span> <span class='const'>Class</span>
|
|
293
|
+
<span class='id types'>types</span><span class='period'>.</span><span class='id each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id t'>t</span><span class='op'>|</span> <span class='id valid_type'>valid_type</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id v'>v</span><span class='period'>.</span><span class='id ancestors'>ancestors</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='id t'>t</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
294
|
+
<span class='kw'>else</span>
|
|
295
|
+
<span class='id types'>types</span><span class='period'>.</span><span class='id each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id t'>t</span><span class='op'>|</span> <span class='id valid_type'>valid_type</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id v'>v</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='id t'>t</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
296
|
+
<span class='kw'>end</span>
|
|
297
|
+
<span class='id raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='const'>ERR_TYPE</span> <span class='op'>%</span> <span class='lbracket'>[</span><span class='id v'>v</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='comma'>,</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id types'>types</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id other'>other</span><span class='period'>.</span><span class='id call'>call</span><span class='lparen'>(</span><span class='id v'>v</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id valid_type'>valid_type</span><span class='rparen'>)</span>
|
|
298
|
+
<span class='kw'>end</span></pre>
|
|
308
299
|
</td>
|
|
309
300
|
</tr>
|
|
310
301
|
</table>
|
|
@@ -315,9 +306,9 @@ types or the block passed returns false
|
|
|
315
306
|
</div>
|
|
316
307
|
|
|
317
308
|
<div id="footer">
|
|
318
|
-
Generated on
|
|
309
|
+
Generated on Sat Nov 26 13:16:37 2011 by
|
|
319
310
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
320
|
-
0.7.3 (ruby-1.
|
|
311
|
+
0.7.3 (ruby-1.9.3).
|
|
321
312
|
</div>
|
|
322
313
|
|
|
323
314
|
</body>
|
data/doc/Axlsx/Default.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Axlsx::Default
|
|
8
8
|
|
|
9
|
-
—
|
|
9
|
+
— AXLSX
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -94,10 +94,9 @@
|
|
|
94
94
|
|
|
95
95
|
<h2>Overview</h2><div class="docstring">
|
|
96
96
|
<div class="discussion">
|
|
97
|
-
|
|
98
|
-
An default content part. These parts are automatically created by for you
|
|
99
|
-
based on the content of your package
|
|
100
|
-
</p>
|
|
97
|
+
|
|
98
|
+
<p>An default content part. These parts are automatically created by for you
|
|
99
|
+
based on the content of your package.</p>
|
|
101
100
|
|
|
102
101
|
|
|
103
102
|
</div>
|
|
@@ -129,9 +128,8 @@ based on the content of your package.
|
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
|
|
132
|
-
<span class="summary_desc"><div class='inline'
|
|
133
|
-
|
|
134
|
-
</p>
|
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
|
132
|
+
<p>The type of content.</p>
|
|
135
133
|
</div></span>
|
|
136
134
|
|
|
137
135
|
</li>
|
|
@@ -156,9 +154,8 @@ ContentType The type of content.
|
|
|
156
154
|
|
|
157
155
|
|
|
158
156
|
|
|
159
|
-
<span class="summary_desc"><div class='inline'
|
|
160
|
-
The extension of the content type
|
|
161
|
-
</p>
|
|
157
|
+
<span class="summary_desc"><div class='inline'>
|
|
158
|
+
<p>The extension of the content type.</p>
|
|
162
159
|
</div></span>
|
|
163
160
|
|
|
164
161
|
</li>
|
|
@@ -195,9 +192,8 @@ The extension of the content type.
|
|
|
195
192
|
|
|
196
193
|
|
|
197
194
|
|
|
198
|
-
<span class="summary_desc"><div class='inline'
|
|
199
|
-
Creates a new Default object
|
|
200
|
-
</p>
|
|
195
|
+
<span class="summary_desc"><div class='inline'>
|
|
196
|
+
<p>Creates a new Default object.</p>
|
|
201
197
|
</div></span>
|
|
202
198
|
|
|
203
199
|
</li>
|
|
@@ -219,9 +215,8 @@ Creates a new Default object.
|
|
|
219
215
|
|
|
220
216
|
|
|
221
217
|
|
|
222
|
-
<span class="summary_desc"><div class='inline'
|
|
223
|
-
Serializes the object to xml
|
|
224
|
-
</p>
|
|
218
|
+
<span class="summary_desc"><div class='inline'>
|
|
219
|
+
<p>Serializes the object to xml.</p>
|
|
225
220
|
</div></span>
|
|
226
221
|
|
|
227
222
|
</li>
|
|
@@ -242,9 +237,8 @@ Serializes the object to xml.
|
|
|
242
237
|
|
|
243
238
|
</p><div class="docstring">
|
|
244
239
|
<div class="discussion">
|
|
245
|
-
|
|
246
|
-
Creates a new Default object
|
|
247
|
-
</p>
|
|
240
|
+
|
|
241
|
+
<p>Creates a new Default object</p>
|
|
248
242
|
|
|
249
243
|
|
|
250
244
|
</div>
|
|
@@ -265,9 +259,8 @@ Creates a new Default object
|
|
|
265
259
|
|
|
266
260
|
|
|
267
261
|
—
|
|
268
|
-
<div class='inline'
|
|
269
|
-
a customizable set of options
|
|
270
|
-
</p>
|
|
262
|
+
<div class='inline'>
|
|
263
|
+
<p>a customizable set of options</p>
|
|
271
264
|
</div>
|
|
272
265
|
|
|
273
266
|
</li>
|
|
@@ -312,10 +305,9 @@ a customizable set of options
|
|
|
312
305
|
|
|
313
306
|
|
|
314
307
|
—
|
|
315
|
-
<div class='inline'
|
|
316
|
-
An argument error is raised if both Extension and ContentType are not
|
|
317
|
-
specified
|
|
318
|
-
</p>
|
|
308
|
+
<div class='inline'>
|
|
309
|
+
<p>An argument error is raised if both Extension and ContentType are not
|
|
310
|
+
specified.</p>
|
|
319
311
|
</div>
|
|
320
312
|
|
|
321
313
|
</li>
|
|
@@ -328,23 +320,22 @@ specified.
|
|
|
328
320
|
<pre class="lines">
|
|
329
321
|
|
|
330
322
|
|
|
331
|
-
16
|
|
332
323
|
17
|
|
333
324
|
18
|
|
334
325
|
19
|
|
335
326
|
20
|
|
336
|
-
21
|
|
327
|
+
21
|
|
328
|
+
22</pre>
|
|
337
329
|
</td>
|
|
338
330
|
<td>
|
|
339
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/content_type/default.rb', line
|
|
340
|
-
|
|
341
|
-
<span class='
|
|
342
|
-
<span class='raise
|
|
343
|
-
<span class='options
|
|
344
|
-
<span class='
|
|
345
|
-
<span class='
|
|
346
|
-
<span class='
|
|
347
|
-
</pre>
|
|
331
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/content_type/default.rb', line 17</span>
|
|
332
|
+
|
|
333
|
+
<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>
|
|
334
|
+
<span class='id raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Extension and ContentType are required</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:Extension</span><span class='rbracket'>]</span> <span class='op'>&&</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='symbol'>:ContentType</span><span class='rbracket'>]</span>
|
|
335
|
+
<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>
|
|
336
|
+
<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>
|
|
337
|
+
<span class='kw'>end</span>
|
|
338
|
+
<span class='kw'>end</span></pre>
|
|
348
339
|
</td>
|
|
349
340
|
</tr>
|
|
350
341
|
</table>
|
|
@@ -367,11 +358,8 @@ specified.
|
|
|
367
358
|
|
|
368
359
|
</p><div class="docstring">
|
|
369
360
|
<div class="discussion">
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
STYLES_CT, XML_CT, WORKSHEET_CT, SHARED_STRINGS_CT, CORE_CT, CHART_CT,
|
|
373
|
-
DRAWING_CT are allowed
|
|
374
|
-
</p>
|
|
361
|
+
|
|
362
|
+
<p>The type of content.</p>
|
|
375
363
|
|
|
376
364
|
|
|
377
365
|
</div>
|
|
@@ -388,14 +376,6 @@ DRAWING_CT are allowed
|
|
|
388
376
|
|
|
389
377
|
|
|
390
378
|
|
|
391
|
-
—
|
|
392
|
-
<div class='inline'><p>
|
|
393
|
-
ContentType The type of content. TABLE_CT, WORKBOOK_CT, APP_CT, RELS_CT,
|
|
394
|
-
STYLES_CT, XML_CT, WORKSHEET_CT, SHARED_STRINGS_CT, CORE_CT, CHART_CT,
|
|
395
|
-
DRAWING_CT are allowed
|
|
396
|
-
</p>
|
|
397
|
-
</div>
|
|
398
|
-
|
|
399
379
|
</li>
|
|
400
380
|
|
|
401
381
|
</ul>
|
|
@@ -406,17 +386,16 @@ DRAWING_CT are allowed
|
|
|
406
386
|
<pre class="lines">
|
|
407
387
|
|
|
408
388
|
|
|
409
|
-
10
|
|
410
389
|
11
|
|
411
|
-
12
|
|
390
|
+
12
|
|
391
|
+
13</pre>
|
|
412
392
|
</td>
|
|
413
393
|
<td>
|
|
414
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/content_type/default.rb', line
|
|
394
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/content_type/default.rb', line 11</span>
|
|
415
395
|
|
|
416
|
-
<span class='
|
|
417
|
-
<span class='
|
|
418
|
-
<span class='
|
|
419
|
-
</pre>
|
|
396
|
+
<span class='kw'>def</span> <span class='const'>ContentType</span>
|
|
397
|
+
<span class='ivar'>@ContentType</span>
|
|
398
|
+
<span class='kw'>end</span></pre>
|
|
420
399
|
</td>
|
|
421
400
|
</tr>
|
|
422
401
|
</table>
|
|
@@ -434,9 +413,8 @@ DRAWING_CT are allowed
|
|
|
434
413
|
|
|
435
414
|
</p><div class="docstring">
|
|
436
415
|
<div class="discussion">
|
|
437
|
-
|
|
438
|
-
The extension of the content type
|
|
439
|
-
</p>
|
|
416
|
+
|
|
417
|
+
<p>The extension of the content type.</p>
|
|
440
418
|
|
|
441
419
|
|
|
442
420
|
</div>
|
|
@@ -470,10 +448,9 @@ The extension of the content type.
|
|
|
470
448
|
<td>
|
|
471
449
|
<pre class="code"><span class="info file"># File 'lib/axlsx/content_type/default.rb', line 7</span>
|
|
472
450
|
|
|
473
|
-
<span class='
|
|
474
|
-
<span class='
|
|
475
|
-
<span class='
|
|
476
|
-
</pre>
|
|
451
|
+
<span class='kw'>def</span> <span class='const'>Extension</span>
|
|
452
|
+
<span class='ivar'>@Extension</span>
|
|
453
|
+
<span class='kw'>end</span></pre>
|
|
477
454
|
</td>
|
|
478
455
|
</tr>
|
|
479
456
|
</table>
|
|
@@ -495,9 +472,8 @@ The extension of the content type.
|
|
|
495
472
|
|
|
496
473
|
</p><div class="docstring">
|
|
497
474
|
<div class="discussion">
|
|
498
|
-
|
|
499
|
-
Serializes the object to xml
|
|
500
|
-
</p>
|
|
475
|
+
|
|
476
|
+
<p>Serializes the object to xml</p>
|
|
501
477
|
|
|
502
478
|
|
|
503
479
|
</div>
|
|
@@ -516,9 +492,8 @@ Serializes the object to xml
|
|
|
516
492
|
|
|
517
493
|
|
|
518
494
|
—
|
|
519
|
-
<div class='inline'
|
|
520
|
-
The document builder instance this objects xml will be added to
|
|
521
|
-
</p>
|
|
495
|
+
<div class='inline'>
|
|
496
|
+
<p>The document builder instance this objects xml will be added to.</p>
|
|
522
497
|
</div>
|
|
523
498
|
|
|
524
499
|
</li>
|
|
@@ -545,17 +520,16 @@ The document builder instance this objects xml will be added to.
|
|
|
545
520
|
<pre class="lines">
|
|
546
521
|
|
|
547
522
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
523
|
+
33
|
|
524
|
+
34
|
|
525
|
+
35</pre>
|
|
551
526
|
</td>
|
|
552
527
|
<td>
|
|
553
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/content_type/default.rb', line
|
|
528
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/content_type/default.rb', line 33</span>
|
|
554
529
|
|
|
555
|
-
<span class='
|
|
556
|
-
<span class='xml
|
|
557
|
-
<span class='
|
|
558
|
-
</pre>
|
|
530
|
+
<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>
|
|
531
|
+
<span class='id xml'>xml</span><span class='period'>.</span><span class='const'>Default</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id instance_values'>instance_values</span><span class='rparen'>)</span>
|
|
532
|
+
<span class='kw'>end</span></pre>
|
|
559
533
|
</td>
|
|
560
534
|
</tr>
|
|
561
535
|
</table>
|
|
@@ -566,9 +540,9 @@ The document builder instance this objects xml will be added to.
|
|
|
566
540
|
</div>
|
|
567
541
|
|
|
568
542
|
<div id="footer">
|
|
569
|
-
Generated on
|
|
543
|
+
Generated on Sat Nov 26 13:16:38 2011 by
|
|
570
544
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
571
|
-
0.7.3 (ruby-1.
|
|
545
|
+
0.7.3 (ruby-1.9.3).
|
|
572
546
|
</div>
|
|
573
547
|
|
|
574
548
|
</body>
|
data/doc/Axlsx/Drawing.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Axlsx::Drawing
|
|
8
8
|
|
|
9
|
-
—
|
|
9
|
+
— AXLSX
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -97,19 +97,17 @@
|
|
|
97
97
|
|
|
98
98
|
<div class="note notetag">
|
|
99
99
|
<strong>Note:</strong>
|
|
100
|
-
<div class='inline'
|
|
101
|
-
The recommended way to manage drawings is to use the Worksheet.add_chart
|
|
102
|
-
method
|
|
103
|
-
</p>
|
|
100
|
+
<div class='inline'>
|
|
101
|
+
<p>The recommended way to manage drawings is to use the Worksheet.add_chart
|
|
102
|
+
method.</p>
|
|
104
103
|
</div>
|
|
105
104
|
</div>
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
A Drawing is a canvas for charts. Each worksheet has a single drawing that
|
|
106
|
+
|
|
107
|
+
<p>A Drawing is a canvas for charts. Each worksheet has a single drawing that
|
|
109
108
|
manages anchors. The anchors reference the charts via graphical frames.
|
|
110
109
|
This is not a trivial relationship so please do follow the advice in the
|
|
111
|
-
note. see README for an example of how to create a chart
|
|
112
|
-
</p>
|
|
110
|
+
note. see README for an example of how to create a chart.</p>
|
|
113
111
|
|
|
114
112
|
|
|
115
113
|
</div>
|
|
@@ -150,10 +148,9 @@ note. see README for an example of how to create a chart.
|
|
|
150
148
|
|
|
151
149
|
|
|
152
150
|
|
|
153
|
-
<span class="summary_desc"><div class='inline'
|
|
154
|
-
A collection of anchors for this drawing only TwoCellAnchors are supported
|
|
155
|
-
in this version
|
|
156
|
-
</p>
|
|
151
|
+
<span class="summary_desc"><div class='inline'>
|
|
152
|
+
<p>A collection of anchors for this drawing only TwoCellAnchors are supported
|
|
153
|
+
in this version.</p>
|
|
157
154
|
</div></span>
|
|
158
155
|
|
|
159
156
|
</li>
|
|
@@ -162,7 +159,7 @@ in this version.
|
|
|
162
159
|
<li class="public ">
|
|
163
160
|
<span class="summary_signature">
|
|
164
161
|
|
|
165
|
-
<a href="#
|
|
162
|
+
<a href="#worksheet-instance_method" title="#worksheet (instance method)">- (Worksheet) <strong>worksheet</strong> </a>
|
|
166
163
|
|
|
167
164
|
|
|
168
165
|
|
|
@@ -178,163 +175,152 @@ in this version.
|
|
|
178
175
|
|
|
179
176
|
|
|
180
177
|
|
|
181
|
-
<span class="summary_desc"><div class='inline'
|
|
182
|
-
|
|
183
|
-
</p>
|
|
178
|
+
<span class="summary_desc"><div class='inline'>
|
|
179
|
+
<p>The worksheet that owns the drawing.</p>
|
|
184
180
|
</div></span>
|
|
185
181
|
|
|
186
182
|
</li>
|
|
187
183
|
|
|
188
184
|
|
|
189
|
-
|
|
185
|
+
</ul>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
<h2>
|
|
192
|
+
Instance Method Summary
|
|
193
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
194
|
+
</h2>
|
|
195
|
+
|
|
196
|
+
<ul class="summary">
|
|
197
|
+
|
|
198
|
+
<li class="public ">
|
|
190
199
|
<span class="summary_signature">
|
|
191
200
|
|
|
192
|
-
<a href="#
|
|
201
|
+
<a href="#add_chart-instance_method" title="#add_chart (instance method)">- (Object) <strong>add_chart</strong>(chart_type, options = {}) </a>
|
|
193
202
|
|
|
194
203
|
|
|
195
204
|
|
|
196
205
|
</span>
|
|
197
206
|
|
|
198
207
|
|
|
199
|
-
<span class="note title readonly">readonly</span>
|
|
200
|
-
|
|
201
|
-
|
|
202
208
|
|
|
203
209
|
|
|
204
210
|
|
|
205
211
|
|
|
206
212
|
|
|
207
213
|
|
|
208
|
-
<span class="summary_desc"><div class='inline'
|
|
209
|
-
|
|
210
|
-
anchors.
|
|
211
|
-
</p>
|
|
214
|
+
<span class="summary_desc"><div class='inline'>
|
|
215
|
+
<p>Adds a chart to the drawing.</p>
|
|
212
216
|
</div></span>
|
|
213
217
|
|
|
214
218
|
</li>
|
|
215
219
|
|
|
216
|
-
|
|
217
|
-
|
|
220
|
+
|
|
221
|
+
<li class="public ">
|
|
218
222
|
<span class="summary_signature">
|
|
219
223
|
|
|
220
|
-
<a href="#
|
|
224
|
+
<a href="#add_image-instance_method" title="#add_image (instance method)">- (Object) <strong>add_image</strong>(options = {}) </a>
|
|
221
225
|
|
|
222
226
|
|
|
223
227
|
|
|
224
228
|
</span>
|
|
225
229
|
|
|
226
230
|
|
|
227
|
-
<span class="note title readonly">readonly</span>
|
|
228
|
-
|
|
229
|
-
|
|
230
231
|
|
|
231
232
|
|
|
232
233
|
|
|
233
234
|
|
|
234
235
|
|
|
235
236
|
|
|
236
|
-
<span class="summary_desc"><div class='inline'
|
|
237
|
-
|
|
238
|
-
collection.
|
|
239
|
-
</p>
|
|
237
|
+
<span class="summary_desc"><div class='inline'>
|
|
238
|
+
<p>Adds an image to the chart.</p>
|
|
240
239
|
</div></span>
|
|
241
240
|
|
|
242
241
|
</li>
|
|
243
242
|
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
|
|
244
|
+
<li class="public ">
|
|
246
245
|
<span class="summary_signature">
|
|
247
246
|
|
|
248
|
-
<a href="#
|
|
247
|
+
<a href="#charts-instance_method" title="#charts (instance method)">- (Array) <strong>charts</strong> </a>
|
|
249
248
|
|
|
250
249
|
|
|
251
250
|
|
|
252
251
|
</span>
|
|
253
252
|
|
|
254
253
|
|
|
255
|
-
<span class="note title readonly">readonly</span>
|
|
256
|
-
|
|
257
|
-
|
|
258
254
|
|
|
259
255
|
|
|
260
256
|
|
|
261
257
|
|
|
262
258
|
|
|
263
259
|
|
|
264
|
-
<span class="summary_desc"><div class='inline'
|
|
265
|
-
|
|
266
|
-
</p>
|
|
260
|
+
<span class="summary_desc"><div class='inline'>
|
|
261
|
+
<p>An array of charts that are associated with this drawing's anchors.</p>
|
|
267
262
|
</div></span>
|
|
268
263
|
|
|
269
264
|
</li>
|
|
270
265
|
|
|
271
|
-
|
|
272
|
-
|
|
266
|
+
|
|
267
|
+
<li class="public ">
|
|
273
268
|
<span class="summary_signature">
|
|
274
269
|
|
|
275
|
-
<a href="#
|
|
270
|
+
<a href="#images-instance_method" title="#images (instance method)">- (Array) <strong>images</strong> </a>
|
|
276
271
|
|
|
277
272
|
|
|
278
273
|
|
|
279
274
|
</span>
|
|
280
275
|
|
|
281
276
|
|
|
282
|
-
<span class="note title readonly">readonly</span>
|
|
283
|
-
|
|
284
|
-
|
|
285
277
|
|
|
286
278
|
|
|
287
279
|
|
|
288
280
|
|
|
289
281
|
|
|
290
282
|
|
|
291
|
-
<span class="summary_desc"><div class='inline'
|
|
292
|
-
|
|
293
|
-
</p>
|
|
283
|
+
<span class="summary_desc"><div class='inline'>
|
|
284
|
+
<p>An array of image objects that are associated with this drawing's anchors.</p>
|
|
294
285
|
</div></span>
|
|
295
286
|
|
|
296
287
|
</li>
|
|
297
288
|
|
|
298
|
-
|
|
299
|
-
|
|
289
|
+
|
|
290
|
+
<li class="public ">
|
|
300
291
|
<span class="summary_signature">
|
|
301
292
|
|
|
302
|
-
<a href="#
|
|
293
|
+
<a href="#index-instance_method" title="#index (instance method)">- (Integer) <strong>index</strong> </a>
|
|
303
294
|
|
|
304
295
|
|
|
305
296
|
|
|
306
297
|
</span>
|
|
307
298
|
|
|
308
299
|
|
|
309
|
-
<span class="note title readonly">readonly</span>
|
|
310
|
-
|
|
311
|
-
|
|
312
300
|
|
|
313
301
|
|
|
314
302
|
|
|
315
303
|
|
|
316
304
|
|
|
317
305
|
|
|
318
|
-
<span class="summary_desc"><div class='inline'
|
|
319
|
-
The
|
|
320
|
-
</p>
|
|
306
|
+
<span class="summary_desc"><div class='inline'>
|
|
307
|
+
<p>The index of this drawing in the owning workbooks's drawings collection.</p>
|
|
321
308
|
</div></span>
|
|
322
309
|
|
|
323
310
|
</li>
|
|
324
311
|
|
|
325
|
-
|
|
326
|
-
|
|
312
|
+
|
|
313
|
+
<li class="public ">
|
|
327
314
|
<span class="summary_signature">
|
|
328
315
|
|
|
329
|
-
<a href="#
|
|
316
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Drawing) <strong>initialize</strong>(worksheet) </a>
|
|
330
317
|
|
|
331
318
|
|
|
332
319
|
|
|
333
320
|
</span>
|
|
334
321
|
|
|
322
|
+
<span class="note title constructor">constructor</span>
|
|
335
323
|
|
|
336
|
-
<span class="note title readonly">readonly</span>
|
|
337
|
-
|
|
338
324
|
|
|
339
325
|
|
|
340
326
|
|
|
@@ -342,58 +328,40 @@ The relational part name for this drawing.
|
|
|
342
328
|
|
|
343
329
|
|
|
344
330
|
|
|
345
|
-
<span class="summary_desc"><div class='inline'
|
|
346
|
-
|
|
347
|
-
</p>
|
|
331
|
+
<span class="summary_desc"><div class='inline'>
|
|
332
|
+
<p>Creates a new Drawing object.</p>
|
|
348
333
|
</div></span>
|
|
349
334
|
|
|
350
335
|
</li>
|
|
351
336
|
|
|
352
|
-
|
|
353
|
-
|
|
337
|
+
|
|
338
|
+
<li class="public ">
|
|
354
339
|
<span class="summary_signature">
|
|
355
340
|
|
|
356
|
-
<a href="#
|
|
341
|
+
<a href="#pn-instance_method" title="#pn (instance method)">- (String) <strong>pn</strong> </a>
|
|
357
342
|
|
|
358
343
|
|
|
359
344
|
|
|
360
345
|
</span>
|
|
361
346
|
|
|
362
347
|
|
|
363
|
-
<span class="note title readonly">readonly</span>
|
|
364
|
-
|
|
365
|
-
|
|
366
348
|
|
|
367
349
|
|
|
368
350
|
|
|
369
351
|
|
|
370
352
|
|
|
371
353
|
|
|
372
|
-
<span class="summary_desc"><div class='inline'
|
|
373
|
-
The
|
|
374
|
-
</p>
|
|
354
|
+
<span class="summary_desc"><div class='inline'>
|
|
355
|
+
<p>The part name for this drawing.</p>
|
|
375
356
|
</div></span>
|
|
376
357
|
|
|
377
358
|
</li>
|
|
378
359
|
|
|
379
|
-
|
|
380
|
-
</ul>
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
<h2>
|
|
387
|
-
Instance Method Summary
|
|
388
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
389
|
-
</h2>
|
|
390
|
-
|
|
391
|
-
<ul class="summary">
|
|
392
360
|
|
|
393
361
|
<li class="public ">
|
|
394
362
|
<span class="summary_signature">
|
|
395
363
|
|
|
396
|
-
<a href="#
|
|
364
|
+
<a href="#relationships-instance_method" title="#relationships (instance method)">- (Relationships) <strong>relationships</strong> </a>
|
|
397
365
|
|
|
398
366
|
|
|
399
367
|
|
|
@@ -406,9 +374,8 @@ The worksheet that owns the drawing.
|
|
|
406
374
|
|
|
407
375
|
|
|
408
376
|
|
|
409
|
-
<span class="summary_desc"><div class='inline'
|
|
410
|
-
|
|
411
|
-
</p>
|
|
377
|
+
<span class="summary_desc"><div class='inline'>
|
|
378
|
+
<p>The drawing's relationships.</p>
|
|
412
379
|
</div></span>
|
|
413
380
|
|
|
414
381
|
</li>
|
|
@@ -417,7 +384,7 @@ Adds a chart to the drawing.
|
|
|
417
384
|
<li class="public ">
|
|
418
385
|
<span class="summary_signature">
|
|
419
386
|
|
|
420
|
-
<a href="#
|
|
387
|
+
<a href="#rels_pn-instance_method" title="#rels_pn (instance method)">- (String) <strong>rels_pn</strong> </a>
|
|
421
388
|
|
|
422
389
|
|
|
423
390
|
|
|
@@ -430,9 +397,8 @@ Adds a chart to the drawing.
|
|
|
430
397
|
|
|
431
398
|
|
|
432
399
|
|
|
433
|
-
<span class="summary_desc"><div class='inline'
|
|
434
|
-
|
|
435
|
-
</p>
|
|
400
|
+
<span class="summary_desc"><div class='inline'>
|
|
401
|
+
<p>The relational part name for this drawing.</p>
|
|
436
402
|
</div></span>
|
|
437
403
|
|
|
438
404
|
</li>
|
|
@@ -441,14 +407,12 @@ Adds an image to the chart.
|
|
|
441
407
|
<li class="public ">
|
|
442
408
|
<span class="summary_signature">
|
|
443
409
|
|
|
444
|
-
<a href="#
|
|
410
|
+
<a href="#rId-instance_method" title="#rId (instance method)">- (String) <strong>rId</strong> </a>
|
|
445
411
|
|
|
446
412
|
|
|
447
413
|
|
|
448
414
|
</span>
|
|
449
415
|
|
|
450
|
-
<span class="note title constructor">constructor</span>
|
|
451
|
-
|
|
452
416
|
|
|
453
417
|
|
|
454
418
|
|
|
@@ -456,9 +420,8 @@ Adds an image to the chart.
|
|
|
456
420
|
|
|
457
421
|
|
|
458
422
|
|
|
459
|
-
<span class="summary_desc"><div class='inline'
|
|
460
|
-
|
|
461
|
-
</p>
|
|
423
|
+
<span class="summary_desc"><div class='inline'>
|
|
424
|
+
<p>The relation reference id for this drawing.</p>
|
|
462
425
|
</div></span>
|
|
463
426
|
|
|
464
427
|
</li>
|
|
@@ -480,9 +443,8 @@ Creates a new Drawing object.
|
|
|
480
443
|
|
|
481
444
|
|
|
482
445
|
|
|
483
|
-
<span class="summary_desc"><div class='inline'
|
|
484
|
-
Serializes the drawing
|
|
485
|
-
</p>
|
|
446
|
+
<span class="summary_desc"><div class='inline'>
|
|
447
|
+
<p>Serializes the drawing.</p>
|
|
486
448
|
</div></span>
|
|
487
449
|
|
|
488
450
|
</li>
|
|
@@ -503,9 +465,8 @@ Serializes the drawing.
|
|
|
503
465
|
|
|
504
466
|
</p><div class="docstring">
|
|
505
467
|
<div class="discussion">
|
|
506
|
-
|
|
507
|
-
Creates a new Drawing object
|
|
508
|
-
</p>
|
|
468
|
+
|
|
469
|
+
<p>Creates a new Drawing object</p>
|
|
509
470
|
|
|
510
471
|
|
|
511
472
|
</div>
|
|
@@ -524,9 +485,8 @@ Creates a new Drawing object
|
|
|
524
485
|
|
|
525
486
|
|
|
526
487
|
—
|
|
527
|
-
<div class='inline'
|
|
528
|
-
The worksheet that owns this drawing
|
|
529
|
-
</p>
|
|
488
|
+
<div class='inline'>
|
|
489
|
+
<p>The worksheet that owns this drawing</p>
|
|
530
490
|
</div>
|
|
531
491
|
|
|
532
492
|
</li>
|
|
@@ -540,23 +500,22 @@ The worksheet that owns this drawing
|
|
|
540
500
|
<pre class="lines">
|
|
541
501
|
|
|
542
502
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
503
|
+
52
|
|
504
|
+
53
|
|
505
|
+
54
|
|
506
|
+
55
|
|
507
|
+
56
|
|
508
|
+
57</pre>
|
|
549
509
|
</td>
|
|
550
510
|
<td>
|
|
551
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
552
|
-
|
|
553
|
-
<span class='
|
|
554
|
-
<span class='
|
|
555
|
-
<span class='
|
|
556
|
-
<span class='
|
|
557
|
-
<span class='
|
|
558
|
-
<span class='
|
|
559
|
-
</pre>
|
|
511
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 52</span>
|
|
512
|
+
|
|
513
|
+
<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id worksheet'>worksheet</span><span class='rparen'>)</span>
|
|
514
|
+
<span class='const'>DataTypeValidator</span><span class='period'>.</span><span class='id validate'>validate</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Drawing.worksheet</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='const'>Worksheet</span><span class='comma'>,</span> <span class='id worksheet'>worksheet</span>
|
|
515
|
+
<span class='ivar'>@worksheet</span> <span class='op'>=</span> <span class='id worksheet'>worksheet</span>
|
|
516
|
+
<span class='ivar'>@worksheet</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id drawings'>drawings</span> <span class='op'><<</span> <span class='kw'>self</span>
|
|
517
|
+
<span class='ivar'>@anchors</span> <span class='op'>=</span> <span class='const'>SimpleTypedList</span><span class='period'>.</span><span class='id new'>new</span> <span class='lbracket'>[</span><span class='const'>TwoCellAnchor</span><span class='comma'>,</span> <span class='const'>OneCellAnchor</span><span class='rbracket'>]</span>
|
|
518
|
+
<span class='kw'>end</span></pre>
|
|
560
519
|
</td>
|
|
561
520
|
</tr>
|
|
562
521
|
</table>
|
|
@@ -579,10 +538,9 @@ The worksheet that owns this drawing
|
|
|
579
538
|
|
|
580
539
|
</p><div class="docstring">
|
|
581
540
|
<div class="discussion">
|
|
582
|
-
|
|
583
|
-
A collection of anchors for this drawing only TwoCellAnchors are supported
|
|
584
|
-
in this version
|
|
585
|
-
</p>
|
|
541
|
+
|
|
542
|
+
<p>A collection of anchors for this drawing only TwoCellAnchors are supported
|
|
543
|
+
in this version</p>
|
|
586
544
|
|
|
587
545
|
|
|
588
546
|
</div>
|
|
@@ -616,10 +574,9 @@ in this version
|
|
|
616
574
|
<td>
|
|
617
575
|
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 48</span>
|
|
618
576
|
|
|
619
|
-
<span class='
|
|
620
|
-
<span class='
|
|
621
|
-
<span class='
|
|
622
|
-
</pre>
|
|
577
|
+
<span class='kw'>def</span> <span class='id anchors'>anchors</span>
|
|
578
|
+
<span class='ivar'>@anchors</span>
|
|
579
|
+
<span class='kw'>end</span></pre>
|
|
623
580
|
</td>
|
|
624
581
|
</tr>
|
|
625
582
|
</table>
|
|
@@ -627,19 +584,18 @@ in this version
|
|
|
627
584
|
|
|
628
585
|
|
|
629
586
|
<span id=""></span>
|
|
630
|
-
<span id="
|
|
587
|
+
<span id="worksheet-instance_method"></span>
|
|
631
588
|
<div class="method_details ">
|
|
632
|
-
<p class="signature " id="
|
|
589
|
+
<p class="signature " id="worksheet-instance_method">
|
|
633
590
|
|
|
634
|
-
- (<tt>
|
|
591
|
+
- (<tt><span class='object_link'><a href="Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span></tt>) <strong>worksheet</strong> <span class="extras">(readonly)</span>
|
|
635
592
|
|
|
636
593
|
|
|
637
594
|
|
|
638
595
|
</p><div class="docstring">
|
|
639
596
|
<div class="discussion">
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
</p>
|
|
597
|
+
|
|
598
|
+
<p>The worksheet that owns the drawing</p>
|
|
643
599
|
|
|
644
600
|
|
|
645
601
|
</div>
|
|
@@ -652,7 +608,7 @@ An array of charts that are associated with this drawing’s anchors
|
|
|
652
608
|
<li>
|
|
653
609
|
|
|
654
610
|
|
|
655
|
-
<span class='type'>(<tt>
|
|
611
|
+
<span class='type'>(<tt><span class='object_link'><a href="Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span></tt>)</span>
|
|
656
612
|
|
|
657
613
|
|
|
658
614
|
|
|
@@ -666,59 +622,61 @@ An array of charts that are associated with this drawing’s anchors
|
|
|
666
622
|
<pre class="lines">
|
|
667
623
|
|
|
668
624
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
55</pre>
|
|
625
|
+
43
|
|
626
|
+
44
|
|
627
|
+
45</pre>
|
|
673
628
|
</td>
|
|
674
629
|
<td>
|
|
675
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
630
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 43</span>
|
|
676
631
|
|
|
677
|
-
<span class='
|
|
678
|
-
<span class='
|
|
679
|
-
|
|
680
|
-
<span class='end end kw'>end</span>
|
|
681
|
-
</pre>
|
|
632
|
+
<span class='kw'>def</span> <span class='id worksheet'>worksheet</span>
|
|
633
|
+
<span class='ivar'>@worksheet</span>
|
|
634
|
+
<span class='kw'>end</span></pre>
|
|
682
635
|
</td>
|
|
683
636
|
</tr>
|
|
684
637
|
</table>
|
|
685
638
|
</div>
|
|
686
639
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
640
|
+
</div>
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
<div id="instance_method_details" class="method_details_list">
|
|
644
|
+
<h2>Instance Method Details</h2>
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
<div class="method_details first">
|
|
648
|
+
<p class="signature first" id="add_chart-instance_method">
|
|
692
649
|
|
|
693
|
-
- (<tt>
|
|
650
|
+
- (<tt>Object</tt>) <strong>add_chart</strong>(chart_type, options = {})
|
|
694
651
|
|
|
695
652
|
|
|
696
653
|
|
|
697
654
|
</p><div class="docstring">
|
|
698
655
|
<div class="discussion">
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
656
|
+
|
|
657
|
+
<div class="note notetag">
|
|
658
|
+
<strong>Note:</strong>
|
|
659
|
+
<div class='inline'>
|
|
660
|
+
<p>The recommended way to manage charts is to use Worksheet.add_chart. Please
|
|
661
|
+
refer to that method for documentation.</p>
|
|
662
|
+
</div>
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
<p>Adds a chart to the drawing.</p>
|
|
703
667
|
|
|
704
668
|
|
|
705
669
|
</div>
|
|
706
670
|
</div>
|
|
707
671
|
<div class="tags">
|
|
708
672
|
|
|
709
|
-
|
|
710
|
-
<
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
</li>
|
|
720
|
-
|
|
721
|
-
</ul>
|
|
673
|
+
|
|
674
|
+
<h3>See Also:</h3>
|
|
675
|
+
<ul class="see">
|
|
676
|
+
|
|
677
|
+
<li><span class='object_link'><a href="Worksheet.html#add_chart-instance_method" title="Axlsx::Worksheet#add_chart (method)">Worksheet#add_chart</a></span></li>
|
|
678
|
+
|
|
679
|
+
</ul>
|
|
722
680
|
|
|
723
681
|
</div><table class="source_code">
|
|
724
682
|
<tr>
|
|
@@ -726,59 +684,56 @@ anchors
|
|
|
726
684
|
<pre class="lines">
|
|
727
685
|
|
|
728
686
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
687
|
+
70
|
|
688
|
+
71
|
|
689
|
+
72
|
|
690
|
+
73</pre>
|
|
733
691
|
</td>
|
|
734
692
|
<td>
|
|
735
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
693
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 70</span>
|
|
736
694
|
|
|
737
|
-
<span class='
|
|
738
|
-
<span class='
|
|
739
|
-
<span class='
|
|
740
|
-
<span class='
|
|
741
|
-
</pre>
|
|
695
|
+
<span class='kw'>def</span> <span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='id chart_type'>chart_type</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>
|
|
696
|
+
<span class='const'>TwoCellAnchor</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span>
|
|
697
|
+
<span class='ivar'>@anchors</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='id chart_type'>chart_type</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span>
|
|
698
|
+
<span class='kw'>end</span></pre>
|
|
742
699
|
</td>
|
|
743
700
|
</tr>
|
|
744
701
|
</table>
|
|
745
702
|
</div>
|
|
746
703
|
|
|
747
|
-
|
|
748
|
-
<span id=""></span>
|
|
749
|
-
<span id="index-instance_method"></span>
|
|
750
704
|
<div class="method_details ">
|
|
751
|
-
<p class="signature " id="
|
|
705
|
+
<p class="signature " id="add_image-instance_method">
|
|
752
706
|
|
|
753
|
-
- (<tt>
|
|
707
|
+
- (<tt>Object</tt>) <strong>add_image</strong>(options = {})
|
|
754
708
|
|
|
755
709
|
|
|
756
710
|
|
|
757
711
|
</p><div class="docstring">
|
|
758
712
|
<div class="discussion">
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
713
|
+
|
|
714
|
+
<div class="note notetag">
|
|
715
|
+
<strong>Note:</strong>
|
|
716
|
+
<div class='inline'>
|
|
717
|
+
<p>The recommended way to manage images is to use Worksheet.add_image. Please
|
|
718
|
+
refer to that method for documentation.</p>
|
|
719
|
+
</div>
|
|
720
|
+
</div>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
<p>Adds an image to the chart</p>
|
|
763
724
|
|
|
764
725
|
|
|
765
726
|
</div>
|
|
766
727
|
</div>
|
|
767
728
|
<div class="tags">
|
|
768
729
|
|
|
769
|
-
|
|
770
|
-
<
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
</li>
|
|
780
|
-
|
|
781
|
-
</ul>
|
|
730
|
+
|
|
731
|
+
<h3>See Also:</h3>
|
|
732
|
+
<ul class="see">
|
|
733
|
+
|
|
734
|
+
<li><span class='object_link'><a href="Worksheet.html#add_image-instance_method" title="Axlsx::Worksheet#add_image (method)">Worksheet#add_image</a></span></li>
|
|
735
|
+
|
|
736
|
+
</ul>
|
|
782
737
|
|
|
783
738
|
</div><table class="source_code">
|
|
784
739
|
<tr>
|
|
@@ -786,37 +741,34 @@ collection.
|
|
|
786
741
|
<pre class="lines">
|
|
787
742
|
|
|
788
743
|
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
744
|
+
62
|
|
745
|
+
63
|
|
746
|
+
64
|
|
747
|
+
65</pre>
|
|
792
748
|
</td>
|
|
793
749
|
<td>
|
|
794
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
750
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 62</span>
|
|
795
751
|
|
|
796
|
-
<span class='
|
|
797
|
-
<span class='
|
|
798
|
-
<span class='
|
|
799
|
-
</pre>
|
|
752
|
+
<span class='kw'>def</span> <span class='id add_image'>add_image</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>
|
|
753
|
+
<span class='const'>OneCellAnchor</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span>
|
|
754
|
+
<span class='ivar'>@anchors</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id object'>object</span>
|
|
755
|
+
<span class='kw'>end</span></pre>
|
|
800
756
|
</td>
|
|
801
757
|
</tr>
|
|
802
758
|
</table>
|
|
803
759
|
</div>
|
|
804
760
|
|
|
805
|
-
|
|
806
|
-
<span id=""></span>
|
|
807
|
-
<span id="pn-instance_method"></span>
|
|
808
761
|
<div class="method_details ">
|
|
809
|
-
<p class="signature " id="
|
|
762
|
+
<p class="signature " id="charts-instance_method">
|
|
810
763
|
|
|
811
|
-
- (<tt>
|
|
764
|
+
- (<tt>Array</tt>) <strong>charts</strong>
|
|
812
765
|
|
|
813
766
|
|
|
814
767
|
|
|
815
768
|
</p><div class="docstring">
|
|
816
769
|
<div class="discussion">
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
</p>
|
|
770
|
+
|
|
771
|
+
<p>An array of charts that are associated with this drawing's anchors</p>
|
|
820
772
|
|
|
821
773
|
|
|
822
774
|
</div>
|
|
@@ -829,7 +781,7 @@ The part name for this drawing
|
|
|
829
781
|
<li>
|
|
830
782
|
|
|
831
783
|
|
|
832
|
-
<span class='type'>(<tt>
|
|
784
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
|
833
785
|
|
|
834
786
|
|
|
835
787
|
|
|
@@ -843,37 +795,34 @@ The part name for this drawing
|
|
|
843
795
|
<pre class="lines">
|
|
844
796
|
|
|
845
797
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
798
|
+
77
|
|
799
|
+
78
|
|
800
|
+
79
|
|
801
|
+
80</pre>
|
|
849
802
|
</td>
|
|
850
803
|
<td>
|
|
851
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
804
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 77</span>
|
|
852
805
|
|
|
853
|
-
<span class='
|
|
854
|
-
<span class='
|
|
855
|
-
<span class='
|
|
856
|
-
</pre>
|
|
806
|
+
<span class='kw'>def</span> <span class='id charts'>charts</span>
|
|
807
|
+
<span class='id charts'>charts</span> <span class='op'>=</span> <span class='ivar'>@anchors</span><span class='period'>.</span><span class='id select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id a'>a</span><span class='op'>|</span> <span class='id a'>a</span><span class='period'>.</span><span class='id object'>object</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>GraphicFrame</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
808
|
+
<span class='id charts'>charts</span><span class='period'>.</span><span class='id map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id a'>a</span><span class='op'>|</span> <span class='id a'>a</span><span class='period'>.</span><span class='id object'>object</span><span class='period'>.</span><span class='id chart'>chart</span> <span class='rbrace'>}</span>
|
|
809
|
+
<span class='kw'>end</span></pre>
|
|
857
810
|
</td>
|
|
858
811
|
</tr>
|
|
859
812
|
</table>
|
|
860
813
|
</div>
|
|
861
814
|
|
|
862
|
-
|
|
863
|
-
<span id=""></span>
|
|
864
|
-
<span id="relationships-instance_method"></span>
|
|
865
815
|
<div class="method_details ">
|
|
866
|
-
<p class="signature " id="
|
|
816
|
+
<p class="signature " id="images-instance_method">
|
|
867
817
|
|
|
868
|
-
- (<tt
|
|
818
|
+
- (<tt>Array</tt>) <strong>images</strong>
|
|
869
819
|
|
|
870
820
|
|
|
871
821
|
|
|
872
822
|
</p><div class="docstring">
|
|
873
823
|
<div class="discussion">
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
</p>
|
|
824
|
+
|
|
825
|
+
<p>An array of image objects that are associated with this drawing's anchors</p>
|
|
877
826
|
|
|
878
827
|
|
|
879
828
|
</div>
|
|
@@ -886,7 +835,7 @@ The drawing’s relationships.
|
|
|
886
835
|
<li>
|
|
887
836
|
|
|
888
837
|
|
|
889
|
-
<span class='type'>(<tt
|
|
838
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
|
890
839
|
|
|
891
840
|
|
|
892
841
|
|
|
@@ -900,51 +849,34 @@ The drawing’s relationships.
|
|
|
900
849
|
<pre class="lines">
|
|
901
850
|
|
|
902
851
|
|
|
903
|
-
76
|
|
904
|
-
77
|
|
905
|
-
78
|
|
906
|
-
79
|
|
907
|
-
80
|
|
908
|
-
81
|
|
909
|
-
82
|
|
910
|
-
83
|
|
911
852
|
84
|
|
912
|
-
85
|
|
853
|
+
85
|
|
854
|
+
86
|
|
855
|
+
87</pre>
|
|
913
856
|
</td>
|
|
914
857
|
<td>
|
|
915
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
916
|
-
|
|
917
|
-
<span class='
|
|
918
|
-
<span class='
|
|
919
|
-
<span class='
|
|
920
|
-
|
|
921
|
-
<span class='end end kw'>end</span>
|
|
922
|
-
<span class='images identifier id'>images</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='image identifier id'>image</span><span class='bitor op'>|</span>
|
|
923
|
-
<span class='r identifier id'>r</span> <span class='lshft op'><<</span> <span class='Relationship constant id'>Relationship</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='IMAGE_R constant id'>IMAGE_R</span><span class='comma token'>,</span> <span class='dstring node'>"../#{image.pn}"</span><span class='rparen token'>)</span>
|
|
924
|
-
<span class='end end kw'>end</span>
|
|
925
|
-
<span class='r identifier id'>r</span>
|
|
926
|
-
<span class='end end kw'>end</span>
|
|
927
|
-
</pre>
|
|
858
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 84</span>
|
|
859
|
+
|
|
860
|
+
<span class='kw'>def</span> <span class='id images'>images</span>
|
|
861
|
+
<span class='id images'>images</span> <span class='op'>=</span> <span class='ivar'>@anchors</span><span class='period'>.</span><span class='id select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id a'>a</span><span class='op'>|</span> <span class='id a'>a</span><span class='period'>.</span><span class='id object'>object</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Pic</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
862
|
+
<span class='id images'>images</span><span class='period'>.</span><span class='id map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id a'>a</span><span class='op'>|</span> <span class='id a'>a</span><span class='period'>.</span><span class='id object'>object</span> <span class='rbrace'>}</span>
|
|
863
|
+
<span class='kw'>end</span></pre>
|
|
928
864
|
</td>
|
|
929
865
|
</tr>
|
|
930
866
|
</table>
|
|
931
867
|
</div>
|
|
932
868
|
|
|
933
|
-
|
|
934
|
-
<span id=""></span>
|
|
935
|
-
<span id="rels_pn-instance_method"></span>
|
|
936
869
|
<div class="method_details ">
|
|
937
|
-
<p class="signature " id="
|
|
870
|
+
<p class="signature " id="index-instance_method">
|
|
938
871
|
|
|
939
|
-
- (<tt>
|
|
872
|
+
- (<tt>Integer</tt>) <strong>index</strong>
|
|
940
873
|
|
|
941
874
|
|
|
942
875
|
|
|
943
876
|
</p><div class="docstring">
|
|
944
877
|
<div class="discussion">
|
|
945
|
-
|
|
946
|
-
The
|
|
947
|
-
</p>
|
|
878
|
+
|
|
879
|
+
<p>The index of this drawing in the owning workbooks's drawings collection.</p>
|
|
948
880
|
|
|
949
881
|
|
|
950
882
|
</div>
|
|
@@ -957,7 +889,7 @@ The relational part name for this drawing
|
|
|
957
889
|
<li>
|
|
958
890
|
|
|
959
891
|
|
|
960
|
-
<span class='type'>(<tt>
|
|
892
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
|
961
893
|
|
|
962
894
|
|
|
963
895
|
|
|
@@ -971,37 +903,32 @@ The relational part name for this drawing
|
|
|
971
903
|
<pre class="lines">
|
|
972
904
|
|
|
973
905
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
906
|
+
91
|
|
907
|
+
92
|
|
908
|
+
93</pre>
|
|
977
909
|
</td>
|
|
978
910
|
<td>
|
|
979
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
911
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 91</span>
|
|
980
912
|
|
|
981
|
-
<span class='
|
|
982
|
-
<span class='
|
|
983
|
-
<span class='
|
|
984
|
-
</pre>
|
|
913
|
+
<span class='kw'>def</span> <span class='id index'>index</span>
|
|
914
|
+
<span class='ivar'>@worksheet</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id drawings'>drawings</span><span class='period'>.</span><span class='id index'>index</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
|
915
|
+
<span class='kw'>end</span></pre>
|
|
985
916
|
</td>
|
|
986
917
|
</tr>
|
|
987
918
|
</table>
|
|
988
919
|
</div>
|
|
989
920
|
|
|
990
|
-
|
|
991
|
-
<span id=""></span>
|
|
992
|
-
<span id="rId-instance_method"></span>
|
|
993
921
|
<div class="method_details ">
|
|
994
|
-
<p class="signature " id="
|
|
922
|
+
<p class="signature " id="pn-instance_method">
|
|
995
923
|
|
|
996
|
-
- (<tt>String</tt>) <strong>
|
|
924
|
+
- (<tt>String</tt>) <strong>pn</strong>
|
|
997
925
|
|
|
998
926
|
|
|
999
927
|
|
|
1000
928
|
</p><div class="docstring">
|
|
1001
929
|
<div class="discussion">
|
|
1002
|
-
|
|
1003
|
-
The
|
|
1004
|
-
</p>
|
|
930
|
+
|
|
931
|
+
<p>The part name for this drawing</p>
|
|
1005
932
|
|
|
1006
933
|
|
|
1007
934
|
</div>
|
|
@@ -1028,37 +955,32 @@ The relation reference id for this drawing
|
|
|
1028
955
|
<pre class="lines">
|
|
1029
956
|
|
|
1030
957
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
958
|
+
103
|
|
959
|
+
104
|
|
960
|
+
105</pre>
|
|
1034
961
|
</td>
|
|
1035
962
|
<td>
|
|
1036
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
963
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 103</span>
|
|
1037
964
|
|
|
1038
|
-
<span class='
|
|
1039
|
-
<span class='
|
|
1040
|
-
<span class='
|
|
1041
|
-
</pre>
|
|
965
|
+
<span class='kw'>def</span> <span class='id pn'>pn</span>
|
|
966
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>DRAWING_PN</span> <span class='op'>%</span> <span class='lparen'>(</span><span class='id index'>index</span><span class='op'>+</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
967
|
+
<span class='kw'>end</span></pre>
|
|
1042
968
|
</td>
|
|
1043
969
|
</tr>
|
|
1044
970
|
</table>
|
|
1045
971
|
</div>
|
|
1046
972
|
|
|
1047
|
-
|
|
1048
|
-
<span id=""></span>
|
|
1049
|
-
<span id="worksheet-instance_method"></span>
|
|
1050
973
|
<div class="method_details ">
|
|
1051
|
-
<p class="signature " id="
|
|
974
|
+
<p class="signature " id="relationships-instance_method">
|
|
1052
975
|
|
|
1053
|
-
- (<tt><span class='object_link'><a href="
|
|
976
|
+
- (<tt><span class='object_link'><a href="Relationships.html" title="Axlsx::Relationships (class)">Relationships</a></span></tt>) <strong>relationships</strong>
|
|
1054
977
|
|
|
1055
978
|
|
|
1056
979
|
|
|
1057
980
|
</p><div class="docstring">
|
|
1058
981
|
<div class="discussion">
|
|
1059
|
-
|
|
1060
|
-
The
|
|
1061
|
-
</p>
|
|
982
|
+
|
|
983
|
+
<p>The drawing's relationships.</p>
|
|
1062
984
|
|
|
1063
985
|
|
|
1064
986
|
</div>
|
|
@@ -1071,7 +993,7 @@ The worksheet that owns the drawing
|
|
|
1071
993
|
<li>
|
|
1072
994
|
|
|
1073
995
|
|
|
1074
|
-
<span class='type'>(<tt><span class='object_link'><a href="
|
|
996
|
+
<span class='type'>(<tt><span class='object_link'><a href="Relationships.html" title="Axlsx::Relationships (class)">Relationships</a></span></tt>)</span>
|
|
1075
997
|
|
|
1076
998
|
|
|
1077
999
|
|
|
@@ -1085,64 +1007,65 @@ The worksheet that owns the drawing
|
|
|
1085
1007
|
<pre class="lines">
|
|
1086
1008
|
|
|
1087
1009
|
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1010
|
+
115
|
|
1011
|
+
116
|
|
1012
|
+
117
|
|
1013
|
+
118
|
|
1014
|
+
119
|
|
1015
|
+
120
|
|
1016
|
+
121
|
|
1017
|
+
122
|
|
1018
|
+
123
|
|
1019
|
+
124</pre>
|
|
1091
1020
|
</td>
|
|
1092
1021
|
<td>
|
|
1093
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
1094
|
-
|
|
1095
|
-
<span class='
|
|
1096
|
-
<span class='
|
|
1097
|
-
<span class='
|
|
1098
|
-
</
|
|
1022
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 115</span>
|
|
1023
|
+
|
|
1024
|
+
<span class='kw'>def</span> <span class='id relationships'>relationships</span>
|
|
1025
|
+
<span class='id r'>r</span> <span class='op'>=</span> <span class='const'>Relationships</span><span class='period'>.</span><span class='id new'>new</span>
|
|
1026
|
+
<span class='id charts'>charts</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span>
|
|
1027
|
+
<span class='id r'>r</span> <span class='op'><<</span> <span class='const'>Relationship</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='const'>CHART_R</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>../</span><span class='embexpr_beg'>#{</span><span class='id chart'>chart</span><span class='period'>.</span><span class='id pn'>pn</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
1028
|
+
<span class='kw'>end</span>
|
|
1029
|
+
<span class='id images'>images</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id image'>image</span><span class='op'>|</span>
|
|
1030
|
+
<span class='id r'>r</span> <span class='op'><<</span> <span class='const'>Relationship</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='const'>IMAGE_R</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>../</span><span class='embexpr_beg'>#{</span><span class='id image'>image</span><span class='period'>.</span><span class='id pn'>pn</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
1031
|
+
<span class='kw'>end</span>
|
|
1032
|
+
<span class='id r'>r</span>
|
|
1033
|
+
<span class='kw'>end</span></pre>
|
|
1099
1034
|
</td>
|
|
1100
1035
|
</tr>
|
|
1101
1036
|
</table>
|
|
1102
1037
|
</div>
|
|
1103
1038
|
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
<div id="instance_method_details" class="method_details_list">
|
|
1108
|
-
<h2>Instance Method Details</h2>
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
<div class="method_details first">
|
|
1112
|
-
<p class="signature first" id="add_chart-instance_method">
|
|
1039
|
+
<div class="method_details ">
|
|
1040
|
+
<p class="signature " id="rels_pn-instance_method">
|
|
1113
1041
|
|
|
1114
|
-
- (<tt>
|
|
1042
|
+
- (<tt>String</tt>) <strong>rels_pn</strong>
|
|
1115
1043
|
|
|
1116
1044
|
|
|
1117
1045
|
|
|
1118
1046
|
</p><div class="docstring">
|
|
1119
1047
|
<div class="discussion">
|
|
1120
1048
|
|
|
1121
|
-
|
|
1122
|
-
<strong>Note:</strong>
|
|
1123
|
-
<div class='inline'><p>
|
|
1124
|
-
The recommended way to manage charts is to use Worksheet.add_chart. Please
|
|
1125
|
-
refer to that method for documentation.
|
|
1126
|
-
</p>
|
|
1127
|
-
</div>
|
|
1128
|
-
</div>
|
|
1129
|
-
|
|
1130
|
-
<p>
|
|
1131
|
-
Adds a chart to the drawing.
|
|
1132
|
-
</p>
|
|
1049
|
+
<p>The relational part name for this drawing</p>
|
|
1133
1050
|
|
|
1134
1051
|
|
|
1135
1052
|
</div>
|
|
1136
1053
|
</div>
|
|
1137
1054
|
<div class="tags">
|
|
1138
1055
|
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1056
|
+
<h3>Returns:</h3>
|
|
1057
|
+
<ul class="return">
|
|
1058
|
+
|
|
1059
|
+
<li>
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
</li>
|
|
1067
|
+
|
|
1068
|
+
</ul>
|
|
1146
1069
|
|
|
1147
1070
|
</div><table class="source_code">
|
|
1148
1071
|
<tr>
|
|
@@ -1150,59 +1073,51 @@ Adds a chart to the drawing.
|
|
|
1150
1073
|
<pre class="lines">
|
|
1151
1074
|
|
|
1152
1075
|
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
101</pre>
|
|
1076
|
+
109
|
|
1077
|
+
110
|
|
1078
|
+
111</pre>
|
|
1157
1079
|
</td>
|
|
1158
1080
|
<td>
|
|
1159
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
1081
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 109</span>
|
|
1160
1082
|
|
|
1161
|
-
<span class='
|
|
1162
|
-
<span class='
|
|
1163
|
-
|
|
1164
|
-
<span class='end end kw'>end</span>
|
|
1165
|
-
</pre>
|
|
1083
|
+
<span class='kw'>def</span> <span class='id rels_pn'>rels_pn</span>
|
|
1084
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>DRAWING_RELS_PN</span> <span class='op'>%</span> <span class='lparen'>(</span><span class='id index'>index</span><span class='op'>+</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
1085
|
+
<span class='kw'>end</span></pre>
|
|
1166
1086
|
</td>
|
|
1167
1087
|
</tr>
|
|
1168
1088
|
</table>
|
|
1169
1089
|
</div>
|
|
1170
1090
|
|
|
1171
1091
|
<div class="method_details ">
|
|
1172
|
-
<p class="signature " id="
|
|
1092
|
+
<p class="signature " id="rId-instance_method">
|
|
1173
1093
|
|
|
1174
|
-
- (<tt>
|
|
1094
|
+
- (<tt>String</tt>) <strong>rId</strong>
|
|
1175
1095
|
|
|
1176
1096
|
|
|
1177
1097
|
|
|
1178
1098
|
</p><div class="docstring">
|
|
1179
1099
|
<div class="discussion">
|
|
1180
1100
|
|
|
1181
|
-
|
|
1182
|
-
<strong>Note:</strong>
|
|
1183
|
-
<div class='inline'><p>
|
|
1184
|
-
The recommended way to manage images is to use Worksheet.add_image. Please
|
|
1185
|
-
refer to that method for documentation.
|
|
1186
|
-
</p>
|
|
1187
|
-
</div>
|
|
1188
|
-
</div>
|
|
1189
|
-
|
|
1190
|
-
<p>
|
|
1191
|
-
Adds an image to the chart
|
|
1192
|
-
</p>
|
|
1101
|
+
<p>The relation reference id for this drawing</p>
|
|
1193
1102
|
|
|
1194
1103
|
|
|
1195
1104
|
</div>
|
|
1196
1105
|
</div>
|
|
1197
1106
|
<div class="tags">
|
|
1198
1107
|
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1108
|
+
<h3>Returns:</h3>
|
|
1109
|
+
<ul class="return">
|
|
1110
|
+
|
|
1111
|
+
<li>
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
</li>
|
|
1119
|
+
|
|
1120
|
+
</ul>
|
|
1206
1121
|
|
|
1207
1122
|
</div><table class="source_code">
|
|
1208
1123
|
<tr>
|
|
@@ -1210,19 +1125,16 @@ Adds an image to the chart
|
|
|
1210
1125
|
<pre class="lines">
|
|
1211
1126
|
|
|
1212
1127
|
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
93</pre>
|
|
1128
|
+
97
|
|
1129
|
+
98
|
|
1130
|
+
99</pre>
|
|
1217
1131
|
</td>
|
|
1218
1132
|
<td>
|
|
1219
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
1133
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 97</span>
|
|
1220
1134
|
|
|
1221
|
-
<span class='
|
|
1222
|
-
<span class='
|
|
1223
|
-
|
|
1224
|
-
<span class='end end kw'>end</span>
|
|
1225
|
-
</pre>
|
|
1135
|
+
<span class='kw'>def</span> <span class='id rId'>rId</span>
|
|
1136
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rId</span><span class='embexpr_beg'>#{</span><span class='id index'>index</span><span class='op'>+</span><span class='int'>1</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
1137
|
+
<span class='kw'>end</span></pre>
|
|
1226
1138
|
</td>
|
|
1227
1139
|
</tr>
|
|
1228
1140
|
</table>
|
|
@@ -1237,9 +1149,8 @@ Adds an image to the chart
|
|
|
1237
1149
|
|
|
1238
1150
|
</p><div class="docstring">
|
|
1239
1151
|
<div class="discussion">
|
|
1240
|
-
|
|
1241
|
-
Serializes the drawing
|
|
1242
|
-
</p>
|
|
1152
|
+
|
|
1153
|
+
<p>Serializes the drawing</p>
|
|
1243
1154
|
|
|
1244
1155
|
|
|
1245
1156
|
</div>
|
|
@@ -1266,27 +1177,26 @@ Serializes the drawing
|
|
|
1266
1177
|
<pre class="lines">
|
|
1267
1178
|
|
|
1268
1179
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1180
|
+
128
|
|
1181
|
+
129
|
|
1182
|
+
130
|
|
1183
|
+
131
|
|
1184
|
+
132
|
|
1185
|
+
133
|
|
1186
|
+
134
|
|
1187
|
+
135</pre>
|
|
1277
1188
|
</td>
|
|
1278
1189
|
<td>
|
|
1279
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
|
1280
|
-
|
|
1281
|
-
<span class='
|
|
1282
|
-
<span class='builder
|
|
1283
|
-
<span class='xml
|
|
1284
|
-
<span class='anchors
|
|
1285
|
-
<span class='rbrace
|
|
1286
|
-
<span class='
|
|
1287
|
-
<span class='builder
|
|
1288
|
-
<span class='
|
|
1289
|
-
</pre>
|
|
1190
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 128</span>
|
|
1191
|
+
|
|
1192
|
+
<span class='kw'>def</span> <span class='id to_xml'>to_xml</span>
|
|
1193
|
+
<span class='id builder'>builder</span> <span class='op'>=</span> <span class='const'>Nokogiri</span><span class='op'>::</span><span class='const'>XML</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='symbol'>:encoding</span> <span class='op'>=></span> <span class='const'>ENCODING</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id xml'>xml</span><span class='op'>|</span>
|
|
1194
|
+
<span class='id xml'>xml</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'>xdr:wsDr</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:xmlns:xdr</span><span class='tstring_end'>'</span></span><span class='op'>=></span><span class='const'>XML_NS_XDR</span><span class='comma'>,</span> <span class='symbol'>:xmlns:a</span><span class='tstring_end'>'</span></span><span class='op'>=></span><span class='const'>XML_NS_A</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
|
|
1195
|
+
<span class='id anchors'>anchors</span><span class='period'>.</span><span class='id each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id anchor'>anchor</span><span class='op'>|</span> <span class='id anchor'>anchor</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> <span class='rbrace'>}</span>
|
|
1196
|
+
<span class='rbrace'>}</span>
|
|
1197
|
+
<span class='kw'>end</span>
|
|
1198
|
+
<span class='id builder'>builder</span><span class='period'>.</span><span class='id to_xml'>to_xml</span>
|
|
1199
|
+
<span class='kw'>end</span></pre>
|
|
1290
1200
|
</td>
|
|
1291
1201
|
</tr>
|
|
1292
1202
|
</table>
|
|
@@ -1297,9 +1207,9 @@ Serializes the drawing
|
|
|
1297
1207
|
</div>
|
|
1298
1208
|
|
|
1299
1209
|
<div id="footer">
|
|
1300
|
-
Generated on
|
|
1210
|
+
Generated on Sat Nov 26 13:16:37 2011 by
|
|
1301
1211
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1302
|
-
0.7.3 (ruby-1.
|
|
1212
|
+
0.7.3 (ruby-1.9.3).
|
|
1303
1213
|
</div>
|
|
1304
1214
|
|
|
1305
1215
|
</body>
|