xlsxrb 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -0
- data/lib/xlsxrb/elements/cell.rb +1 -1
- data/lib/xlsxrb/elements/workbook.rb +115 -4
- data/lib/xlsxrb/number_formatter.rb +5 -5
- data/lib/xlsxrb/ooxml/cfb.rb +61 -25
- data/lib/xlsxrb/ooxml/crypto/agile.rb +41 -12
- data/lib/xlsxrb/ooxml/reader/listeners/core_listeners.rb +4 -0
- data/lib/xlsxrb/ooxml/reader/listeners/feature_listeners.rb +2 -0
- data/lib/xlsxrb/ooxml/shared_strings_parser.rb +4 -2
- data/lib/xlsxrb/ooxml/utils.rb +4 -3
- data/lib/xlsxrb/ooxml/workbook_parser.rb +88 -40
- data/lib/xlsxrb/ooxml/workbook_writer.rb +48 -24
- data/lib/xlsxrb/ooxml/worksheet_parser.rb +186 -78
- data/lib/xlsxrb/ooxml/worksheet_writer.rb +81 -18
- data/lib/xlsxrb/ooxml/writer/drawing_xml.rb +1511 -1458
- data/lib/xlsxrb/ooxml/writer/features_xml.rb +558 -525
- data/lib/xlsxrb/ooxml/writer/styles_xml.rb +272 -280
- data/lib/xlsxrb/ooxml/writer.rb +1017 -941
- data/lib/xlsxrb/ooxml/xml_builder.rb +48 -16
- data/lib/xlsxrb/ooxml/xml_parser.rb +37 -2
- data/lib/xlsxrb/ooxml/zip_generator.rb +10 -10
- data/lib/xlsxrb/ooxml/zip_reader.rb +19 -6
- data/lib/xlsxrb/ooxml/zip_writer.rb +15 -7
- data/lib/xlsxrb/stream_row.rb +8 -5
- data/lib/xlsxrb/stream_sheet.rb +3 -0
- data/lib/xlsxrb/stream_writer.rb +48 -18
- data/lib/xlsxrb/style_builder.rb +9 -4
- data/lib/xlsxrb/version.rb +1 -1
- data/lib/xlsxrb/workbook_builder.rb +14 -8
- data/lib/xlsxrb/worksheet_builder.rb +10 -4
- data/lib/xlsxrb.rb +415 -418
- data/sig/generated/xlsxrb/elements/workbook.rbs +23 -1
- data/sig/generated/xlsxrb/ooxml/reader/listeners/core_listeners.rbs +2 -0
- data/sig/generated/xlsxrb/ooxml/workbook_parser.rbs +21 -1
- data/sig/generated/xlsxrb/ooxml/worksheet_parser.rbs +20 -2
- data/sig/generated/xlsxrb/ooxml/writer/drawing_xml.rbs +162 -47
- data/sig/generated/xlsxrb/ooxml/writer/features_xml.rbs +20 -24
- data/sig/generated/xlsxrb/ooxml/writer/styles_xml.rbs +20 -20
- data/sig/generated/xlsxrb/ooxml/writer.rbs +61 -10
- data/sig/generated/xlsxrb/ooxml/xml_builder.rbs +19 -1
- data/sig/generated/xlsxrb/ooxml/xml_parser.rbs +21 -0
- data/sig/generated/xlsxrb/ooxml/zip_writer.rbs +5 -0
- data/sig/generated/xlsxrb/stream_row.rbs +4 -3
- data/sig/generated/xlsxrb/style_builder.rbs +5 -5
- data/sig/generated/xlsxrb.rbs +41 -20
- metadata +1 -1
|
@@ -10,8 +10,10 @@ module Xlsxrb
|
|
|
10
10
|
# workbook.each { |s| puts s.name }
|
|
11
11
|
#
|
|
12
12
|
# @api public
|
|
13
|
-
#
|
|
13
|
+
# Class syntax is required for the mutant subject matcher.
|
|
14
14
|
class Workbook
|
|
15
|
+
STALE_UNMAPPED_KEYS: untyped
|
|
16
|
+
|
|
15
17
|
# @param sheets [Array<Elements::Worksheet>] Worksheets in the workbook.
|
|
16
18
|
# @param shared_strings [Array<String>] Shared strings table.
|
|
17
19
|
# @param styles [Elements::Styles, Hash] Styles definition.
|
|
@@ -196,6 +198,15 @@ module Xlsxrb
|
|
|
196
198
|
# : (?shared_strings: bool, ?compression_level: Integer?, **untyped options) -> String
|
|
197
199
|
def to_data: (?shared_strings: bool, ?compression_level: Integer?, **untyped options) -> String
|
|
198
200
|
|
|
201
|
+
# Returns a new Workbook with attributes replaced, clearing stale unmapped/facade metadata
|
|
202
|
+
# and keeping sheet-scoped print defined names synchronized when sheets change.
|
|
203
|
+
#
|
|
204
|
+
# @param changes [Hash]
|
|
205
|
+
# @return [Elements::Workbook]
|
|
206
|
+
# @api public
|
|
207
|
+
# : (**untyped) -> Elements::Workbook
|
|
208
|
+
def with: (**untyped) -> Elements::Workbook
|
|
209
|
+
|
|
199
210
|
# Validates workbook structure according to OOXML specifications.
|
|
200
211
|
#
|
|
201
212
|
# @param sheets [Array<Elements::Worksheet>]
|
|
@@ -203,6 +214,17 @@ module Xlsxrb
|
|
|
203
214
|
# @api private
|
|
204
215
|
# : (untyped sheets) -> Array[String]
|
|
205
216
|
def self.validate: (untyped sheets) -> Array[String]
|
|
217
|
+
|
|
218
|
+
private
|
|
219
|
+
|
|
220
|
+
# : (Hash[Symbol, untyped] updated) -> Hash[untyped, untyped]?
|
|
221
|
+
def strip_stale_unmapped_data: (Hash[Symbol, untyped] updated) -> Hash[untyped, untyped]?
|
|
222
|
+
|
|
223
|
+
# : (Array[untyped] new_sheets) -> Array[Elements::DefinedName]?
|
|
224
|
+
def sync_sheet_print_defined_names: (Array[untyped] new_sheets) -> Array[Elements::DefinedName]?
|
|
225
|
+
|
|
226
|
+
# : (Elements::DefinedName defined_name_entry, String target_name, Integer idx, String? old_name, String new_name) -> bool
|
|
227
|
+
def matches_sheet_print_dn?: (Elements::DefinedName defined_name_entry, String target_name, Integer idx, String? old_name, String new_name) -> bool
|
|
206
228
|
end
|
|
207
229
|
end
|
|
208
230
|
end
|
|
@@ -13,6 +13,8 @@ module Xlsxrb
|
|
|
13
13
|
class Listener
|
|
14
14
|
include REXML::SAX2Listener
|
|
15
15
|
|
|
16
|
+
WORKBOOK_PROTECTION_ATTRIBUTES: untyped
|
|
17
|
+
|
|
16
18
|
attr_reader sheets: untyped
|
|
17
19
|
|
|
18
20
|
attr_reader date1904: untyped
|
|
@@ -31,6 +33,8 @@ module Xlsxrb
|
|
|
31
33
|
|
|
32
34
|
attr_reader code_name: untyped
|
|
33
35
|
|
|
36
|
+
attr_reader workbook_protection: untyped
|
|
37
|
+
|
|
34
38
|
def initialize: () -> untyped
|
|
35
39
|
|
|
36
40
|
def start_element: (untyped _uri, untyped localname, untyped _qname, untyped attrs) -> untyped
|
|
@@ -41,23 +45,39 @@ module Xlsxrb
|
|
|
41
45
|
end
|
|
42
46
|
end
|
|
43
47
|
|
|
44
|
-
# Parses .rels files to build rId -> target
|
|
48
|
+
# Parses .rels files to build rId -> target, type, and entry mappings.
|
|
45
49
|
class RelationshipsParser
|
|
50
|
+
EMPTY_PARSED_RELS: untyped
|
|
51
|
+
|
|
52
|
+
# Parses a .rels XML part in one pass, returning targets, types, and entry hashes.
|
|
53
|
+
# : (String? xml_string) -> Hash[Symbol, untyped]
|
|
54
|
+
def self.parse_all: (String? xml_string) -> Hash[Symbol, untyped]
|
|
55
|
+
|
|
46
56
|
def self.parse: (untyped xml_string) -> untyped
|
|
47
57
|
|
|
48
58
|
# Parses .rels files to return array of relationship hashes with id, type, and target.
|
|
49
59
|
def self.parse_entries: (untyped xml_string) -> untyped
|
|
50
60
|
|
|
61
|
+
# : (String xml_string) -> String
|
|
62
|
+
def self.sanitize_xml_declarations: (String xml_string) -> String
|
|
63
|
+
|
|
51
64
|
# SAX listener for .rels relationship files.
|
|
52
65
|
class Listener
|
|
53
66
|
include REXML::SAX2Listener
|
|
54
67
|
|
|
55
68
|
attr_reader relationships: untyped
|
|
56
69
|
|
|
70
|
+
attr_reader types: untyped
|
|
71
|
+
|
|
72
|
+
attr_reader entries: untyped
|
|
73
|
+
|
|
57
74
|
def initialize: () -> untyped
|
|
58
75
|
|
|
59
76
|
def start_element: (untyped _uri, untyped localname, untyped _qname, untyped attrs) -> untyped
|
|
60
77
|
|
|
78
|
+
# : (String? rid, String? target, String? rel_type) -> void
|
|
79
|
+
def record: (String? rid, String? target, String? rel_type) -> void
|
|
80
|
+
|
|
61
81
|
def end_element: (untyped _uri, untyped _localname, untyped _qname) -> untyped
|
|
62
82
|
|
|
63
83
|
def characters: (untyped _text) -> untyped
|
|
@@ -101,6 +101,9 @@ module Xlsxrb
|
|
|
101
101
|
# : (String str) -> String
|
|
102
102
|
def self.normalize_text: (String str) -> String
|
|
103
103
|
|
|
104
|
+
# : (String str) -> String
|
|
105
|
+
def self.decode_text_with_cdata: (String str) -> String
|
|
106
|
+
|
|
104
107
|
# Parses <cols> section for column definitions.
|
|
105
108
|
class ColumnsListener
|
|
106
109
|
include REXML::SAX2Listener
|
|
@@ -129,9 +132,11 @@ module Xlsxrb
|
|
|
129
132
|
|
|
130
133
|
COL_MAP: untyped
|
|
131
134
|
|
|
135
|
+
FORMULA_TYPE_MAP: untyped
|
|
136
|
+
|
|
132
137
|
# Captures r, s, and t directly when they appear in the order Excel and xlsxrb write them
|
|
133
138
|
# (groups 1 to 3). Any other attribute set or order falls back to capturing the raw
|
|
134
|
-
# attribute string (group 4, or group
|
|
139
|
+
# attribute string (group 4, or group 9 for a self-closing cell) for ATTR_* lookups.
|
|
135
140
|
CELL_FAST_RE: ::Regexp
|
|
136
141
|
|
|
137
142
|
CELL_GENERIC_RE: ::Regexp
|
|
@@ -167,8 +172,21 @@ module Xlsxrb
|
|
|
167
172
|
|
|
168
173
|
def self.fast_parse_cells_direct: (untyped xml, untyped from, untyped to, untyped shared_strings, untyped row_source, ?untyped prefix) -> untyped
|
|
169
174
|
|
|
175
|
+
# Parses a `<f ...>` element with attributes into an `Elements::Formula`,
|
|
176
|
+
# registering or expanding shared formulas when `shared_formulas` is present.
|
|
177
|
+
# : (String f_attrs, String? raw_f, String? cell_ref, Hash[Integer, Hash[Symbol, untyped]]? shared_formulas) -> Elements::Formula?
|
|
178
|
+
def self.build_formula_from_attrs: (String f_attrs, String? raw_f, String? cell_ref, Hash[Integer, Hash[Symbol, untyped]]? shared_formulas) -> Elements::Formula?
|
|
179
|
+
|
|
180
|
+
# Records shared formula masters from a row slice before yielding StreamRow
|
|
181
|
+
# so forward-iterated or skipped rows still populate shared masters for later slaves.
|
|
182
|
+
# : (String xml, Integer from, Integer to, Hash[Integer, Hash[Symbol, untyped]] shared_formulas, Integer row_idx) -> void
|
|
183
|
+
def self.record_shared_masters: (String xml, Integer from, Integer to, Hash[Integer, Hash[Symbol, untyped]] shared_formulas, Integer row_idx) -> void
|
|
184
|
+
|
|
185
|
+
# : (String? ref, Integer col_idx) -> Integer
|
|
186
|
+
def self.resolve_cell_col_index: (String? ref, Integer col_idx) -> Integer
|
|
187
|
+
|
|
170
188
|
# rubocop:disable Style/OptionalBooleanParameter
|
|
171
|
-
def self.fast_scan_cells_direct: (untyped xml, untyped from, untyped to, untyped shared_strings, untyped row_source, ?untyped _prefix, ?untyped styles, ?untyped date1904) ?{ (?) -> untyped } -> untyped
|
|
189
|
+
def self.fast_scan_cells_direct: (untyped xml, untyped from, untyped to, untyped shared_strings, untyped row_source, ?untyped _prefix, ?untyped styles, ?untyped date1904, ?untyped shared_formulas) ?{ (?) -> untyped } -> untyped
|
|
172
190
|
|
|
173
191
|
# rubocop:disable Style/OptionalBooleanParameter
|
|
174
192
|
# : (String xml, Integer from, Integer to, Array[String | Elements::RichText | untyped] shared_strings, ?untyped styles, ?bool date1904, ?type_cast: bool) -> Array[untyped]
|
|
@@ -5,38 +5,102 @@ module Xlsxrb
|
|
|
5
5
|
class Writer
|
|
6
6
|
# Mixin containing DrawingML, Chart, Shape, Comment, and VML XML generation logic.
|
|
7
7
|
module DrawingXml
|
|
8
|
-
# : (untyped drawing_parts) ->
|
|
8
|
+
# : (untyped drawing_parts) -> ::String
|
|
9
9
|
def generate_drawing_xml: (untyped drawing_parts) -> untyped
|
|
10
10
|
|
|
11
|
-
# : (untyped
|
|
12
|
-
def
|
|
11
|
+
# : (untyped rels_data) -> ::String
|
|
12
|
+
def generate_drawing_rels: (untyped rels_data) -> untyped
|
|
13
13
|
|
|
14
|
-
# : (untyped
|
|
15
|
-
def
|
|
14
|
+
# : (untyped chart) -> ::String
|
|
15
|
+
def generate_chart_xml: (untyped chart) -> untyped
|
|
16
16
|
|
|
17
|
-
# : (untyped
|
|
18
|
-
def
|
|
17
|
+
# : (untyped sheet_comments) -> ::String
|
|
18
|
+
def generate_comments_xml: (untyped sheet_comments) -> untyped
|
|
19
19
|
|
|
20
|
-
# : (untyped
|
|
21
|
-
def
|
|
20
|
+
# : (untyped sheet_comments) -> ::String
|
|
21
|
+
def generate_vml_drawing_xml: (untyped sheet_comments) -> untyped
|
|
22
22
|
|
|
23
|
-
# : (untyped
|
|
24
|
-
def
|
|
23
|
+
# : (untyped cell_ref) -> (::Array[0] | ::Array[untyped])
|
|
24
|
+
def cell_to_col_row: (untyped cell_ref) -> untyped
|
|
25
|
+
|
|
26
|
+
THREADED_COMMENTS_NS: ::String
|
|
27
|
+
|
|
28
|
+
# Formats or generates a GUID in standard uppercase braced format {UUID}.
|
|
29
|
+
# : (?String? val) -> String
|
|
30
|
+
def format_guid: (?untyped val) -> untyped
|
|
31
|
+
|
|
32
|
+
# Generates XML for xl/threadedComments/threadedComment{N}.xml.
|
|
33
|
+
# : (Array[Hash[Symbol, untyped]] sheet_threaded_comments) -> String
|
|
34
|
+
def generate_threaded_comments_xml: (untyped sheet_threaded_comments) -> untyped
|
|
35
|
+
|
|
36
|
+
# Generates XML for xl/persons/person.xml.
|
|
37
|
+
# : (Array[Hash[Symbol, untyped]] persons) -> String
|
|
38
|
+
def generate_persons_xml: (untyped persons) -> untyped
|
|
39
|
+
|
|
40
|
+
private
|
|
41
|
+
|
|
42
|
+
# : (XmlBuilder xml, untyped part) -> void
|
|
43
|
+
def write_pic_anchor_xml: (untyped xml, untyped part) -> untyped
|
|
44
|
+
|
|
45
|
+
# : (XmlBuilder xml, untyped part) -> void
|
|
46
|
+
def write_chart_anchor_xml: (untyped xml, untyped part) -> untyped
|
|
47
|
+
|
|
48
|
+
# : (XmlBuilder xml, untyped part) -> void
|
|
49
|
+
def write_shape_anchor_xml: (untyped xml, untyped part) -> untyped
|
|
50
|
+
|
|
51
|
+
# : (XmlBuilder xml, untyped shape) -> void
|
|
52
|
+
def write_shape_fill_xml: (untyped xml, untyped shape) -> untyped
|
|
53
|
+
|
|
54
|
+
# : (XmlBuilder xml, untyped shape) -> void
|
|
55
|
+
def write_shape_line_xml: (untyped xml, untyped shape) -> untyped
|
|
56
|
+
|
|
57
|
+
# : (XmlBuilder xml, untyped line_join, untyped miter_limit) -> void
|
|
58
|
+
def write_line_join_xml: (untyped xml, untyped line_join, untyped miter_limit) -> untyped
|
|
59
|
+
|
|
60
|
+
# : (XmlBuilder xml, untyped source) -> void
|
|
61
|
+
def write_effect_lst_xml: (untyped xml, untyped source) -> untyped
|
|
62
|
+
|
|
63
|
+
# : (XmlBuilder xml, ::String tag, untyped spec, include_algn: bool) -> void
|
|
64
|
+
def write_shadow_xml: (untyped xml, untyped tag, untyped spec, include_algn: untyped) -> untyped
|
|
65
|
+
|
|
66
|
+
# : (XmlBuilder xml, untyped shape) -> void
|
|
67
|
+
def write_shape_text_body_xml: (untyped xml, untyped shape) -> untyped
|
|
68
|
+
|
|
69
|
+
# : (XmlBuilder xml, untyped autofit) -> void
|
|
70
|
+
def write_autofit_xml: (untyped xml, untyped autofit) -> untyped
|
|
71
|
+
|
|
72
|
+
# : (XmlBuilder xml, untyped para) -> void
|
|
73
|
+
def write_paragraph_xml: (untyped xml, untyped para) -> untyped
|
|
74
|
+
|
|
75
|
+
# : (untyped para) -> bool
|
|
76
|
+
def paragraph_ppr_has_children?: (untyped para) -> untyped
|
|
77
|
+
|
|
78
|
+
# : (XmlBuilder xml, untyped para) -> void
|
|
79
|
+
def write_paragraph_ppr_children_xml: (untyped xml, untyped para) -> untyped
|
|
25
80
|
|
|
26
|
-
# : (
|
|
27
|
-
def
|
|
81
|
+
# : (XmlBuilder xml, ::String tag, untyped font) -> void
|
|
82
|
+
def write_text_char_props_xml: (untyped xml, untyped tag, untyped font) -> untyped
|
|
83
|
+
|
|
84
|
+
# : (XmlBuilder xml, ::String tag, untyped col, untyped row, ?col_off: ::Integer, ?row_off: ::Integer) -> void
|
|
85
|
+
def write_anchor_xml: (untyped xml, untyped tag, untyped col, untyped row, ?col_off: untyped, ?row_off: untyped) -> untyped
|
|
86
|
+
|
|
87
|
+
# : (XmlBuilder xml, untyped obj) -> void
|
|
88
|
+
def write_client_data_xml: (untyped xml, untyped obj) -> untyped
|
|
89
|
+
|
|
90
|
+
# : (XmlBuilder xml, untyped title_spec, ?overlay: bool) -> void
|
|
91
|
+
def write_chart_title_xml: (untyped xml, untyped title_spec, ?overlay: untyped) -> untyped
|
|
28
92
|
|
|
29
93
|
# : (untyped title_spec, untyped chart, untyped prefix) -> untyped
|
|
30
94
|
def merge_flat_title_styling: (untyped title_spec, untyped chart, untyped prefix) -> untyped
|
|
31
95
|
|
|
32
|
-
# : (untyped spec) ->
|
|
33
|
-
def
|
|
96
|
+
# : (XmlBuilder xml, untyped spec) -> void
|
|
97
|
+
def write_title_sp_pr: (untyped xml, untyped spec) -> untyped
|
|
34
98
|
|
|
35
|
-
# : (untyped layout) ->
|
|
36
|
-
def
|
|
99
|
+
# : (XmlBuilder xml, untyped layout) -> void
|
|
100
|
+
def write_title_layout_xml: (untyped xml, untyped layout) -> untyped
|
|
37
101
|
|
|
38
|
-
# : (
|
|
39
|
-
def
|
|
102
|
+
# : (XmlBuilder xml, ::String tag, untyped spec) -> void
|
|
103
|
+
def write_gridlines_xml: (untyped xml, untyped tag, untyped spec) -> untyped
|
|
40
104
|
|
|
41
105
|
# Resolves a cell reference like "Sheet1!$A$1:$A$5" to an array of values from @sheets.
|
|
42
106
|
# : (untyped ref) -> (nil | untyped)
|
|
@@ -45,50 +109,101 @@ module Xlsxrb
|
|
|
45
109
|
# : (untyped start_cell, untyped end_cell) -> (::Array[untyped] | untyped)
|
|
46
110
|
def enumerate_cell_range: (untyped start_cell, untyped end_cell) -> untyped
|
|
47
111
|
|
|
48
|
-
# : (untyped ref) ->
|
|
49
|
-
def
|
|
112
|
+
# : (XmlBuilder xml, untyped ref) -> void
|
|
113
|
+
def write_num_cache_xml: (untyped xml, untyped ref) -> untyped
|
|
50
114
|
|
|
51
|
-
# : (untyped ref) ->
|
|
52
|
-
def
|
|
115
|
+
# : (XmlBuilder xml, untyped ref) -> void
|
|
116
|
+
def write_str_cache_xml: (untyped xml, untyped ref) -> untyped
|
|
53
117
|
|
|
54
|
-
# : (untyped color, ?alpha: untyped?, ?transforms: untyped?) ->
|
|
55
|
-
def
|
|
118
|
+
# : (XmlBuilder xml, untyped color, ?alpha: untyped?, ?transforms: untyped?) -> void
|
|
119
|
+
def write_drawing_color_xml: (untyped xml, untyped color, ?alpha: untyped, ?transforms: untyped) -> untyped
|
|
56
120
|
|
|
57
121
|
# : (untyped color) -> untyped
|
|
58
122
|
def normalize_drawing_rgb: (untyped color) -> untyped
|
|
59
123
|
|
|
60
|
-
|
|
124
|
+
# : (XmlBuilder xml, untyped rotation, untyped font) -> void
|
|
125
|
+
def write_axis_txpr: (untyped xml, untyped rotation, untyped font) -> untyped
|
|
61
126
|
|
|
62
|
-
# : (
|
|
63
|
-
def
|
|
127
|
+
# : (XmlBuilder xml, ax_id: ::Integer, prefix: ::Symbol, chart: untyped, ?default_pos: ::String, ?default_crosses: ::String?) -> void
|
|
128
|
+
def write_val_ax_xml: (untyped xml, ax_id: untyped, prefix: untyped, chart: untyped, ?default_pos: untyped, ?default_crosses: untyped) -> untyped
|
|
64
129
|
|
|
65
|
-
|
|
130
|
+
# : (XmlBuilder xml, untyped disp_units) -> void
|
|
131
|
+
def write_disp_units_xml: (untyped xml, untyped disp_units) -> untyped
|
|
66
132
|
|
|
67
|
-
# : (untyped chart) ->
|
|
68
|
-
def
|
|
133
|
+
# : (XmlBuilder xml, untyped chart) -> void
|
|
134
|
+
def write_chart_top_title_xml: (untyped xml, untyped chart) -> untyped
|
|
69
135
|
|
|
70
|
-
# : (untyped
|
|
71
|
-
def
|
|
136
|
+
# : (XmlBuilder xml, untyped v3d) -> void
|
|
137
|
+
def write_view_3d_xml: (untyped xml, untyped v3d) -> untyped
|
|
72
138
|
|
|
73
|
-
# : (untyped
|
|
74
|
-
def
|
|
139
|
+
# : (XmlBuilder xml, untyped chart) -> void
|
|
140
|
+
def write_chart_walls_xml: (untyped xml, untyped chart) -> untyped
|
|
75
141
|
|
|
76
|
-
# : (untyped
|
|
77
|
-
def
|
|
142
|
+
# : (XmlBuilder xml, untyped chart, ::String chart_type) -> void
|
|
143
|
+
def write_plot_area_xml: (untyped xml, untyped chart, untyped chart_type) -> untyped
|
|
78
144
|
|
|
79
|
-
|
|
145
|
+
# : (XmlBuilder xml, untyped layout, ?emit_empty: bool) -> void
|
|
146
|
+
def write_plot_area_layout_xml: (untyped xml, untyped layout, ?emit_empty: untyped) -> untyped
|
|
80
147
|
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
def format_guid: (?untyped val) -> untyped
|
|
148
|
+
# : (untyped all_series, ::String chart_type) -> ::Array[untyped]
|
|
149
|
+
def group_chart_series: (untyped all_series, untyped chart_type) -> untyped
|
|
84
150
|
|
|
85
|
-
#
|
|
86
|
-
|
|
87
|
-
def generate_threaded_comments_xml: (untyped sheet_threaded_comments) -> untyped
|
|
151
|
+
# : (XmlBuilder xml, untyped grp, untyped chart) -> void
|
|
152
|
+
def write_chart_group_xml: (untyped xml, untyped grp, untyped chart) -> untyped
|
|
88
153
|
|
|
89
|
-
#
|
|
90
|
-
|
|
91
|
-
|
|
154
|
+
# : (XmlBuilder xml, untyped ser, ::Integer idx, ::String g_type, untyped chart) -> void
|
|
155
|
+
def write_chart_series_xml: (untyped xml, untyped ser, untyped idx, untyped g_type, untyped chart) -> untyped
|
|
156
|
+
|
|
157
|
+
# : (XmlBuilder xml, untyped ser) -> void
|
|
158
|
+
def write_series_sp_pr_xml: (untyped xml, untyped ser) -> untyped
|
|
159
|
+
|
|
160
|
+
# : (XmlBuilder xml, untyped source) -> void
|
|
161
|
+
def write_marker_xml: (untyped xml, untyped source) -> untyped
|
|
162
|
+
|
|
163
|
+
# : (XmlBuilder xml, untyped data_point) -> void
|
|
164
|
+
def write_data_point_xml: (untyped xml, untyped data_point) -> untyped
|
|
165
|
+
|
|
166
|
+
# : (XmlBuilder xml, untyped data_labels) -> void
|
|
167
|
+
def write_data_labels_xml: (untyped xml, untyped data_labels) -> untyped
|
|
168
|
+
|
|
169
|
+
# : (XmlBuilder xml, untyped lbl) -> void
|
|
170
|
+
def write_data_label_flags_xml: (untyped xml, untyped lbl) -> untyped
|
|
171
|
+
|
|
172
|
+
# : (XmlBuilder xml, untyped trendline) -> void
|
|
173
|
+
def write_trendline_xml: (untyped xml, untyped trendline) -> untyped
|
|
174
|
+
|
|
175
|
+
# : (XmlBuilder xml, untyped err_bars) -> void
|
|
176
|
+
def write_error_bars_xml: (untyped xml, untyped err_bars) -> untyped
|
|
177
|
+
|
|
178
|
+
# : (XmlBuilder xml, untyped band_fmts) -> void
|
|
179
|
+
def write_band_fmts_xml: (untyped xml, untyped band_fmts) -> untyped
|
|
180
|
+
|
|
181
|
+
# : (XmlBuilder xml, untyped udb) -> void
|
|
182
|
+
def write_up_down_bars_xml: (untyped xml, untyped udb) -> untyped
|
|
183
|
+
|
|
184
|
+
# : (XmlBuilder xml, untyped chart, ::Array[untyped] groups, bool has_secondary) -> void
|
|
185
|
+
def write_chart_axes_xml: (untyped xml, untyped chart, untyped groups, untyped has_secondary) -> untyped
|
|
186
|
+
|
|
187
|
+
# : (XmlBuilder xml, untyped data_table) -> void
|
|
188
|
+
def write_chart_data_table_xml: (untyped xml, untyped data_table) -> untyped
|
|
189
|
+
|
|
190
|
+
# : (XmlBuilder xml, untyped legend) -> void
|
|
191
|
+
def write_chart_legend_xml: (untyped xml, untyped legend) -> untyped
|
|
192
|
+
|
|
193
|
+
# : (XmlBuilder xml, untyped print_settings) -> void
|
|
194
|
+
def write_chart_print_settings_xml: (untyped xml, untyped print_settings) -> untyped
|
|
195
|
+
|
|
196
|
+
# : (XmlBuilder xml, untyped hash) -> void
|
|
197
|
+
def write_simple_sp_pr_from_hash: (untyped xml, untyped hash) -> untyped
|
|
198
|
+
|
|
199
|
+
# : (XmlBuilder xml, ?fill_color: untyped?, ?no_fill: untyped?, ?line_color: untyped?, ?line_width: untyped?, ?line_dash: untyped?, ?emu: bool) -> void
|
|
200
|
+
def write_simple_sp_pr: (untyped xml, ?fill_color: untyped, ?no_fill: untyped, ?line_color: untyped, ?line_width: untyped, ?line_dash: untyped, ?emu: untyped) -> untyped
|
|
201
|
+
|
|
202
|
+
# : (XmlBuilder xml, ?line_color: untyped?, ?line_width: untyped?, ?line_dash: untyped?, ?emu: bool) -> void
|
|
203
|
+
def write_ln_xml: (untyped xml, ?line_color: untyped, ?line_width: untyped, ?line_dash: untyped, ?emu: untyped) -> untyped
|
|
204
|
+
|
|
205
|
+
# : (XmlBuilder xml, ::String tag, untyped spec) -> void
|
|
206
|
+
def write_line_sp_tag: (untyped xml, untyped tag, untyped spec) -> untyped
|
|
92
207
|
end
|
|
93
208
|
end
|
|
94
209
|
end
|
|
@@ -11,12 +11,9 @@ module Xlsxrb
|
|
|
11
11
|
# : (untyped pivot_table, untyped _cache_id) -> untyped
|
|
12
12
|
def generate_pivot_cache_definition_xml: (untyped pivot_table, untyped _cache_id) -> untyped
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
# : (Array[untyped] values) ->
|
|
16
|
-
def
|
|
17
|
-
|
|
18
|
-
# : (untyped value) -> String
|
|
19
|
-
def shared_item_xml: (untyped value) -> untyped
|
|
14
|
+
# Writes <sharedItems> and its typed children for a cache field.
|
|
15
|
+
# : (XmlBuilder xml, Array[untyped] values) -> void
|
|
16
|
+
def write_shared_items_xml: (untyped xml, untyped values) -> untyped
|
|
20
17
|
|
|
21
18
|
# : (untyped pivot_table) -> untyped
|
|
22
19
|
def generate_pivot_cache_records_xml: (untyped pivot_table) -> untyped
|
|
@@ -36,20 +33,14 @@ module Xlsxrb
|
|
|
36
33
|
# : (untyped ct_xml) -> untyped
|
|
37
34
|
def parse_extra_content_types: (untyped ct_xml) -> untyped
|
|
38
35
|
|
|
39
|
-
# : (untyped element, untyped opts) ->
|
|
40
|
-
def
|
|
41
|
-
|
|
42
|
-
# : (untyped value) -> untyped
|
|
43
|
-
# Escapes cell text: ST_Xstring (XmlBuilder.encode_xstring), then XML.
|
|
44
|
-
def xml_escape_text: (untyped value) -> untyped
|
|
45
|
-
|
|
46
|
-
def xml_escape: (untyped value) -> untyped
|
|
36
|
+
# : (XmlBuilder xml, untyped element, untyped opts) -> void
|
|
37
|
+
def write_line_end_xml: (untyped xml, untyped element, untyped opts) -> untyped
|
|
47
38
|
|
|
48
|
-
# : (untyped rich_text) ->
|
|
49
|
-
def
|
|
39
|
+
# : (XmlBuilder xml, untyped rich_text) -> void
|
|
40
|
+
def write_rich_text_xml: (untyped xml, untyped rich_text) -> untyped
|
|
50
41
|
|
|
51
|
-
# : (untyped cell_ref, untyped value, untyped style_idx, ?untyped? sst, ?ph: untyped?) ->
|
|
52
|
-
def
|
|
42
|
+
# : (XmlBuilder xml, untyped cell_ref, untyped value, untyped style_idx, ?untyped? sst, ?ph: untyped?) -> void
|
|
43
|
+
def write_cell_xml: (untyped xml, untyped cell_ref, untyped value, untyped style_idx, ?untyped sst, ?ph: untyped) -> untyped
|
|
53
44
|
|
|
54
45
|
# Returns the numFmtId for dates, registering it on first use.
|
|
55
46
|
# : () -> untyped
|
|
@@ -63,15 +54,15 @@ module Xlsxrb
|
|
|
63
54
|
# : (untyped style_value) -> (nil | untyped)
|
|
64
55
|
def resolve_style_index: (untyped style_value) -> untyped
|
|
65
56
|
|
|
66
|
-
# : (untyped filter) ->
|
|
67
|
-
def
|
|
57
|
+
# : (XmlBuilder xml, untyped filter) -> void
|
|
58
|
+
def write_filter_xml: (untyped xml, untyped filter) -> untyped
|
|
68
59
|
|
|
69
|
-
# : (
|
|
70
|
-
def
|
|
60
|
+
# : (XmlBuilder xml, untyped rule) -> void
|
|
61
|
+
def write_cf_rule: (untyped xml, untyped rule) -> untyped
|
|
71
62
|
|
|
72
63
|
# Emits a <color> element for CF rules, accepting either a plain RGB string or a hash.
|
|
73
|
-
# : (untyped color) ->
|
|
74
|
-
def
|
|
64
|
+
# : (XmlBuilder xml, untyped color) -> void
|
|
65
|
+
def write_cf_color_xml: (untyped xml, untyped color) -> untyped
|
|
75
66
|
|
|
76
67
|
# : (untyped sheet_cells) -> ("A1" | ::String)
|
|
77
68
|
def compute_dimension: (untyped sheet_cells) -> untyped
|
|
@@ -87,6 +78,11 @@ module Xlsxrb
|
|
|
87
78
|
|
|
88
79
|
# : () -> untyped
|
|
89
80
|
def generate_custom_properties_xml: () -> untyped
|
|
81
|
+
|
|
82
|
+
private
|
|
83
|
+
|
|
84
|
+
# : (untyped val) -> (nil | ::Integer)
|
|
85
|
+
def xml_bool_attr: (untyped val) -> untyped
|
|
90
86
|
end
|
|
91
87
|
end
|
|
92
88
|
end
|
|
@@ -8,38 +8,38 @@ module Xlsxrb
|
|
|
8
8
|
# : () -> untyped
|
|
9
9
|
def generate_styles_xml: () -> untyped
|
|
10
10
|
|
|
11
|
-
# : (untyped alignment) ->
|
|
12
|
-
def
|
|
11
|
+
# : (XmlBuilder xml, untyped alignment) -> void
|
|
12
|
+
def write_alignment_xml: (untyped xml, untyped alignment) -> untyped
|
|
13
13
|
|
|
14
|
-
# : (untyped protection) ->
|
|
15
|
-
def
|
|
14
|
+
# : (XmlBuilder xml, untyped protection) -> void
|
|
15
|
+
def write_protection_xml: (untyped xml, untyped protection) -> untyped
|
|
16
16
|
|
|
17
17
|
# : (untyped rgb) -> ::String?
|
|
18
18
|
def format_rgb_hex: (untyped rgb) -> untyped
|
|
19
19
|
|
|
20
|
-
# : (untyped source, ?tag: ::String) ->
|
|
21
|
-
def
|
|
20
|
+
# : (XmlBuilder xml, untyped source, ?tag: ::String) -> void
|
|
21
|
+
def write_color_xml: (untyped xml, untyped source, ?tag: untyped) -> untyped
|
|
22
22
|
|
|
23
|
-
# : (untyped font) ->
|
|
24
|
-
def
|
|
23
|
+
# : (XmlBuilder xml, untyped font) -> void
|
|
24
|
+
def write_font_xml: (untyped xml, untyped font) -> untyped
|
|
25
25
|
|
|
26
|
-
# : (untyped fill) ->
|
|
27
|
-
def
|
|
26
|
+
# : (XmlBuilder xml, untyped fill) -> void
|
|
27
|
+
def write_fill_xml: (untyped xml, untyped fill) -> untyped
|
|
28
28
|
|
|
29
|
-
# : (untyped tag, untyped fill, untyped prefix) ->
|
|
30
|
-
def
|
|
29
|
+
# : (XmlBuilder xml, untyped tag, untyped fill, untyped prefix) -> void
|
|
30
|
+
def write_fill_color_xml: (untyped xml, untyped tag, untyped fill, untyped prefix) -> untyped
|
|
31
31
|
|
|
32
|
-
# : (untyped gradient) ->
|
|
33
|
-
def
|
|
32
|
+
# : (XmlBuilder xml, untyped gradient) -> void
|
|
33
|
+
def write_gradient_fill_xml: (untyped xml, untyped gradient) -> untyped
|
|
34
34
|
|
|
35
|
-
# : (untyped brk, default_max: untyped) ->
|
|
36
|
-
def
|
|
35
|
+
# : (XmlBuilder xml, untyped brk, default_max: untyped) -> void
|
|
36
|
+
def write_brk_xml: (untyped xml, untyped brk, default_max: untyped) -> untyped
|
|
37
37
|
|
|
38
|
-
# : (untyped bdr) ->
|
|
39
|
-
def
|
|
38
|
+
# : (XmlBuilder xml, untyped bdr) -> void
|
|
39
|
+
def write_border_xml: (untyped xml, untyped bdr) -> untyped
|
|
40
40
|
|
|
41
|
-
# : (untyped dxf) ->
|
|
42
|
-
def
|
|
41
|
+
# : (XmlBuilder xml, untyped dxf) -> void
|
|
42
|
+
def write_dxf_xml: (untyped xml, untyped dxf) -> untyped
|
|
43
43
|
|
|
44
44
|
# : (untyped cell_address) -> untyped
|
|
45
45
|
def validate_cell_address!: (untyped cell_address) -> untyped
|