[Libreoffice-commits] .: solenv/bin
Andras Timar
timar at kemper.freedesktop.org
Wed Jun 29 03:26:35 PDT 2011
solenv/bin/modules/installer/windows/feature.pm | 39 ++++++++++++++++++++++++
1 file changed, 39 insertions(+)
New commits:
commit 5506e56823f11e38053e50c29342cf8469b6a641
Author: Andras Timar <atimar at suse.com>
Date: Wed Jun 29 12:25:42 2011 +0200
sorting additional language packs and dictionaries fdo#34479
diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm
index fb96f7f..c2657be 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -432,6 +432,45 @@ sub create_feature_table
}
}
+ # Sorting names of language packs and dictionaries
+ my @tempfeaturetable;
+ my @langlist;
+ my @langpack;
+ my @dictlist;
+ my @sorteddictlist;
+ my @sortedlanglist;
+
+ foreach (@featuretable) {
+ if (/^gm_r_Extension_Dictionary_/) {
+ push (@dictlist, $_);
+ }
+ elsif (/^gm_Langpack_r_/) {
+ push (@langlist, $_);
+ }
+ elsif (/\tgm_Langpack_r_/) {
+ push (@langpack, $_);
+ }
+ else {
+ push (@tempfeaturetable, $_);
+ }
+ }
+
+ @sorteddictlist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @dictlist;
+ @sortedlanglist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @langlist;
+
+ @featuretable = (@tempfeaturetable, @sorteddictlist);
+
+ foreach (@sortedlanglist) {
+ my $sortedlanglistline = $_;
+ push (@featuretable, $sortedlanglistline);
+ foreach (@langpack) {
+ my $langpackline = $_;
+ if ( (split(/\t/, $langpackline))[1] eq (split(/\t/, $sortedlanglistline))[0] ) {
+ push (@featuretable, $langpackline);
+ }
+ }
+ }
+
# Saving the file
my $featuretablename = $basedir . $installer::globals::separator . "Feature.idt" . "." . $onelanguage;
More information about the Libreoffice-commits
mailing list