Commit | Line | Data |
d0eafc11 |
1 | package Excel::Template::Container::Format; |
2 | |
3 | use strict; |
4 | |
5 | BEGIN { |
6 | use vars qw(@ISA); |
7 | @ISA = qw( Excel::Template::Container ); |
8 | |
9 | use Excel::Template::Container; |
10 | } |
11 | |
12 | use Excel::Template::Format; |
13 | |
14 | sub render |
15 | { |
16 | my $self = shift; |
17 | my ($context) = @_; |
18 | |
19 | my $old_format = $context->active_format; |
20 | my $format = Excel::Template::Format->copy( |
21 | $context, $old_format, |
22 | |
23 | %{$self}, |
24 | ); |
25 | $context->active_format($format); |
26 | |
27 | my $child_success = $self->iterate_over_children($context); |
28 | |
29 | $context->active_format($old_format); |
30 | } |
31 | |
32 | 1; |
33 | __END__ |
34 | |
35 | =head1 NAME |
36 | |
37 | Excel::Template::Container::Format - Excel::Template::Container::Format |
38 | |
39 | =head1 PURPOSE |
40 | |
41 | To format all children according to the parameters |
42 | |
43 | =head1 NODE NAME |
44 | |
45 | FORMAT |
46 | |
47 | =head1 INHERITANCE |
48 | |
49 | Excel::Template::Container |
50 | |
51 | =head1 ATTRIBUTES |
52 | |
53 | =over 4 |
54 | |
55 | =item * bold |
56 | |
57 | This will set bold to on or off, depending on the boolean value. |
58 | |
59 | =item * hidden |
60 | |
61 | This will set whether the cell is hidden to on or off, depending on the boolean |
62 | value. (q.v. BOLD tag) |
63 | |
64 | =item * italic |
65 | |
66 | This will set italic to on or off, depending on the boolean value. (q.v. ITALIC |
67 | tag) |
68 | |
69 | =item * font_outline |
70 | |
71 | This will set font_outline to on or off, depending on the boolean value. (q.v. |
72 | OUTLINE tag) |
73 | |
74 | =item * font_shadow |
75 | |
76 | This will set font_shadow to on or off, depending on the boolean value. (q.v. |
77 | SHADOW tag) |
78 | |
79 | =item * font_strikeout |
80 | |
81 | This will set font_strikeout to on or off, depending on the boolean value. (q.v. |
82 | STRIKEOUT tag) |
83 | |
84 | =back 4 |
85 | |
86 | =head1 CHILDREN |
87 | |
88 | None |
89 | |
90 | =head1 EFFECTS |
91 | |
92 | None |
93 | |
94 | =head1 DEPENDENCIES |
95 | |
96 | None |
97 | |
98 | =head1 USAGE |
99 | |
100 | <format bold="1"> |
101 | ... Children here |
102 | </format> |
103 | |
104 | In the above example, the children will be displayed (if they are displaying |
105 | elements) in a bold format. All other formatting will remain the same and the |
106 | "bold"-ness will end at the end tag. |
107 | |
108 | =head1 AUTHOR |
109 | |
110 | Rob Kinyon (rkinyon@columbus.rr.com) |
111 | |
112 | =head1 SEE ALSO |
113 | |
114 | BOLD, HIDDEN, ITALIC, OUTLINE, SHADOW, STRIKEOUT |
115 | |
116 | =cut |