You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by jo...@apache.org on 2011/07/04 22:18:34 UTC
svn commit: r1142794 - /incubator/ooo/site/trunk/lib/view.pm
Author: joes
Date: Mon Jul 4 20:18:34 2011
New Revision: 1142794
URL: http://svn.apache.org/viewvc?rev=1142794&view=rev
Log:
less convoluted. no html changes intended
Modified:
incubator/ooo/site/trunk/lib/view.pm
Modified: incubator/ooo/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/incubator/ooo/site/trunk/lib/view.pm?rev=1142794&r1=1142793&r2=1142794&view=diff
==============================================================================
--- incubator/ooo/site/trunk/lib/view.pm (original)
+++ incubator/ooo/site/trunk/lib/view.pm Mon Jul 4 20:18:34 2011
@@ -194,11 +194,11 @@ sub sort_tables {
my $data = $1;
if ($data =~ tr/v/v/) {
$col = $cur;
- $direction = 1;
+ $direction = -1;
}
elsif ($data =~ tr/^/^/) {
$col = $cur;
- $direction = -1;
+ $direction = 1;
}
$cur++;
}
@@ -210,7 +210,7 @@ sub sort_tables {
push @rows, [split /\s*\|\s*/, shift @orig]
while $orig[0] =~ /^\|/;
shift @$_ for @rows; # dump empty entry at front
- @rows = sort { $b->[$col] cmp $a->[$col] } @rows;
+ @rows = sort { $a->[$col] cmp $b->[$col] } @rows;
@rows = reverse @rows if $direction == -1;
push @out, map "| " . join(" | ", @$_) . " |", @rows;
}