line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finnigan::OLE2Property; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
80
|
|
4
|
2
|
|
|
2
|
|
12
|
use warnings FATAL => qw( all ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
94
|
|
5
|
|
|
|
|
|
|
our $VERSION = 0.0206; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
12
|
use Finnigan; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
50
|
|
8
|
2
|
|
|
2
|
|
10
|
use base 'Finnigan::Decoder'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
173
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
12
|
use overload ('""' => 'name'); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
18
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub decode { |
13
|
5
|
|
|
5
|
1
|
9
|
my ($class, $stream, $param) = @_; |
14
|
5
|
|
|
|
|
9
|
my ($bb_log, $charset) = @$param; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# do a null read to initialize internal variables |
17
|
5
|
|
|
|
|
18
|
my $self = Finnigan::Decoder->read($stream, []); |
18
|
5
|
|
|
|
|
13
|
bless $self, $class; |
19
|
|
|
|
|
|
|
|
20
|
5
|
|
|
|
|
56
|
my $fields = [ |
21
|
|
|
|
|
|
|
"name" => ['string', 'UTF-16-LE:64'], |
22
|
|
|
|
|
|
|
"namelen" => ['v', 'UInt16'], |
23
|
|
|
|
|
|
|
"type" => ['c', 'UInt8'], |
24
|
|
|
|
|
|
|
"decorator" => ['c', 'UInt8'], |
25
|
|
|
|
|
|
|
"left" => ['V', 'UInt32'], |
26
|
|
|
|
|
|
|
"right" => ['V', 'UInt32'], |
27
|
|
|
|
|
|
|
"child" => ['V', 'UInt32'], # child node (valid for storage and root types) |
28
|
|
|
|
|
|
|
"clsid" => ['a16', 'RawBytes'], # CLSID of this storage (valid for storage and root types) |
29
|
|
|
|
|
|
|
"flags" => ['a4', 'RawBytes'], # user flags |
30
|
|
|
|
|
|
|
"create time" => ['windows_time', 'TimestampWin64'], |
31
|
|
|
|
|
|
|
"mod time" => ['windows_time', 'TimestampWin64'], |
32
|
|
|
|
|
|
|
"start" => ['V', 'UInt32'], # starting index of the stream (valid for stream and root types) |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
5
|
50
|
|
|
|
19
|
if ( $bb_log == 9 ) { |
36
|
5
|
|
|
|
|
19
|
push @$fields, ( |
37
|
|
|
|
|
|
|
"data size" => ['V', 'UInt32'], # size in bytes (valid for stream and root types) |
38
|
|
|
|
|
|
|
"padding" => ['a4', 'RawBytes'], |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
else { |
42
|
0
|
|
|
|
|
0
|
die "small block streams and Uint64 stream size are not implemented"; |
43
|
0
|
|
|
|
|
0
|
push @$fields, ( |
44
|
|
|
|
|
|
|
"data size" => ['*', 'UInt64'], # size in bytes (valid for stream and root types) |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
5
|
|
|
|
|
21
|
$self->SUPER::decode($stream, $fields); |
49
|
|
|
|
|
|
|
|
50
|
5
|
|
|
|
|
30
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub name { |
54
|
7
|
|
|
7
|
1
|
41
|
shift->{data}->{name}->{value}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub data_size { |
58
|
5
|
|
|
5
|
1
|
21
|
shift->{data}->{"data size"}->{value}; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub child { |
62
|
19
|
|
|
19
|
1
|
56
|
shift->{data}->{child}->{value}; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub left { |
66
|
14
|
|
|
14
|
1
|
44
|
shift->{data}->{left}->{value}; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub right { |
70
|
14
|
|
|
14
|
1
|
43
|
shift->{data}->{right}->{value}; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub start { |
74
|
5
|
|
|
5
|
1
|
19
|
shift->{data}->{start}->{value}; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub type { |
78
|
5
|
|
|
5
|
1
|
24
|
shift->{data}->{type}->{value}; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |
82
|
|
|
|
|
|
|
__END__ |