incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1142794 - /incubator/ooo/site/trunk/lib/view.pm
Date Mon, 04 Jul 2011 20:18:34 GMT
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;
     }



Mime
View raw message