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/05 18:05:59 UTC
svn commit: r1143119 - /incubator/ooo/site/trunk/lib/view.pm
Author: joes
Date: Tue Jul 5 16:05:59 2011
New Revision: 1143119
URL: http://svn.apache.org/viewvc?rev=1143119&view=rev
Log:
support numeric sort with "n" marker, fixed
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=1143119&r1=1143118&r2=1143119&view=diff
==============================================================================
--- incubator/ooo/site/trunk/lib/view.pm (original)
+++ incubator/ooo/site/trunk/lib/view.pm Tue Jul 5 16:05:59 2011
@@ -179,10 +179,10 @@ sub sort_tables {
while (defined(local $_ = shift @orig)) {
push @out, $_;
/^(\|[ :vn^-]+)+\|$/ or next;
- my($col, $direction, $cur, $numeric);
+ my($data, $col, $direction, $cur, $numeric);
$cur = 0;
while (/\|([ :vn^-]+)/g) {
- my $data = $1;
+ $data = $1;
if ($data =~ tr/v/v/) {
$col = $cur;
$direction = -1;
@@ -199,7 +199,7 @@ sub sort_tables {
push @out, shift @orig while @orig and $orig[0] =~ /^\|/;
next;
}
- $numeric = 1 if $1 =~ tr/n/n/;
+ $numeric = 1 if $data =~ tr/n/n/;
my @rows;
push @rows, [split /\s*\|\s*/, shift(@orig), -1]
while @orig and $orig[0] =~ /^\|/;