blob: 2e64d9a31e1031cd05d238bde59f23492fa5ddb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# frozen_string_literal: true
module Axlsx
# an element of style that belongs to a table style.
# @note tables and table styles are not supported in this version. This class exists in preparation for that support.
class TableStyleElement
include Axlsx::OptionsParser
include Axlsx::SerializedAttributes
# creates a new TableStyleElement object
# @option options [Symbol] type
# @option options [Integer] size
# @option options [Integer] dxfId
def initialize(options = {})
parse_options options
end
serializable_attributes :type, :size, :dxfId
# The type of style element. The following type are allowed
# :wholeTable
# :headerRow
# :totalRow
# :firstColumn
# :lastColumn
# :firstRowStripe
# :secondRowStripe
# :firstColumnStripe
# :secondColumnStripe
# :firstHeaderCell
# :lastHeaderCell
# :firstTotalCell
# :lastTotalCell
# :firstSubtotalColumn
# :secondSubtotalColumn
# :thirdSubtotalColumn
# :firstSubtotalRow
# :secondSubtotalRow
# :thirdSubtotalRow
# :blankRow
# :firstColumnSubheading
# :secondColumnSubheading
# :thirdColumnSubheading
# :firstRowSubheading
# :secondRowSubheading
# :thirdRowSubheading
# :pageFieldLabels
# :pageFieldValues
# @return [Symbol]
attr_reader :type
# Number of rows or columns used in striping when the type is firstRowStripe, secondRowStripe, firstColumnStripe, or secondColumnStripe.
# @return [Integer]
attr_reader :size
# The dxfId this style element points to
# @return [Integer]
attr_reader :dxfId
# @see type
def type=(v) Axlsx::validate_table_element_type v; @type = v end
# @see size
def size=(v) Axlsx::validate_unsigned_int v; @size = v end
# @see dxfId
def dxfId=(v) Axlsx::validate_unsigned_int v; @dxfId = v end
# Serializes the object
# @param [String] str
# @return [String]
def to_xml_string(str = +'')
serialized_tag('tableStyleElement', str)
end
end
end
|