← Index
NYTProf Performance Profile   « block view • line view • sub view »
For C:/lo/libo-master/solenv/bin/make_installer.pl
  Run on Mon Sep 24 00:52:54 2012
Reported on Mon Sep 24 07:34:44 2012

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/shortcut.pm
StatementsExecuted 1969861 statements in 1.76s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111549ms2.07sinstaller::windows::shortcut::::create_shortcut_tableinstaller::windows::shortcut::create_shortcut_table
87211546ms548msinstaller::windows::shortcut::::get_shortcut_componentinstaller::windows::shortcut::get_shortcut_component
87211533ms536msinstaller::windows::shortcut::::get_folderitem_targetinstaller::windows::shortcut::get_folderitem_target
8721162.6ms62.6msinstaller::windows::shortcut::::get_folderitem_wkdirinstaller::windows::shortcut::get_folderitem_wkdir
8721113.2ms89.8msinstaller::windows::shortcut::::get_shortcut_nameinstaller::windows::shortcut::get_shortcut_name
5232618.91ms8.91msinstaller::windows::shortcut::::CORE:matchinstaller::windows::shortcut::CORE:match (opcode)
872117.34ms9.75msinstaller::windows::shortcut::::get_folderitem_iconinstaller::windows::shortcut::get_folderitem_icon
872116.97ms8.98msinstaller::windows::shortcut::::get_folderitem_iconindexinstaller::windows::shortcut::get_folderitem_iconindex
872116.24ms6.24msinstaller::windows::shortcut::::get_folderitem_directoryinstaller::windows::shortcut::get_folderitem_directory
872114.56ms4.56msinstaller::windows::shortcut::::get_shortcut_descriptioninstaller::windows::shortcut::get_shortcut_description
872114.33ms4.33msinstaller::windows::shortcut::::get_folderitem_argumentsinstaller::windows::shortcut::get_folderitem_arguments
872114.13ms4.13msinstaller::windows::shortcut::::get_shortcut_identifierinstaller::windows::shortcut::get_shortcut_identifier
872113.00ms3.00msinstaller::windows::shortcut::::get_shortcut_hotkeyinstaller::windows::shortcut::get_shortcut_hotkey
872112.98ms2.98msinstaller::windows::shortcut::::get_folderitem_showcmdinstaller::windows::shortcut::get_folderitem_showcmd
87211851µs851µsinstaller::windows::shortcut::::CORE:substinstaller::windows::shortcut::CORE:subst (opcode)
111412µs416µsinstaller::windows::shortcut::::BEGIN@30installer::windows::shortcut::BEGIN@30
11117µs19µsinstaller::windows::shortcut::::BEGIN@32installer::windows::shortcut::BEGIN@32
11116µs18µsinstaller::windows::shortcut::::BEGIN@31installer::windows::shortcut::BEGIN@31
11114µs16µsinstaller::windows::shortcut::::BEGIN@33installer::windows::shortcut::BEGIN@33
0000s0sinstaller::windows::shortcut::::get_shortcut_argumentsinstaller::windows::shortcut::get_shortcut_arguments
0000s0sinstaller::windows::shortcut::::get_shortcut_directoryinstaller::windows::shortcut::get_shortcut_directory
0000s0sinstaller::windows::shortcut::::get_shortcut_iconinstaller::windows::shortcut::get_shortcut_icon
0000s0sinstaller::windows::shortcut::::get_shortcut_iconindexinstaller::windows::shortcut::get_shortcut_iconindex
0000s0sinstaller::windows::shortcut::::get_shortcut_showcmdinstaller::windows::shortcut::get_shortcut_showcmd
0000s0sinstaller::windows::shortcut::::get_shortcut_targetinstaller::windows::shortcut::get_shortcut_target
0000s0sinstaller::windows::shortcut::::get_shortcut_wkdirinstaller::windows::shortcut::get_shortcut_wkdir
Call graph for these subroutines as a Graphviz dot language file.
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
28package installer::windows::shortcut;
29
30265µs2420µs
# spent 416µs (412+4) within installer::windows::shortcut::BEGIN@30 which was called: # once (412µs+4µs) by installer::BEGIN@80 at line 30
use installer::exiter;
# spent 416µs making 1 call to installer::windows::shortcut::BEGIN@30 # spent 4µs making 1 call to UNIVERSAL::import
312141µs220µs
# spent 18µs (16+2) within installer::windows::shortcut::BEGIN@31 which was called: # once (16µs+2µs) by installer::BEGIN@80 at line 31
use installer::files;
# spent 18µs making 1 call to installer::windows::shortcut::BEGIN@31 # spent 2µs making 1 call to UNIVERSAL::import
32253µs221µs
# spent 19µs (17+2) within installer::windows::shortcut::BEGIN@32 which was called: # once (17µs+2µs) by installer::BEGIN@80 at line 32
use installer::globals;
# spent 19µs making 1 call to installer::windows::shortcut::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
3325.43ms217µs
# spent 16µs (14+1) within installer::windows::shortcut::BEGIN@33 which was called: # once (14µs+1µs) by installer::BEGIN@80 at line 33
use installer::windows::idtglobal;
# spent 16µs making 1 call to installer::windows::shortcut::BEGIN@33 # spent 2µs making 1 call to UNIVERSAL::import
34
35##############################################################
36# Returning identifier for shortcut table.
37##############################################################
38
39sub get_shortcut_identifier
40
# spent 4.13ms within installer::windows::shortcut::get_shortcut_identifier which was called 872 times, avg 5µs/call: # 872 times (4.13ms+0s) by installer::windows::shortcut::create_shortcut_table at line 616, avg 5µs/call
{
4126166.07ms my ($shortcut) = @_;
42
43 my $identifier = $shortcut->{'gid'};
44
45 return $identifier;
46}
47
48##############################################################
49# Returning directory for shortcut table.
50##############################################################
51
52sub get_shortcut_directory
53{
54 my ($shortcut, $dirref) = @_;
55
56 # For shortcuts it is easy to convert the gid_Dir_Abc into the unique name in
57 # the directory table, for instance help_en_simpressidx.
58 # For files (components) this is not so easy, because files can be included
59 # in zip files with subdirectories that are not defined in scp.
60
61 my $onedir;
62 my $shortcutdirectory = $shortcut->{'Dir'};
63 my $directory = "";
64 my $found = 0;
65
66 for ( my $i = 0; $i <= $#{$dirref}; $i++ )
67 {
68 $onedir = ${$dirref}[$i];
69 my $directorygid = $onedir->{'Dir'};
70
71 if ( $directorygid eq $shortcutdirectory )
72 {
73 $found = 1;
74 last;
75 }
76 }
77
78 if (!($found))
79 {
80 installer::exiter::exit_program("ERROR: Did not find DirectoryID $shortcutdirectory in directory collection for shortcut", "get_shortcut_directory");
81 }
82
83 $directory = $onedir->{'uniquename'};
84
85 if ($directory eq "") { $directory = "INSTALLLOCATION"; } # Shortcuts in the root directory
86
87 return $directory;
88}
89
90##############################################################
91# Returning name for shortcut table.
92##############################################################
93
94sub get_shortcut_name
95
# spent 89.8ms (13.2+76.6) within installer::windows::shortcut::get_shortcut_name which was called 872 times, avg 103µs/call: # 872 times (13.2ms+76.6ms) by installer::windows::shortcut::create_shortcut_table at line 618, avg 103µs/call
{
96610413.1ms my ($shortcut, $shortnamesref, $onelanguage) = @_;
97
98 my $returnstring;
99
100 my $name = $shortcut->{'Name'};
101
10287275.8ms my $shortstring = installer::windows::idtglobal::make_eight_three_conform($name, "shortcut", $shortnamesref);
# spent 75.8ms making 872 calls to installer::windows::idtglobal::make_eight_three_conform, avg 87µs/call
103872851µs $shortstring =~ s/\s/\_/g; # replacing white spaces with underline
# spent 851µs making 872 calls to installer::windows::shortcut::CORE:subst, avg 976ns/call
104
105872866µs if ( $shortstring eq $name ) { $returnstring = $name; } # nothing changed
106 else {$returnstring = $shortstring . "\|" . $name; }
107
108 return $returnstring;
109}
110
111##############################################################
112# Returning component for shortcut table.
113##############################################################
114
115sub get_shortcut_component
116
# spent 548ms (546+1.47) within installer::windows::shortcut::get_shortcut_component which was called 872 times, avg 628µs/call: # 872 times (546ms+1.47ms) by installer::windows::shortcut::create_shortcut_table at line 619, avg 628µs/call
{
11713080242ms my ($shortcut, $filesref) = @_;
118
119 my $onefile;
120 my $component = "";
121 my $found = 0;
122 my $shortcut_fileid = $shortcut->{'FileID'};
123
124 my $absolute_filename = 0;
125872611µs if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
126872787µs if ( $styles =~ /\bABSOLUTE_FILENAME\b/ ) { $absolute_filename = 1; } # FileID contains an absolute filename
# spent 787µs making 872 calls to installer::windows::shortcut::CORE:match, avg 903ns/call
127872687µs if ( $styles =~ /\bUSE_HELPER_FILENAME\b/ ) { $absolute_filename = 1; } # ComponentIDFile contains id of a helper file
# spent 687µs making 872 calls to installer::windows::shortcut::CORE:match, avg 788ns/call
128
129 # if the FileID contains an absolute filename, therefore the entry for "ComponentIDFile" has to be used.
130 if ( $absolute_filename ) { $shortcut_fileid = $shortcut->{'ComponentIDFile'}; }
131
132620319306ms for ( my $i = 0; $i <= $#{$filesref}; $i++ )
133 {
134 $onefile = ${$filesref}[$i];
135 my $filegid = $onefile->{'gid'};
136
1371744985µs if ( $filegid eq $shortcut_fileid )
138 {
139 $found = 1;
140 last;
141 }
142 }
143
144 if (!($found))
145 {
146 installer::exiter::exit_program("ERROR: Did not find FileID $shortcut_fileid in file collection for shortcut", "get_shortcut_component");
147 }
148
149 $component = $onefile->{'componentname'};
150
151 # finally saving the componentname in the folderitem collector
152
153 $shortcut->{'component'} = $component;
154
155 return $component;
156}
157
158##############################################################
159# Returning target for shortcut table.
160##############################################################
161
162sub get_shortcut_target
163{
164 my ($shortcut, $filesref) = @_;
165
166 my $target = "";
167 my $found = 0;
168 my $shortcut_fileid = $shortcut->{'FileID'};
169 my $onefile;
170
171 for ( my $i = 0; $i <= $#{$filesref}; $i++ )
172 {
173 $onefile = ${$filesref}[$i];
174 my $filegid = $onefile->{'gid'};
175
176 if ( $filegid eq $shortcut_fileid )
177 {
178 $found = 1;
179 last;
180 }
181 }
182
183 if (!($found))
184 {
185 installer::exiter::exit_program("ERROR: Did not find FileID $shortcut_fileid in file collection for shortcut", "get_shortcut_target");
186 }
187
188 if ( $onefile->{'Name'} )
189 {
190 $target = $onefile->{'Name'};
191 }
192
193 $target = "\[\#" . $target . "\]"; # format for Non-Advertised shortcuts
194
195 return $target;
196}
197
198##############################################################
199# Returning arguments for shortcut table.
200##############################################################
201
202sub get_shortcut_arguments
203{
204 my ($shortcut) = @_;
205
206 return "";
207}
208
209##############################################################
210# Returning the localized description for shortcut table.
211##############################################################
212
213sub get_shortcut_description
214
# spent 4.56ms within installer::windows::shortcut::get_shortcut_description which was called 872 times, avg 5µs/call: # 872 times (4.56ms+0s) by installer::windows::shortcut::create_shortcut_table at line 622, avg 5µs/call
{
21534886.16ms my ($shortcut, $onelanguage) = @_;
216
217 my $description = "";
218 if ( $shortcut->{'Tooltip'} ) { $description = $shortcut->{'Tooltip'}; }
219
220 return $description;
221}
222
223##############################################################
224# Returning hotkey for shortcut table.
225##############################################################
226
227sub get_shortcut_hotkey
228
# spent 3.00ms within installer::windows::shortcut::get_shortcut_hotkey which was called 872 times, avg 3µs/call: # 872 times (3.00ms+0s) by installer::windows::shortcut::create_shortcut_table at line 623, avg 3µs/call
{
22917444.61ms my ($shortcut) = @_;
230
231 return "";
232}
233
234##############################################################
235# Returning icon for shortcut table.
236##############################################################
237
238sub get_shortcut_icon
239{
240 my ($shortcut) = @_;
241
242 return "";
243}
244
245##############################################################
246# Returning iconindex for shortcut table.
247##############################################################
248
249sub get_shortcut_iconindex
250{
251 my ($shortcut) = @_;
252
253 return "";
254}
255
256##############################################################
257# Returning show command for shortcut table.
258##############################################################
259
260sub get_shortcut_showcmd
261{
262 my ($shortcut) = @_;
263
264 return "";
265}
266
267##############################################################
268# Returning working directory for shortcut table.
269##############################################################
270
271sub get_shortcut_wkdir
272{
273 my ($shortcut) = @_;
274
275 return "";
276}
277
278####################################################################
279# Returning working directory for shortcut table for FolderItems.
280####################################################################
281
282sub get_folderitem_wkdir
283
# spent 62.6ms within installer::windows::shortcut::get_folderitem_wkdir which was called 872 times, avg 72µs/call: # 872 times (62.6ms+0s) by installer::windows::shortcut::create_shortcut_table at line 627, avg 72µs/call
{
28461047.93ms my ($onelink, $dirref) = @_;
285
286 # For shortcuts it is easy to convert the gid_Dir_Abc into the unique name in
287 # the directory table, for instance help_en_simpressidx.
288
289 my $onedir;
290 my $workingdirectory = "";
291 if ( $onelink->{'WkDir'} ) { $workingdirectory = $onelink->{'WkDir'}; }
292 my $directory = "";
293
294436023.3ms if ( $workingdirectory )
295 {
296 my $found = 0;
297
2986278432.3ms for ( my $i = 0; $i <= $#{$dirref}; $i++ )
299 {
300 $onedir = ${$dirref}[$i];
301 my $directorygid = $onedir->{'Dir'};
302
3031744937µs if ( $directorygid eq $workingdirectory )
304 {
305 $found = 1;
306 last;
307 }
308 }
309
310 if (!($found))
311 {
312 installer::exiter::exit_program("ERROR: Did not find DirectoryID $workingdirectory in directory collection for FolderItem", "get_folderitem_wkdir");
313 }
314
315 $directory = $onedir->{'uniquename'};
316
317 if ($directory eq "") { $directory = "INSTALLLOCATION"; }
318 }
319
320 return $directory;
321}
322
323###################################################################
324# Returning the directory for a folderitem for shortcut table.
325###################################################################
326
327sub get_folderitem_directory
328
# spent 6.24ms within installer::windows::shortcut::get_folderitem_directory which was called 872 times, avg 7µs/call: # 872 times (6.24ms+0s) by installer::windows::shortcut::create_shortcut_table at line 617, avg 7µs/call
{
32961047.79ms my ($shortcut) = @_;
330
331 my $directory = "$installer::globals::officemenufolder"; # default
332
333 # The default is not correct for the
334 # PREDEFINED folders, like PREDEFINED_AUTOSTART
335
336 if ( $shortcut->{'FolderID'} eq "PREDEFINED_AUTOSTART" )
337 {
338 $directory = $installer::globals::startupfolder;
339 }
340
341218153µs if ( $shortcut->{'FolderID'} eq "PREDEFINED_DESKTOP" )
342 {
343 $directory = $installer::globals::desktopfolder;
344 $installer::globals::desktoplinkexists = 1;
345 }
346
347 if ( $shortcut->{'FolderID'} eq "PREDEFINED_STARTMENU" )
348 {
349 $directory = $installer::globals::programmenufolder;
350 }
351
352 # saving the directory in the folderitems collector
353
354 $shortcut->{'directory'} = $directory;
355
356 return $directory;
357}
358
359########################################################################
360# Returning the target (feature) for a folderitem for shortcut table.
361# For non-advertised shortcuts this is a formatted string.
362########################################################################
363
364sub get_folderitem_target
365
# spent 536ms (533+3.02) within installer::windows::shortcut::get_folderitem_target which was called 872 times, avg 615µs/call: # 872 times (533ms+3.02ms) by installer::windows::shortcut::create_shortcut_table at line 620, avg 615µs/call
{
36613080233ms my ($shortcut, $filesref) = @_;
367
368 my $onefile;
369 my $target = "";
370 my $found = 0;
371 my $shortcut_fileid = $shortcut->{'FileID'};
372
373 my $styles = "";
374 my $nonadvertised = 0;
375 my $absolute_filename = 0;
376 if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
3778722.52ms if ( $styles =~ /\bNON_ADVERTISED\b/ ) { $nonadvertised = 1; } # this is a non-advertised shortcut
# spent 2.52ms making 872 calls to installer::windows::shortcut::CORE:match, avg 3µs/call
378872497µs if ( $styles =~ /\bABSOLUTE_FILENAME\b/ ) { $absolute_filename = 1; } # FileID contains an absolute filename
# spent 497µs making 872 calls to installer::windows::shortcut::CORE:match, avg 570ns/call
379
380 # if the FileID contains an absolute filename this can simply be returned as target for the shortcut table.
381 if ( $absolute_filename )
382 {
383 $shortcut->{'target'} = $shortcut_fileid;
384 return $shortcut_fileid;
385 }
386
387615414297ms for ( my $i = 0; $i <= $#{$filesref}; $i++ )
388 {
389 $onefile = ${$filesref}[$i];
390 my $filegid = $onefile->{'gid'};
391
3921744965µs if ( $filegid eq $shortcut_fileid )
393 {
394 $found = 1;
395 last;
396 }
397 }
398
399 if (!($found))
400 {
401 installer::exiter::exit_program("ERROR: Did not find FileID $shortcut_fileid in file collection for folderitem", "get_folderitem_target");
402 }
403
404 # Non advertised shortcuts do not return the feature, but the path to the file
40526167.97ms if ( $nonadvertised )
406 {
407 $target = "\[" . $onefile->{'uniquedirname'} . "\]" . "\\" . $onefile->{'Name'};
408 $shortcut->{'target'} = $target;
409 return $target;
410 }
411
412 # the rest only for advertised shortcuts, which contain the feature in the shortcut table.
413
414 if ( $onefile->{'modules'} ) { $target = $onefile->{'modules'}; }
415
416 # If modules contains a list of modules, only taking the first one.
417 # But this should never be needed
418
419 if ( $target =~ /^\s*(.*?)\,/ ) { $target = $1; }
420
421 # Attention: Maximum feature length is 38!
422 installer::windows::idtglobal::shorten_feature_gid(\$target);
423
424 # and finally saving the target in the folderitems collector
425
426 $shortcut->{'target'} = $target;
427
428 return $target;
429}
430
431########################################################################
432# Returning the arguments for a folderitem for shortcut table.
433########################################################################
434
435sub get_folderitem_arguments
436
# spent 4.33ms within installer::windows::shortcut::get_folderitem_arguments which was called 872 times, avg 5µs/call: # 872 times (4.33ms+0s) by installer::windows::shortcut::create_shortcut_table at line 621, avg 5µs/call
{
43734885.83ms my ($shortcut) = @_;
438
439 my $parameter = "";
440
441 if ( $shortcut->{'Parameter'} ) { $parameter = $shortcut->{'Parameter'}; }
442
443 return $parameter;
444}
445
446########################################################################
447# Returning the icon for a folderitem for shortcut table.
448# The returned value has to be defined in the icon table.
449########################################################################
450
451sub get_folderitem_icon
452
# spent 9.75ms (7.34+2.41) within installer::windows::shortcut::get_folderitem_icon which was called 872 times, avg 11µs/call: # 872 times (7.34ms+2.41ms) by installer::windows::shortcut::create_shortcut_table at line 624, avg 11µs/call
{
453348811.2ms my ($shortcut, $filesref, $iconfilecollector) = @_;
454
455 my $styles = "";
456 if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
4578722.41ms if ( $styles =~ /\bNON_ADVERTISED\b/ ) { return ""; } # no icon for non-advertised shortcuts
# spent 2.41ms making 872 calls to installer::windows::shortcut::CORE:match, avg 3µs/call
458
459 my $iconfilegid = "";
460
461 if ( $shortcut->{'IconFile'} ) { $iconfilegid = $shortcut->{'IconFile'}; }
462 else { $iconfilegid = $shortcut->{'FileID'}; }
463
464 my $onefile;
465 my $found = 0;
466
467 for ( my $i = 0; $i <= $#{$filesref}; $i++ )
468 {
469 $onefile = ${$filesref}[$i];
470 my $filegid = $onefile->{'gid'};
471
472 if ( $filegid eq $iconfilegid )
473 {
474 $found = 1;
475 last;
476 }
477 }
478
479 if (!($found))
480 {
481 installer::exiter::exit_program("ERROR: Did not find FileID $iconfilegid in file collection", "get_folderitem_icon");
482 }
483
484 $iconfile = $onefile->{'Name'};
485
486 # collecting all icon files to copy them into the icon directory
487
488 my $sourcepath = $onefile->{'sourcepath'};
489
490 if (! grep {$_ eq $sourcepath} @{$iconfilecollector})
491 {
492 push(@{$iconfilecollector}, $sourcepath);
493 }
494
495 return $iconfile;
496}
497
498########################################################################
499# Returning the iconindex for a folderitem for shortcut table.
500########################################################################
501
502sub get_folderitem_iconindex
503
# spent 8.98ms (6.97+2.00) within installer::windows::shortcut::get_folderitem_iconindex which was called 872 times, avg 10µs/call: # 872 times (6.97ms+2.00ms) by installer::windows::shortcut::create_shortcut_table at line 625, avg 10µs/call
{
504348810.3ms my ($shortcut) = @_;
505
506 my $styles = "";
507 if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
5088722.00ms if ( $styles =~ /\bNON_ADVERTISED\b/ ) { return ""; } # no iconindex for non-advertised shortcuts
# spent 2.00ms making 872 calls to installer::windows::shortcut::CORE:match, avg 2µs/call
509
510 my $iconid = 0;
511
512 if ( $shortcut->{'IconID'} ) { $iconid = $shortcut->{'IconID'}; }
513
514 return $iconid;
515}
516
517########################################################################
518# Returning the show command for a folderitem for shortcut table.
519########################################################################
520
521sub get_folderitem_showcmd
522
# spent 2.98ms within installer::windows::shortcut::get_folderitem_showcmd which was called 872 times, avg 3µs/call: # 872 times (2.98ms+0s) by installer::windows::shortcut::create_shortcut_table at line 626, avg 3µs/call
{
52317444.71ms my ($shortcut) = @_;
524
525 return "1";
526}
527
528###########################################################################################################
529# Creating the file Shortcut.idt dynamically
530# Content:
531# Shortcut Directory_ Name Component_ Target Arguments Description Hotkey Icon_ IconIndex ShowCmd WkDir
532###########################################################################################################
533
534sub create_shortcut_table
535
# spent 2.07s (549ms+1.52) within installer::windows::shortcut::create_shortcut_table which was called: # once (549ms+1.52s) by installer::run at line 1519 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
5362287µs my ($filesref, $linksref, $folderref, $folderitemsref, $dirref, $basedir, $languagesarrayref, $includepatharrayref, $iconfilecollector) = @_;
537
53818535.14ms for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
539 {
540 my $onelanguage = ${$languagesarrayref}[$m];
541
542 my @shortcuttable = ();
543
544 my @shortnames = (); # to collect all short names
545
5461092.30ms installer::windows::idtglobal::write_idt_header(\@shortcuttable, "shortcut");
# spent 2.30ms making 109 calls to installer::windows::idtglobal::write_idt_header, avg 21µs/call
547
548 # First the links, defined in scp as ShortCut
549
550 for ( my $i = 0; $i <= $#{$linksref}; $i++ )
551 {
552 my $onelink = ${$linksref}[$i];
553
554 # Controlling the language!
555 # Only language independent folderitems or folderitems with the correct language
556 # will be included into the table
557
558 if (! (!(( $onelink->{'ismultilingual'} )) || ( $onelink->{'specificlanguage'} eq $onelanguage )) ) { next; }
559
560 my %shortcut = ();
561
562 $shortcut{'Shortcut'} = get_shortcut_identifier($onelink);
563 $shortcut{'Directory_'} = get_shortcut_directory($onelink, $dirref);
564 $shortcut{'Name'} = get_shortcut_name($onelink, \@shortnames, $onelanguage); # localized name
565 $shortcut{'Component_'} = get_shortcut_component($onelink, $filesref);
566 $shortcut{'Target'} = get_shortcut_target($onelink, $filesref);
567 $shortcut{'Arguments'} = get_shortcut_arguments($onelink);
568 $shortcut{'Description'} = get_shortcut_description($onelink, $onelanguage); # localized description
569 $shortcut{'Hotkey'} = get_shortcut_hotkey($onelink);
570 $shortcut{'Icon_'} = get_shortcut_icon($onelink);
571 $shortcut{'IconIndex'} = get_shortcut_iconindex($onelink);
572 $shortcut{'ShowCmd'} = get_shortcut_showcmd($onelink);
573 $shortcut{'WkDir'} = get_shortcut_wkdir($onelink);
574
575 my $oneline = $shortcut{'Shortcut'} . "\t" . $shortcut{'Directory_'} . "\t" . $shortcut{'Name'} . "\t"
576 . $shortcut{'Component_'} . "\t" . $shortcut{'Target'} . "\t" . $shortcut{'Arguments'} . "\t"
577 . $shortcut{'Description'} . "\t" . $shortcut{'Hotkey'} . "\t" . $shortcut{'Icon_'} . "\t"
578 . $shortcut{'IconIndex'} . "\t" . $shortcut{'ShowCmd'} . "\t" . $shortcut{'WkDir'} . "\n";
579
580 push(@shortcuttable, $oneline);
581 }
582
583 # Second the entries into the start menu, defined in scp as Folder and Folderitem
584 # These shortcuts will fill the icons table.
585
586436106ms for ( my $i = 0; $i <= $#{$folderref}; $i++ )
587 {
588 my $foldergid = ${$folderref}[$i]->{'gid'};
589
590 # iterating over all folderitems for this folder
591
592401120328ms for ( my $j = 0; $j <= $#{$folderitemsref}; $j++ )
593 {
594 my $onelink = ${$folderitemsref}[$j];
595
596 # Controlling the language!
597 # Only language independent folderitems or folderitems with the correct language
598 # will be included into the table
599
60018835288.2ms if (! (!(( $onelink->{'ismultilingual'} )) || ( $onelink->{'specificlanguage'} eq $onelanguage )) ) { next; }
601
602 # controlling the folder
603
604 my $localused = 0;
605
606 if ( $onelink->{'used'} ) { $localused = $onelink->{'used'}; }
607
608 if (!($localused == 1)) { $onelink->{'used'} = "0"; } # no resetting
609
610872461µs if (!( $onelink->{'FolderID'} eq $foldergid )) { next; }
611
612 $onelink->{'used'} = "1";
613
614 my %shortcut = ();
615
6168724.13ms $shortcut{'Shortcut'} = get_shortcut_identifier($onelink);
# spent 4.13ms making 872 calls to installer::windows::shortcut::get_shortcut_identifier, avg 5µs/call
6178726.24ms $shortcut{'Directory_'} = get_folderitem_directory($onelink);
# spent 6.24ms making 872 calls to installer::windows::shortcut::get_folderitem_directory, avg 7µs/call
61887289.8ms $shortcut{'Name'} = get_shortcut_name($onelink, \@shortnames, $onelanguage); # localized name
# spent 89.8ms making 872 calls to installer::windows::shortcut::get_shortcut_name, avg 103µs/call
619872548ms $shortcut{'Component_'} = get_shortcut_component($onelink, $filesref);
# spent 548ms making 872 calls to installer::windows::shortcut::get_shortcut_component, avg 628µs/call
620872536ms $shortcut{'Target'} = get_folderitem_target($onelink, $filesref);
# spent 536ms making 872 calls to installer::windows::shortcut::get_folderitem_target, avg 615µs/call
6218724.33ms $shortcut{'Arguments'} = get_folderitem_arguments($onelink);
# spent 4.33ms making 872 calls to installer::windows::shortcut::get_folderitem_arguments, avg 5µs/call
6228724.56ms $shortcut{'Description'} = get_shortcut_description($onelink, $onelanguage); # localized description
# spent 4.56ms making 872 calls to installer::windows::shortcut::get_shortcut_description, avg 5µs/call
6238723.00ms $shortcut{'Hotkey'} = get_shortcut_hotkey($onelink);
# spent 3.00ms making 872 calls to installer::windows::shortcut::get_shortcut_hotkey, avg 3µs/call
6248729.75ms $shortcut{'Icon_'} = get_folderitem_icon($onelink, $filesref, $iconfilecollector);
# spent 9.75ms making 872 calls to installer::windows::shortcut::get_folderitem_icon, avg 11µs/call
6258728.98ms $shortcut{'IconIndex'} = get_folderitem_iconindex($onelink);
# spent 8.98ms making 872 calls to installer::windows::shortcut::get_folderitem_iconindex, avg 10µs/call
6268722.98ms $shortcut{'ShowCmd'} = get_folderitem_showcmd($onelink);
# spent 2.98ms making 872 calls to installer::windows::shortcut::get_folderitem_showcmd, avg 3µs/call
62787262.6ms $shortcut{'WkDir'} = get_folderitem_wkdir($onelink, $dirref);
# spent 62.6ms making 872 calls to installer::windows::shortcut::get_folderitem_wkdir, avg 72µs/call
628
629 my $oneline = $shortcut{'Shortcut'} . "\t" . $shortcut{'Directory_'} . "\t" . $shortcut{'Name'} . "\t"
630 . $shortcut{'Component_'} . "\t" . $shortcut{'Target'} . "\t" . $shortcut{'Arguments'} . "\t"
631 . $shortcut{'Description'} . "\t" . $shortcut{'Hotkey'} . "\t" . $shortcut{'Icon_'} . "\t"
632 . $shortcut{'IconIndex'} . "\t" . $shortcut{'ShowCmd'} . "\t" . $shortcut{'WkDir'} . "\n";
633
634 push(@shortcuttable, $oneline);
635 }
636 }
637
638 # The soffice.ico has to be included into the icon table
639 # as icon for the ARP applet
640
641 my $onefile = "";
642 my $sofficefile = "soffice.ico";
643
644109154ms my $sourcepathref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$sofficefile, $includepatharrayref, 0);
# spent 154ms making 109 calls to installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic, avg 1.41ms/call
645
646 if ($$sourcepathref eq "") { installer::exiter::exit_program("ERROR: Could not find $sofficefile as icon!", "create_shortcut_table"); }
647
64824µs if (! grep {$_ eq $$sourcepathref} @{$iconfilecollector})
649 {
650 unshift(@{$iconfilecollector}, $$sourcepathref);
651 $installer::globals::sofficeiconadded = 1;
652 }
653
654 my $localinfoline = "Added icon file $$sourcepathref for language pack into icon file collector.\n";
655 push(@installer::globals::logfileinfo, $localinfoline);
656
657 # Saving the file
658
659 my $shortcuttablename = $basedir . $installer::globals::separator . "Shortcut.idt" . "." . $onelanguage;
66010986.1ms installer::files::save_file($shortcuttablename ,\@shortcuttable);
# spent 86.1ms making 109 calls to installer::files::save_file, avg 790µs/call
661 my $infoline = "Created idt file: $shortcuttablename\n";
662 push(@installer::globals::logfileinfo, $infoline);
663 }
664}
665
666
66718µs1;
 
# spent 8.91ms within installer::windows::shortcut::CORE:match which was called 5232 times, avg 2µs/call: # 872 times (2.52ms+0s) by installer::windows::shortcut::get_folderitem_target at line 377, avg 3µs/call # 872 times (2.41ms+0s) by installer::windows::shortcut::get_folderitem_icon at line 457, avg 3µs/call # 872 times (2.00ms+0s) by installer::windows::shortcut::get_folderitem_iconindex at line 508, avg 2µs/call # 872 times (787µs+0s) by installer::windows::shortcut::get_shortcut_component at line 126, avg 903ns/call # 872 times (687µs+0s) by installer::windows::shortcut::get_shortcut_component at line 127, avg 788ns/call # 872 times (497µs+0s) by installer::windows::shortcut::get_folderitem_target at line 378, avg 570ns/call
sub installer::windows::shortcut::CORE:match; # opcode
# spent 851µs within installer::windows::shortcut::CORE:subst which was called 872 times, avg 976ns/call: # 872 times (851µs+0s) by installer::windows::shortcut::get_shortcut_name at line 103, avg 976ns/call
sub installer::windows::shortcut::CORE:subst; # opcode