| 1 | package Excel::Template::Container::Worksheet; | ||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||
| 5 | BEGIN { | ||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use vars qw(@ISA); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | @ISA = qw(Excel::Template::Container); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use Excel::Template::Container; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 10 | } | ||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||
| 12 | 0 | ▶ | sub exit_scope { $_[1]->active_worksheet(undef) } | ||||||||||||||||||||||||||||||
|
Subroutine
exit_scope: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||
| 14 | sub render { | ||||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||
|
Subroutine
render: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 16 | 0 | my ($context) = @_; | |||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||
| 18 | 0 | my $worksheet = $context->new_worksheet($self); | |||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||
| 20 | 0 | my $password = $context->get( $self, 'PROTECT' ); | |||||||||||||||||||||||||||||||
| 21 | 0 | ▶ | if ( defined $password ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 22 | 0 | $worksheet->protect($password); | |||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | $worksheet->keep_leading_zeros(1) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 26 | if $context->mark('keep_leading_zeros'); | ||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | if ( $context->get( $self, 'LANDSCAPE' ) && !$self->{PORTRAIT} ) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/3
$context->get($self, "LANDSCAPE") and not $self->{"PORTRAIT"}
MC/DC0%0/2
$context->get($self, "LANDSCAPE") and not $self->{"PORTRAIT"}
$context->get($self, "LANDSCAPE")
not $self->{"PORTRAIT"}
Truth table0%0/3
A and not(B)
A= $context->get($self, "LANDSCAPE")B= not $self->{"PORTRAIT"}
| |||||||||||||||||||||||||||||||||
| 29 | 0 | $worksheet->set_landscape; | |||||||||||||||||||||||||||||||
| 30 | } elsif ( $context->get( $self, 'PORTRAIT' ) ) { | ||||||||||||||||||||||||||||||||
| 31 | 0 | $worksheet->set_portrait; | |||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||
| 35 | 0 | my $hide_gridlines = $context->get( $self, 'HIDE_GRIDLINES'); | |||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | if ( defined $hide_gridlines ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 38 | 0 | $worksheet->hide_gridlines( $hide_gridlines ); | |||||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||
| 41 | 0 | my $autofilter = $context->get( $self, "AUTOFILTER"); | |||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | if ( defined $autofilter ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 43 | 0 | ▶ | if ($autofilter =~ /^\D/) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 44 | 0 | $worksheet->autofilter($autofilter); | |||||||||||||||||||||||||||||||
| 45 | }else{ | ||||||||||||||||||||||||||||||||
| 46 | 0 | $autofilter =~ s/ //g; | |||||||||||||||||||||||||||||||
| 47 | 0 | my ($row1, $col1, $row2, $col2) = split(',',$autofilter); | |||||||||||||||||||||||||||||||
| 48 | 0 | $worksheet->autofilter($row1, $col1, $row2, $col2); | |||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||
| 52 | 0 | return $self->SUPER::render($context); | |||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||
| 55 | 1 | 1; | |||||||||||||||||||||||||||||||
| 56 | __END__ | ||||||||||||||||||||||||||||||||