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
|
@@ -3,7 +3,7 @@ module Axlsx
|
|
|
3
3
|
class BorderPr
|
|
4
4
|
|
|
5
5
|
# @return [Color] The color of this border part.
|
|
6
|
-
|
|
6
|
+
attr_reader :color
|
|
7
7
|
|
|
8
8
|
# @return [Symbol] The syle of this border part.
|
|
9
9
|
# @note
|
|
@@ -22,7 +22,7 @@ module Axlsx
|
|
|
22
22
|
# :dashDotDot
|
|
23
23
|
# :mediumDashDotDot
|
|
24
24
|
# :slantDashDot
|
|
25
|
-
|
|
25
|
+
attr_reader :style
|
|
26
26
|
|
|
27
27
|
# @return [Symbol] The name of this border part
|
|
28
28
|
# @note
|
|
@@ -36,7 +36,7 @@ module Axlsx
|
|
|
36
36
|
# :diagonal
|
|
37
37
|
# :vertical
|
|
38
38
|
# :horizontal
|
|
39
|
-
|
|
39
|
+
attr_reader :name
|
|
40
40
|
|
|
41
41
|
# Creates a new Border Part Object
|
|
42
42
|
# @option options [Color] color
|
|
@@ -49,15 +49,18 @@ module Axlsx
|
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
# @see name
|
|
52
53
|
def name=(v) RestrictionValidator.validate "BorderPr.name", [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal], v; @name = v end
|
|
54
|
+
# @see color
|
|
53
55
|
def color=(v) DataTypeValidator.validate(:color, Color, v); @color = v end
|
|
56
|
+
# @see style
|
|
54
57
|
def style=(v) RestrictionValidator.validate "BorderPr.style", [:none, :thin, :medium, :dashed, :dotted, :thick, :double, :hair, :mediumDashed, :dashDot, :mediumDashDot, :dashDotDot, :mediumDashDotDot, :slantDashDot], v; @style = v end
|
|
55
58
|
|
|
56
59
|
# Serializes the border part
|
|
57
60
|
# @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
|
|
58
61
|
# @return [String]
|
|
59
62
|
def to_xml(xml)
|
|
60
|
-
xml.send(@name, :style
|
|
63
|
+
xml.send(@name, :style => @style) {
|
|
61
64
|
@color.to_xml(xml) if @color.is_a? Color
|
|
62
65
|
}
|
|
63
66
|
end
|
|
@@ -15,7 +15,7 @@ module Axlsx
|
|
|
15
15
|
# :centerContinuous
|
|
16
16
|
# :distributed
|
|
17
17
|
# @return [Symbol]
|
|
18
|
-
|
|
18
|
+
attr_reader :horizontal
|
|
19
19
|
|
|
20
20
|
# The vertical alignment of the cell.
|
|
21
21
|
# @note
|
|
@@ -26,38 +26,38 @@ module Axlsx
|
|
|
26
26
|
# :justify
|
|
27
27
|
# :distributed
|
|
28
28
|
# @return [Symbol]
|
|
29
|
-
|
|
29
|
+
attr_reader :vertical
|
|
30
30
|
|
|
31
31
|
# The textRotation of the cell.
|
|
32
32
|
# @return [Integer]
|
|
33
|
-
|
|
33
|
+
attr_reader :textRotation
|
|
34
34
|
|
|
35
35
|
# Indicate if the text of the cell should wrap
|
|
36
36
|
# @return [Boolean]
|
|
37
|
-
|
|
37
|
+
attr_reader :wrapText
|
|
38
38
|
|
|
39
39
|
# The amount of indent
|
|
40
40
|
# @return [Integer]
|
|
41
|
-
|
|
41
|
+
attr_reader :indent
|
|
42
42
|
|
|
43
43
|
# The amount of relativeIndent
|
|
44
44
|
# @return [Integer]
|
|
45
|
-
|
|
45
|
+
attr_reader :relativeIndent
|
|
46
46
|
|
|
47
47
|
# Indicate if the last line should be justified.
|
|
48
48
|
# @return [Boolean]
|
|
49
|
-
|
|
49
|
+
attr_reader :justifyLastLine
|
|
50
50
|
|
|
51
51
|
# Indicate if the text should be shrunk to the fit in the cell.
|
|
52
52
|
# @return [Boolean]
|
|
53
|
-
|
|
53
|
+
attr_reader :shrinkToFit
|
|
54
54
|
|
|
55
55
|
# The reading order of the text
|
|
56
56
|
# 0 Context Dependent
|
|
57
57
|
# 1 Left-to-Right
|
|
58
58
|
# 2 Right-to-Left
|
|
59
59
|
# @return [Integer]
|
|
60
|
-
|
|
60
|
+
attr_reader :readingOrder
|
|
61
61
|
|
|
62
62
|
# Create a new cell_alignment object
|
|
63
63
|
# @option options [Symbol] horizontal
|
|
@@ -75,14 +75,23 @@ module Axlsx
|
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
+
# @see horizontal
|
|
78
79
|
def horizontal=(v) Axlsx::validate_horizontal_alignment v; @horizontal = v end
|
|
80
|
+
# @see vertical
|
|
79
81
|
def vertical=(v) Axlsx::validate_vertical_alignment v; @vertical = v end
|
|
82
|
+
# @see textRotation
|
|
80
83
|
def textRotation=(v) Axlsx::validate_unsigned_int v; @textRotation = v end
|
|
84
|
+
# @see wrapText
|
|
81
85
|
def wrapText=(v) Axlsx::validate_boolean v; @wrapText = v end
|
|
86
|
+
# @see indent
|
|
82
87
|
def indent=(v) Axlsx::validate_unsigned_int v; @indent = v end
|
|
88
|
+
# @see relativeIndent
|
|
83
89
|
def relativeIndent=(v) Axlsx::validate_int v; @relativeIndent = v end
|
|
90
|
+
# @see justifyLastLine
|
|
84
91
|
def justifyLastLine=(v) Axlsx::validate_boolean v; @justifyLastLine = v end
|
|
92
|
+
# @see shrinkToFit
|
|
85
93
|
def shrinkToFit=(v) Axlsx::validate_boolean v; @shrinkToFit = v end
|
|
94
|
+
# @see readingOrder
|
|
86
95
|
def readingOrder=(v) Axlsx::validate_unsigned_int v; @readingOrder = v end
|
|
87
96
|
|
|
88
97
|
# Serializes the cell alignment
|
|
@@ -6,11 +6,11 @@ module Axlsx
|
|
|
6
6
|
|
|
7
7
|
# specifies locking for cells that have the style containing this protection
|
|
8
8
|
# @return [Boolean]
|
|
9
|
-
|
|
9
|
+
attr_reader :hidden
|
|
10
10
|
|
|
11
11
|
# specifies if the cells that have the style containing this protection
|
|
12
12
|
# @return [Boolean]
|
|
13
|
-
|
|
13
|
+
attr_reader :locked
|
|
14
14
|
|
|
15
15
|
# Creates a new CellProtection
|
|
16
16
|
# @option options [Boolean] hidden value for hidden protection
|
|
@@ -20,7 +20,10 @@ module Axlsx
|
|
|
20
20
|
self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
|
+
|
|
24
|
+
# @see hidden
|
|
23
25
|
def hidden=(v) Axlsx::validate_boolean v; @hidden = v end
|
|
26
|
+
# @see locked
|
|
24
27
|
def locked=(v) Axlsx::validate_boolean v; @locked = v end
|
|
25
28
|
|
|
26
29
|
# Serializes the cell protection
|
|
@@ -5,29 +5,29 @@ module Axlsx
|
|
|
5
5
|
class CellStyle
|
|
6
6
|
# The name of this cell style
|
|
7
7
|
# @return [String]
|
|
8
|
-
|
|
8
|
+
attr_reader :name
|
|
9
9
|
|
|
10
10
|
# The formatting record id this named style utilizes
|
|
11
11
|
# @return [Integer]
|
|
12
12
|
# @see Axlsx::Xf
|
|
13
|
-
|
|
13
|
+
attr_reader :xfId
|
|
14
14
|
|
|
15
15
|
# The buildinId to use when this named style is applied
|
|
16
16
|
# @return [Integer]
|
|
17
17
|
# @see Axlsx::NumFmt
|
|
18
|
-
|
|
18
|
+
attr_reader :builtinId
|
|
19
19
|
|
|
20
20
|
# Determines if this formatting is for an outline style, and what level of the outline it is to be applied to.
|
|
21
21
|
# @return [Integer]
|
|
22
|
-
|
|
22
|
+
attr_reader :iLevel
|
|
23
23
|
|
|
24
24
|
# Determines if this named style should show in the list of styles when using excel
|
|
25
25
|
# @return [Boolean]
|
|
26
|
-
|
|
26
|
+
attr_reader :hidden
|
|
27
27
|
|
|
28
28
|
# Indicates that the build in style reference has been customized.
|
|
29
29
|
# @return [Boolean]
|
|
30
|
-
|
|
30
|
+
attr_reader :customBuiltin
|
|
31
31
|
|
|
32
32
|
# Creats a new CellStyle object
|
|
33
33
|
# @option options [String] name
|
|
@@ -41,12 +41,17 @@ module Axlsx
|
|
|
41
41
|
self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
|
-
|
|
44
|
+
# @see name
|
|
45
45
|
def name=(v) Axlsx::validate_string v; @name = v end
|
|
46
|
+
# @see xfId
|
|
46
47
|
def xfId=(v) Axlsx::validate_unsigned_int v; @xfId = v end
|
|
48
|
+
# @see builtinId
|
|
47
49
|
def builtinId=(v) Axlsx::validate_unsigned_int v; @builtinId = v end
|
|
50
|
+
# @see iLivel
|
|
48
51
|
def iLevel=(v) Axlsx::validate_unsigned_int v; @iLevel = v end
|
|
52
|
+
# @see hidden
|
|
49
53
|
def hidden=(v) Axlsx::validate_boolean v; @hidden = v end
|
|
54
|
+
# @see customBuiltin
|
|
50
55
|
def customBuiltin=(v) Axlsx::validate_boolean v; @customBuiltin = v end
|
|
51
56
|
|
|
52
57
|
# Serializes the cell style
|
|
@@ -3,11 +3,11 @@ module Axlsx
|
|
|
3
3
|
class Color
|
|
4
4
|
# Determines if the color is system color dependant
|
|
5
5
|
# @return [Boolean]
|
|
6
|
-
|
|
6
|
+
attr_reader :auto
|
|
7
7
|
|
|
8
8
|
# Backwards compatability color index
|
|
9
9
|
# return [Integer]
|
|
10
|
-
#
|
|
10
|
+
#attr_reader :indexed
|
|
11
11
|
|
|
12
12
|
# The color as defined in rgb terms.
|
|
13
13
|
# @note
|
|
@@ -16,16 +16,16 @@ module Axlsx
|
|
|
16
16
|
# "FF000000" is black
|
|
17
17
|
# "FFFFFFFF" is white
|
|
18
18
|
# @return [String]
|
|
19
|
-
|
|
19
|
+
attr_reader :rgb
|
|
20
20
|
|
|
21
21
|
# no support for theme just yet
|
|
22
22
|
# @return [Integer]
|
|
23
|
-
#
|
|
23
|
+
#attr_reader :theme
|
|
24
24
|
|
|
25
25
|
# The tint value.
|
|
26
26
|
# @note valid values are between -1.0 and 1.0
|
|
27
27
|
# @return [Float]
|
|
28
|
-
|
|
28
|
+
attr_reader :tint
|
|
29
29
|
|
|
30
30
|
# Creates a new Color object
|
|
31
31
|
# @option options [Boolean] auto
|
|
@@ -37,9 +37,11 @@ module Axlsx
|
|
|
37
37
|
self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
|
-
|
|
40
|
+
# @see auto
|
|
41
41
|
def auto=(v) Axlsx::validate_boolean v; @auto = v end
|
|
42
|
+
# @see rgb
|
|
42
43
|
def rgb=(v) Axlsx::validate_string v; @rgb = v end
|
|
44
|
+
# @see tint
|
|
43
45
|
def tint=(v) Axlsx::validate_float v; @tint = v end
|
|
44
46
|
|
|
45
47
|
# This version does not support themes
|
|
@@ -8,7 +8,7 @@ module Axlsx
|
|
|
8
8
|
|
|
9
9
|
# The type of fill
|
|
10
10
|
# @return [PatternFill, GradientFill]
|
|
11
|
-
|
|
11
|
+
attr_reader :fill_type
|
|
12
12
|
|
|
13
13
|
# Creates a new Fill object
|
|
14
14
|
# @param [PatternFill, GradientFill] fill_type
|
|
@@ -24,6 +24,7 @@ module Axlsx
|
|
|
24
24
|
xml.fill { @fill_type.to_xml(xml) }
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
# @see fill_type
|
|
27
28
|
def fill_type=(v) DataTypeValidator.validate "Fill.fill_type", [PatternFill, GradientFill], v; @fill_type = v; end
|
|
28
29
|
|
|
29
30
|
|
|
@@ -5,7 +5,7 @@ module Axlsx
|
|
|
5
5
|
class Font
|
|
6
6
|
# The name of the font
|
|
7
7
|
# @return [String]
|
|
8
|
-
|
|
8
|
+
attr_reader :name
|
|
9
9
|
|
|
10
10
|
# The charset of the font
|
|
11
11
|
# @return [Integer]
|
|
@@ -30,7 +30,7 @@ module Axlsx
|
|
|
30
30
|
# 222 THAI_CHARSET
|
|
31
31
|
# 238 EASTEUROPE_CHARSET
|
|
32
32
|
# 255 OEM_CHARSET
|
|
33
|
-
|
|
33
|
+
attr_reader :charset
|
|
34
34
|
|
|
35
35
|
# The font's family
|
|
36
36
|
# @note
|
|
@@ -43,43 +43,43 @@ module Axlsx
|
|
|
43
43
|
# 5 Decorative
|
|
44
44
|
# 6..14 Reserved for future use
|
|
45
45
|
# @return [Integer]
|
|
46
|
-
|
|
46
|
+
attr_reader :family
|
|
47
47
|
|
|
48
48
|
# Indicates if the font should be rendered in *bold*
|
|
49
49
|
# @return [Boolean]
|
|
50
|
-
|
|
50
|
+
attr_reader :b
|
|
51
51
|
|
|
52
52
|
# Indicates if the font should be rendered italicized
|
|
53
53
|
# @return [Boolean]
|
|
54
|
-
|
|
54
|
+
attr_reader :i
|
|
55
55
|
|
|
56
56
|
# Indicates if the font should be rendered with a strikthrough
|
|
57
57
|
# @return [Boolean]
|
|
58
|
-
|
|
58
|
+
attr_reader :strike
|
|
59
59
|
|
|
60
60
|
# Indicates if the font should be rendered with an outline
|
|
61
61
|
# @return [Boolean]
|
|
62
|
-
|
|
62
|
+
attr_reader :outline
|
|
63
63
|
|
|
64
64
|
# Indicates if the font should be rendered with a shadow
|
|
65
65
|
# @return [Boolean]
|
|
66
|
-
|
|
66
|
+
attr_reader :shadow
|
|
67
67
|
|
|
68
68
|
# Indicates if the font should be condensed
|
|
69
69
|
# @return [Boolean]
|
|
70
|
-
|
|
70
|
+
attr_reader :condense
|
|
71
71
|
|
|
72
72
|
# The font's extend property
|
|
73
73
|
# @return [Boolean]
|
|
74
|
-
|
|
74
|
+
attr_reader :extend
|
|
75
75
|
|
|
76
76
|
# The color of the font
|
|
77
77
|
# @return [Color]
|
|
78
|
-
|
|
78
|
+
attr_reader :color
|
|
79
79
|
|
|
80
80
|
# The size of the font.
|
|
81
81
|
# @return [Integer]
|
|
82
|
-
|
|
82
|
+
attr_reader :sz
|
|
83
83
|
|
|
84
84
|
# Creates a new Font
|
|
85
85
|
# @option options [String] name
|
|
@@ -100,18 +100,29 @@ module Axlsx
|
|
|
100
100
|
self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
|
|
101
101
|
end
|
|
102
102
|
end
|
|
103
|
-
|
|
103
|
+
# @see name
|
|
104
104
|
def name=(v) Axlsx::validate_string v; @name = v end
|
|
105
|
+
# @see charset
|
|
105
106
|
def charset=(v) Axlsx::validate_unsigned_int v; @charset = v end
|
|
107
|
+
# @see family
|
|
106
108
|
def family=(v) Axlsx::validate_unsigned_int v; @family = v end
|
|
109
|
+
# @see b
|
|
107
110
|
def b=(v) Axlsx::validate_boolean v; @b = v end
|
|
111
|
+
# @see i
|
|
108
112
|
def i=(v) Axlsx::validate_boolean v; @i = v end
|
|
113
|
+
# @see strike
|
|
109
114
|
def strike=(v) Axlsx::validate_boolean v; @strike = v end
|
|
115
|
+
# @see outline
|
|
110
116
|
def outline=(v) Axlsx::validate_boolean v; @outline = v end
|
|
117
|
+
# @see shadow
|
|
111
118
|
def shadow=(v) Axlsx::validate_boolean v; @shadow = v end
|
|
119
|
+
# @see condense
|
|
112
120
|
def condense=(v) Axlsx::validate_boolean v; @condense = v end
|
|
121
|
+
# @see extend
|
|
113
122
|
def extend=(v) Axlsx::validate_boolean v; @extend = v end
|
|
123
|
+
# @see color
|
|
114
124
|
def color=(v) DataTypeValidator.validate "Font.color", Color, v; @color=v end
|
|
125
|
+
# @see sz
|
|
115
126
|
def sz=(v) Axlsx::validate_unsigned_int v; @sz=v end
|
|
116
127
|
|
|
117
128
|
# Serializes the fill
|
|
@@ -10,27 +10,27 @@ module Axlsx
|
|
|
10
10
|
# :linear
|
|
11
11
|
# :path
|
|
12
12
|
# @return [Symbol]
|
|
13
|
-
|
|
13
|
+
attr_reader :type
|
|
14
14
|
|
|
15
15
|
# Angle of the linear gradient
|
|
16
16
|
# @return [Float]
|
|
17
|
-
|
|
17
|
+
attr_reader :degree
|
|
18
18
|
|
|
19
19
|
# Percentage format left
|
|
20
20
|
# @return [Float]
|
|
21
|
-
|
|
21
|
+
attr_reader :left
|
|
22
22
|
|
|
23
23
|
# Percentage format right
|
|
24
24
|
# @return [Float]
|
|
25
|
-
|
|
25
|
+
attr_reader :right
|
|
26
26
|
|
|
27
27
|
# Percentage format top
|
|
28
28
|
# @return [Float]
|
|
29
|
-
|
|
29
|
+
attr_reader :top
|
|
30
30
|
|
|
31
31
|
# Percentage format bottom
|
|
32
32
|
# @return [Float]
|
|
33
|
-
|
|
33
|
+
attr_reader :bottom
|
|
34
34
|
|
|
35
35
|
# Collection of stop objects
|
|
36
36
|
# @return [SimpleTypedList]
|
|
@@ -51,12 +51,18 @@ module Axlsx
|
|
|
51
51
|
@stop = SimpleTypedList.new GradientStop
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
# @see type
|
|
54
55
|
def type=(v) Axlsx::validate_gradient_type v; @type = v end
|
|
56
|
+
# @see degree
|
|
55
57
|
def degree=(v) Axlsx::validate_float v; @degree = v end
|
|
56
|
-
|
|
57
|
-
def
|
|
58
|
-
|
|
59
|
-
def
|
|
58
|
+
# @see left
|
|
59
|
+
def left=(v) DataTypeValidator.validate "GradientFill.left", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @left = v end
|
|
60
|
+
# @see right
|
|
61
|
+
def right=(v) DataTypeValidator.validate "GradientFill.right", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @right = v end
|
|
62
|
+
# @see top
|
|
63
|
+
def top=(v) DataTypeValidator.validate "GradientFill.top", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @top = v end
|
|
64
|
+
# @see bottom
|
|
65
|
+
def bottom=(v) DataTypeValidator.validate "GradientFill.bottom", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @bottom= v end
|
|
60
66
|
|
|
61
67
|
# Serializes the gradientFill
|
|
62
68
|
# @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
|
|
@@ -6,11 +6,11 @@ module Axlsx
|
|
|
6
6
|
# The color for this gradient stop
|
|
7
7
|
# @return [Color]
|
|
8
8
|
# @see Color
|
|
9
|
-
|
|
9
|
+
attr_reader :color
|
|
10
10
|
|
|
11
11
|
# The position of the color
|
|
12
12
|
# @return [Float]
|
|
13
|
-
|
|
13
|
+
attr_reader :position
|
|
14
14
|
|
|
15
15
|
# Creates a new GradientStop object
|
|
16
16
|
# @param [Color] color
|
|
@@ -20,8 +20,10 @@ module Axlsx
|
|
|
20
20
|
self.position = position
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
# @see color
|
|
23
24
|
def color=(v) DataTypeValidator.validate "GradientStop.color", Color, v; @color=v end
|
|
24
|
-
|
|
25
|
+
# @see position
|
|
26
|
+
def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |arg| arg >= 0 && arg <= 1}; @position = v end
|
|
25
27
|
|
|
26
28
|
# Serializes the gradientStop
|
|
27
29
|
# @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
|