Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/removefile.pm |
Statements | Executed 2670 statements in 4.80ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 3.72ms | 5.10ms | create_removefile_table | installer::windows::removefile::
1 | 1 | 1 | 376µs | 380µs | BEGIN@30 | installer::windows::removefile::
2 | 1 | 1 | 19µs | 19µs | get_removefile_filekey | installer::windows::removefile::
1 | 1 | 1 | 16µs | 18µs | BEGIN@32 | installer::windows::removefile::
1 | 1 | 1 | 14µs | 16µs | BEGIN@31 | installer::windows::removefile::
2 | 1 | 1 | 11µs | 11µs | get_removefile_component | installer::windows::removefile::
2 | 1 | 1 | 10µs | 10µs | get_removefile_dirproperty | installer::windows::removefile::
2 | 1 | 1 | 9µs | 9µs | get_removefile_filename | installer::windows::removefile::
1 | 1 | 1 | 6µs | 6µs | get_removefile_installmode | installer::windows::removefile::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | #************************************************************************* | ||||
2 | # | ||||
3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||||
4 | # | ||||
5 | # Copyright 2000, 2010 Oracle and/or its affiliates. | ||||
6 | # | ||||
7 | # OpenOffice.org - a multi-platform office productivity suite | ||||
8 | # | ||||
9 | # This file is part of OpenOffice.org. | ||||
10 | # | ||||
11 | # OpenOffice.org is free software: you can redistribute it and/or modify | ||||
12 | # it under the terms of the GNU Lesser General Public License version 3 | ||||
13 | # only, as published by the Free Software Foundation. | ||||
14 | # | ||||
15 | # OpenOffice.org is distributed in the hope that it will be useful, | ||||
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
18 | # GNU Lesser General Public License version 3 for more details | ||||
19 | # (a copy is included in the LICENSE file that accompanied this code). | ||||
20 | # | ||||
21 | # You should have received a copy of the GNU Lesser General Public License | ||||
22 | # version 3 along with OpenOffice.org. If not, see | ||||
23 | # <http://www.openoffice.org/license.html> | ||||
24 | # for a copy of the LGPLv3 License. | ||||
25 | # | ||||
26 | #************************************************************************* | ||||
27 | |||||
28 | package installer::windows::removefile; | ||||
29 | |||||
30 | 2 | 63µs | 2 | 384µs | # spent 380µs (376+4) within installer::windows::removefile::BEGIN@30 which was called:
# once (376µs+4µs) by installer::BEGIN@78 at line 30 # spent 380µs making 1 call to installer::windows::removefile::BEGIN@30
# spent 4µs making 1 call to UNIVERSAL::import |
31 | 2 | 54µs | 2 | 19µs | # spent 16µs (14+3) within installer::windows::removefile::BEGIN@31 which was called:
# once (14µs+3µs) by installer::BEGIN@78 at line 31 # spent 16µs making 1 call to installer::windows::removefile::BEGIN@31
# spent 3µs making 1 call to UNIVERSAL::import |
32 | 2 | 905µs | 2 | 21µs | # spent 18µs (16+3) within installer::windows::removefile::BEGIN@32 which was called:
# once (16µs+3µs) by installer::BEGIN@78 at line 32 # spent 18µs making 1 call to installer::windows::removefile::BEGIN@32
# spent 3µs making 1 call to UNIVERSAL::import |
33 | |||||
34 | ######################################################################## | ||||
35 | # Returning the FileKey for a folderitem for removefile table. | ||||
36 | ######################################################################## | ||||
37 | |||||
38 | sub get_removefile_filekey | ||||
39 | # spent 19µs within installer::windows::removefile::get_removefile_filekey which was called 2 times, avg 10µs/call:
# 2 times (19µs+0s) by installer::windows::removefile::create_removefile_table at line 127, avg 10µs/call | ||||
40 | 8 | 28µs | my ($folderitem) = @_; | ||
41 | |||||
42 | # returning the unique identifier | ||||
43 | |||||
44 | my $identifier = "remove_" . $folderitem->{'directory'}; | ||||
45 | |||||
46 | $identifier = lc($identifier); | ||||
47 | |||||
48 | return $identifier; | ||||
49 | } | ||||
50 | |||||
51 | ######################################################################## | ||||
52 | # Returning the Component for a folderitem for removefile table. | ||||
53 | ######################################################################## | ||||
54 | |||||
55 | sub get_removefile_component | ||||
56 | # spent 11µs within installer::windows::removefile::get_removefile_component which was called 2 times, avg 5µs/call:
# 2 times (11µs+0s) by installer::windows::removefile::create_removefile_table at line 128, avg 5µs/call | ||||
57 | 4 | 18µs | my ($folderitem) = @_; | ||
58 | |||||
59 | return $folderitem->{'component'}; | ||||
60 | } | ||||
61 | |||||
62 | ######################################################################## | ||||
63 | # Returning the FileName for a folderitem for removefile table. | ||||
64 | ######################################################################## | ||||
65 | |||||
66 | sub get_removefile_filename | ||||
67 | # spent 9µs within installer::windows::removefile::get_removefile_filename which was called 2 times, avg 4µs/call:
# 2 times (9µs+0s) by installer::windows::removefile::create_removefile_table at line 129, avg 4µs/call | ||||
68 | 4 | 16µs | my ($folderitem) = @_; | ||
69 | |||||
70 | # return nothing: The assigned directory will be removed | ||||
71 | |||||
72 | return ""; | ||||
73 | } | ||||
74 | |||||
75 | ######################################################################## | ||||
76 | # Returning the DirProperty for a folderitem for removefile table. | ||||
77 | ######################################################################## | ||||
78 | |||||
79 | sub get_removefile_dirproperty | ||||
80 | # spent 10µs within installer::windows::removefile::get_removefile_dirproperty which was called 2 times, avg 5µs/call:
# 2 times (10µs+0s) by installer::windows::removefile::create_removefile_table at line 130, avg 5µs/call | ||||
81 | 4 | 20µs | my ($folderitem) = @_; | ||
82 | |||||
83 | return $folderitem->{'directory'}; | ||||
84 | } | ||||
85 | |||||
86 | ######################################################################## | ||||
87 | # Returning the InstallMode for a folderitem for removefile table. | ||||
88 | ######################################################################## | ||||
89 | |||||
90 | sub get_removefile_installmode | ||||
91 | # spent 6µs within installer::windows::removefile::get_removefile_installmode which was called:
# once (6µs+0s) by installer::windows::removefile::create_removefile_table at line 133 | ||||
92 | 2 | 10µs | my ($folderitem) = @_; | ||
93 | |||||
94 | # always returning "2": The file is only removed, if the assigned | ||||
95 | # component is removed. Name: msidbRemoveFileInstallModeOnRemove | ||||
96 | |||||
97 | return 2; | ||||
98 | } | ||||
99 | |||||
100 | ########################################################################################################### | ||||
101 | # Creating the file RemoveFi.idt dynamically | ||||
102 | # Content: | ||||
103 | # FileKey Component_ FileName DirProperty InstallMode | ||||
104 | ########################################################################################################### | ||||
105 | |||||
106 | sub create_removefile_table | ||||
107 | # spent 5.10ms (3.72+1.38) within installer::windows::removefile::create_removefile_table which was called:
# once (3.72ms+1.38ms) by installer::run at line 1531 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
108 | 7 | 514µs | my ($folderitemsref, $basedir) = @_; | ||
109 | |||||
110 | # Only the directories created for the FolderItems have to be deleted | ||||
111 | # with the information in the table RemoveFile | ||||
112 | |||||
113 | my @directorycollector = (); | ||||
114 | |||||
115 | 2633 | 3.16ms | for ( my $i = 0; $i <= $#{$folderitemsref}; $i++ ) | ||
116 | { | ||||
117 | my $onelink = ${$folderitemsref}[$i]; | ||||
118 | |||||
119 | if ( $onelink->{'used'} == 0 ) { next; } | ||||
120 | |||||
121 | next if grep {$_ eq $onelink->{'directory'}} @directorycollector; | ||||
122 | |||||
123 | push(@directorycollector, $onelink->{'directory'}); | ||||
124 | |||||
125 | my %removefile = (); | ||||
126 | |||||
127 | 2 | 19µs | $removefile{'FileKey'} = get_removefile_filekey($onelink); # spent 19µs making 2 calls to installer::windows::removefile::get_removefile_filekey, avg 10µs/call | ||
128 | 2 | 11µs | $removefile{'Component_'} = get_removefile_component($onelink); # spent 11µs making 2 calls to installer::windows::removefile::get_removefile_component, avg 5µs/call | ||
129 | 2 | 9µs | $removefile{'FileName'} = get_removefile_filename($onelink); # spent 9µs making 2 calls to installer::windows::removefile::get_removefile_filename, avg 4µs/call | ||
130 | 2 | 10µs | $removefile{'DirProperty'} = get_removefile_dirproperty($onelink); # spent 10µs making 2 calls to installer::windows::removefile::get_removefile_dirproperty, avg 5µs/call | ||
131 | # fdo#44565 do not remove empty Desktop folder | ||||
132 | 1 | 3µs | if ( $removefile{'DirProperty'} eq $installer::globals::desktopfolder ) { next; } | ||
133 | 1 | 6µs | $removefile{'InstallMode'} = get_removefile_installmode($onelink); # spent 6µs making 1 call to installer::windows::removefile::get_removefile_installmode | ||
134 | |||||
135 | my $oneline = $removefile{'FileKey'} . "\t" . $removefile{'Component_'} . "\t" . $removefile{'FileName'} . "\t" | ||||
136 | . $removefile{'DirProperty'} . "\t" . $removefile{'InstallMode'} . "\n"; | ||||
137 | |||||
138 | push(@installer::globals::removefiletable, $oneline); | ||||
139 | } | ||||
140 | |||||
141 | # Saving the file | ||||
142 | |||||
143 | my $removefiletablename = $basedir . $installer::globals::separator . "RemoveFi.idt"; | ||||
144 | 1 | 1.32ms | installer::files::save_file($removefiletablename ,\@installer::globals::removefiletable); # spent 1.32ms making 1 call to installer::files::save_file | ||
145 | my $infoline = "Created idt file: $removefiletablename\n"; | ||||
146 | push(@installer::globals::logfileinfo, $infoline); | ||||
147 | |||||
148 | } | ||||
149 | |||||
150 | 1 | 7µs | 1; |