diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-04-20 10:45:12 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-04-20 10:45:12 +0000 |
commit | a73bbf2f121a405e1fbb1a6f1c2c28ab771f9693 (patch) | |
tree | d4f26ef0e891e9b63b26f4eccd2b370c9a89bfc4 /solenv/bin/modules/installer/converter.pm | |
parent | fbf6d590298f34597cb1be76ba617737a6dbaa6b (diff) |
INTEGRATION: CWS nativefixer6 (1.8.4); FILE MERGED
2005/04/08 17:56:11 is 1.8.4.2: #i46741# introducing flag BINARYTABLE_ONLY, important for patch
2005/04/07 16:41:06 is 1.8.4.1: #i46741# enabling Linux patching, smaller Language packs
Diffstat (limited to 'solenv/bin/modules/installer/converter.pm')
-rw-r--r-- | solenv/bin/modules/installer/converter.pm | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm index 8ec95858ae48..c6d4e9776285 100644 --- a/solenv/bin/modules/installer/converter.pm +++ b/solenv/bin/modules/installer/converter.pm @@ -2,9 +2,9 @@ # # $RCSfile: converter.pm,v $ # -# $Revision: 1.8 $ +# $Revision: 1.9 $ # -# last change: $Author: rt $ $Date: 2005-04-04 09:58:19 $ +# last change: $Author: obo $ $Date: 2005-04-20 11:45:12 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -172,7 +172,9 @@ sub convert_array_to_comma_separated_string for ( my $i = 0; $i <= $#{$arrayref}; $i++ ) { - $newstring = $newstring . ${$arrayref}[$i] . ","; + my $arrayentry = ${$arrayref}[$i]; + $arrayentry =~ s/\s*$//; + $newstring = $newstring . $arrayentry . ","; } $newstring =~ s/\,\s*$//; @@ -192,7 +194,9 @@ sub convert_array_to_space_separated_string for ( my $i = 0; $i <= $#{$arrayref}; $i++ ) { - $newstring = $newstring . ${$arrayref}[$i] . " "; + my $arrayentry = ${$arrayref}[$i]; + $arrayentry =~ s/\s*$//; + $newstring = $newstring . $arrayentry . " "; } $newstring =~ s/\s*$//; @@ -286,6 +290,47 @@ sub copy_collector } ################################################################# +# Copying an array +################################################################# + +sub copy_array_from_references +{ + my ( $arrayref ) = @_; + + my @newarray = (); + + for ( my $i = 0; $i <= $#{$arrayref}; $i++ ) + { + push(@newarray, ${$arrayref}[$i]); + } + + return \@newarray; +} + +################################################################# +# Combining two arrays +################################################################# + +sub combine_arrays_from_references +{ + my ( $arrayref1, $arrayref2 ) = @_; + + my @newarray = (); + + for ( my $i = 0; $i <= $#{$arrayref1}; $i++ ) + { + push(@newarray, ${$arrayref1}[$i]); + } + + for ( my $i = 0; $i <= $#{$arrayref2}; $i++ ) + { + push(@newarray, ${$arrayref2}[$i]); + } + + return \@newarray; +} + +################################################################# # Returning the current ending number of a directory ################################################################# |