line |
true |
false |
branch |
47
|
0 |
97 |
if (not $format) { } |
|
66 |
31 |
elsif ($format eq 'string') { } |
|
31 |
0 |
elsif ($format eq 'date') { } |
|
0 |
0 |
elsif ($format eq 'integer') { } |
|
0 |
0 |
elsif ($format eq 'real') { } |
|
0 |
0 |
elsif ($format eq 'boolean') { } |
|
0 |
0 |
elsif ($format eq 'name') { } |
53
|
0 |
31 |
unless $$valPtr =~ /^\d{4}/ |
55
|
0 |
0 |
unless &Image::ExifTool::IsInt($$valPtr) |
57
|
0 |
0 |
unless $$valPtr =~ /^[+-]?(?=\d|\.\d)\d*(\.\d*)?$/ |
59
|
0 |
0 |
$$valPtr && !($$valPtr =~ /^f/i) ? : |
61
|
0 |
0 |
if $$valPtr =~ /\0/ |
76
|
0 |
13 |
if (not $format) { } |
|
11 |
2 |
elsif ($format eq 'string') { } |
|
2 |
0 |
elsif ($format eq 'date') { } |
|
0 |
0 |
elsif ($format =~ /^(integer|real|boolean)$/) { } |
|
0 |
0 |
elsif ($format eq 'name') { } |
80
|
0 |
11 |
if $val =~ /[\x80-\xff]/ |
91
|
0 |
0 |
if $val =~ /\0/ |
92
|
0 |
0 |
if ($pdfVer >= 1.2) { } |
95
|
0 |
0 |
if $val =~ m([\t\n\f\r ()<>[\]{}/%]) |
111
|
0 |
13 |
if (ref $$strPt eq "ARRAY") |
120
|
0 |
13 |
if ($$strPt =~ /[\x00-\x08\x0a-\x1f\x7f\xff]/) { } |
126
|
0 |
0 |
unless my $n = $len - $i |
127
|
0 |
0 |
if $n > 40 |
128
|
0 |
0 |
if $i |
147
|
0 |
0 |
if (not ref $obj) { } |
|
0 |
0 |
elsif (ref $obj eq 'HASH') { } |
|
0 |
0 |
elsif (ref $obj eq 'ARRAY') { } |
149
|
0 |
0 |
if ($obj =~ /^[(<]/) |
159
|
0 |
0 |
if $myDictTags{$tag} |
165
|
0 |
0 |
if ($needCrypt) |
166
|
0 |
0 |
defined $needCrypt->{$tag} ? : |
|
0 |
0 |
unless defined $needCrypt->{$tag} ? $needCrypt->{$tag} : $needCrypt->{'*'} |
190
|
0 |
0 |
if (ref $w eq "ARRAY" and join($", @$w) eq "1 4 2") |
202
|
0 |
0 |
if $pos + $size > $len |
205
|
0 |
0 |
if $t[0] == 0 |
221
|
43 |
165 |
if (ref $obj eq 'SCALAR') { } |
|
12 |
153 |
elsif (ref $obj eq 'ARRAY') { } |
|
47 |
106 |
elsif (ref $obj eq 'HASH') { } |
222
|
0 |
43 |
unless &Write($outfile, " ", $$obj) |
225
|
0 |
12 |
@$obj > 10 ? : |
|
0 |
12 |
unless &Write($outfile, @$obj > 10 ? $/ : " ", "[") |
228
|
0 |
22 |
unless &WriteObject($outfile, $item) |
230
|
0 |
12 |
unless &Write($outfile, " ]") |
234
|
0 |
47 |
unless &Write($outfile, $/, "<<") |
236
|
9 |
38 |
if ($obj->{'_stream'}) |
238
|
9 |
0 |
if $obj->{'_decrypted'} |
252
|
200 |
139 |
if $wrote{$tag} or not defined $obj->{$tag} |
253
|
0 |
139 |
unless &Write($outfile, $/, "/$tag") |
254
|
0 |
139 |
unless &WriteObject($outfile, $obj->{$tag}) |
257
|
0 |
47 |
unless &Write($outfile, $/, ">>") |
258
|
9 |
38 |
if ($obj->{'_stream'}) |
261
|
0 |
9 |
unless &Write($outfile, $/, "stream\r\n") |
262
|
0 |
9 |
unless &Write($outfile, $obj->{'_stream'}, $/, "endstream") |
287
|
0 |
19 |
unless $raf->Read($buff, 1024) >= 8 |
288
|
0 |
19 |
unless $buff =~ /^(\s*)%PDF-(\d+\.\d+)/ |
304
|
0 |
19 |
unless $pdfVer |
306
|
0 |
19 |
if ($pdfVer > "1.7") |
311
|
0 |
19 |
if ($capture{'Error'} or $info->{'Error'}) |
317
|
57 |
0 |
if $capture{$obj} |
319
|
0 |
0 |
if $info->{'Warning'} |
327
|
0 |
19 |
unless $raf->Seek(-64, 2) and $raf->Read($buff, 64) and $raf->Seek(0, 0) |
331
|
16 |
3 |
if ($buff =~ /$endComment(\d+)\s+(startxref\s+\d+\s+%%EOF\s+)?$/s) { } |
|
0 |
3 |
elsif ($et->{'DEL_GROUP'}{'PDF-update'}) { } |
334
|
0 |
16 |
unless &Image::ExifTool::CopyBlock($raf, $outfile, $prevUpdate + $et->{'PDFBase'}) |
336
|
0 |
16 |
unless ($raf->Read($buff, length $beginComment) and $buff eq $beginComment) |
340
|
0 |
16 |
unless $raf->Seek($prevUpdate + $et->{'PDFBase'}, 0) |
341
|
2 |
14 |
if ($et->{'DEL_GROUP'}{'PDF-update'}) |
352
|
0 |
3 |
unless &Write($outfile, $buff) |
355
|
0 |
17 |
if $et->Options("Verbose") |
367
|
14 |
3 |
if ($prevUpdate) { } |
368
|
0 |
14 |
unless ($capture{'Prev'}) |
377
|
5 |
4 |
if $metaRef and $$metaRef =~ /^(\d+)/ and $1 >= $nextObject |
385
|
4 |
1 |
if ($et->{'DEL_GROUP'}{'PDF'} and $capture{'Info'}) |
388
|
0 |
4 |
if $out |
393
|
10 |
7 |
unless $capture{'Info'} |
401
|
0 |
17 |
if $infoDict->{'_needCrypt'} |
416
|
9 |
2 |
unless (defined $val) |
419
|
5 |
4 |
if $tagKey |
421
|
7 |
4 |
if (defined $val) { } |
|
0 |
4 |
elsif ($nvHash->{'EditOnly'}) { } |
423
|
3 |
4 |
if (ref $val eq "ARRAY") |
428
|
5 |
6 |
if ($et->IsOverwriting($nvHash, $val) > 0) { } |
435
|
7 |
4 |
unless @oldVals |
439
|
3 |
4 |
unless @vals |
445
|
0 |
6 |
unless $deleted or $tagInfo->{'List'} or not exists $infoDict->{$tagID} |
449
|
9 |
2 |
if (@newVals) |
452
|
0 |
9 |
if ($out) |
458
|
0 |
11 |
unless (@vals) |
465
|
5 |
6 |
if (not $tagInfo->{'List'}) { } |
|
3 |
3 |
elsif ($tagInfo->{'List'} eq 'array') { } |
470
|
0 |
5 |
unless defined $val |
472
|
3 |
0 |
@vals ? : |
476
|
11 |
0 |
if (defined $val) { } |
483
|
10 |
7 |
if ($infoChanged) { } |
|
6 |
1 |
elsif ($prevUpdate) { } |
488
|
4 |
2 |
if $oldPos and $oldPos > $prevUpdate |
492
|
14 |
3 |
if ($infoChanged) |
494
|
10 |
4 |
if (scalar keys %{$capture{'Info'};} > 1) { } |
497
|
3 |
7 |
unless $prevInfoRef |
502
|
2 |
2 |
if $prevInfoRef |
514
|
4 |
2 |
$info->{'XMP'} ? : |
|
6 |
11 |
unless defined $newXMP |
518
|
3 |
5 |
unless ($newXMP or $info->{'XMP'}) |
524
|
10 |
7 |
if ($et->{'CHANGED'} != $oldChanged and defined $newXMP) { } |
|
4 |
3 |
elsif ($prevUpdate and $capture{'Root'}{'Metadata'}) { } |
529
|
4 |
0 |
if $oldPos and $oldPos > $prevUpdate |
531
|
14 |
3 |
if ($metaChanged) |
532
|
9 |
5 |
if ($newXMP) { } |
|
5 |
0 |
elsif ($capture{'Root'}{'Metadata'}) { } |
533
|
5 |
4 |
unless ($metaRef) |
558
|
0 |
17 |
unless ($rootRef) |
562
|
6 |
11 |
if (not $rootChanged and $prevUpdate) |
565
|
3 |
3 |
if $oldPos and $oldPos > $prevUpdate |
567
|
13 |
4 |
if $rootChanged |
571
|
16 |
1 |
if ($et->{'CHANGED'}) { } |
|
1 |
0 |
elsif ($prevUpdate) { } |
574
|
0 |
16 |
unless &Write($outfile, $beginComment) |
578
|
0 |
38 |
unless $objRef =~ /^(\d+) (\d+)/ |
580
|
7 |
31 |
unless ($newObj{$objRef}) |
581
|
7 |
0 |
if $gen < 65535 |
589
|
0 |
31 |
unless &Write($outfile, $/, $keyExt) |
590
|
0 |
31 |
unless &WriteObject($outfile, $newObj{$objRef}) |
591
|
0 |
31 |
unless &Write($outfile, $/, "endobj") |
595
|
3 |
13 |
unless $prevUpdate |
601
|
13 |
3 |
if ($prevUpdate) |
604
|
0 |
13 |
if ($mainDict->{'Type'} and $mainDict->{'Type'} eq '/XRef') { } |
611
|
5 |
14 |
unless $newXRef{$id} |
618
|
31 |
28 |
unless $newXRef{$id}[2] eq "f" |
621
|
3 |
25 |
if ($id >= $nextObject) |
632
|
6 |
10 |
if (ref $mainDict->{'ID'} eq "ARRAY" and @{$mainDict->{'ID'};} > 1) |
635
|
6 |
0 |
if ($id =~ /^<([0-9a-f]{2})/i) { } |
|
0 |
0 |
elsif ($id =~ /^\((.)/s and $1 ne '\\' and $1 ne ')' and $1 ne '(') { } |
641
|
0 |
0 |
if $ch =~ /[()\\\x00-\x08\x0a-\x1f\x7f\xff]/ |
651
|
0 |
16 |
if ($mainDict->{'Type'} and $mainDict->{'Type'} eq '/XRef') { } |
666
|
0 |
0 |
if ($pos > 4294967295) |
670
|
0 |
0 |
$type eq 'f' ? : |
671
|
0 |
0 |
if not @ids or $ids[0] != $id + 1 |
678
|
0 |
0 |
unless &Write($outfile, $/, $keyExt) |
679
|
0 |
0 |
unless &WriteObject($outfile, $mainDict) |
680
|
0 |
0 |
unless &Write($outfile, $/, "endobj") |
685
|
0 |
16 |
unless &Write($outfile, $/, "xref", $/) |
687
|
16 |
0 |
length $/ == 1 ? : |
695
|
34 |
22 |
if not @ids or $ids[0] != $id + 1 |
698
|
0 |
34 |
unless &Write($outfile, $startID, " ", $id - $startID + 1, $/, $buff) |
702
|
0 |
16 |
unless &Write($outfile, "trailer") |
703
|
0 |
16 |
unless &WriteObject($outfile, $mainDict) |
706
|
0 |
16 |
unless &Write($outfile, $/, $endComment, $oldEOF, $/) |
709
|
0 |
16 |
unless &Write($outfile, "startxref", $/, $startxref, $/, "%%EOF", $/) |
714
|
0 |
1 |
unless $raf->Seek($prevUpdate + $et->{'PDFBase'}, 0) |
716
|
0 |
1 |
unless &Write($outfile, $buff) |
719
|
6 |
10 |
if ($rtn > 0 and $et->{'CHANGED'} and $et->{'DEL_GROUP'}{'PDF'} || $et->{'DEL_GROUP'}{'XMP'}) |