| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
$html = 1; |
| 4 |
|
| 5 |
sub GenRaw { |
| 6 |
|
| 7 |
$STOFFVL = 'Calc3.1 Calc4 Calc5 Draw3.1 Draw4 Draw5 Pres5 Text3.1 Text4 Text5'; |
| 8 |
|
| 9 |
@stoffVersionList = split(/\s+/, $STOFFVL); |
| 10 |
|
| 11 |
foreach $stoffVersion ( @stoffVersionList ) |
| 12 |
{ |
| 13 |
# remove all diff files, since they are possible outdated now |
| 14 |
$diffs = $stoffVersion . '/*.diff '.$stoffVersion . '/*/*.diff'; |
| 15 |
`rm -f $diffs`; |
| 16 |
|
| 17 |
$regrInput = $stoffVersion . '/regression.in'; |
| 18 |
$FL = `cat $regrInput`; |
| 19 |
|
| 20 |
@fileList = split(/\n/, $FL); |
| 21 |
foreach $_ ( @fileList ) |
| 22 |
{ |
| 23 |
if (!/^([GPST]):(.*)/) { |
| 24 |
print "Skip ".$_.": unknown type\n"; |
| 25 |
next; |
| 26 |
} |
| 27 |
|
| 28 |
$file=$2; |
| 29 |
$fileType=$1; |
| 30 |
|
| 31 |
$filePath = $stoffVersion . '/' . $file; |
| 32 |
`sd2raw $filePath >$filePath.raw 2>$filePath.raw`; |
| 33 |
|
| 34 |
`sdw2html $filePath >$filePath.html` if $fileType eq "T"; |
| 35 |
`sdc2csv -o $filePath.csv $filePath` if $fileType eq "S"; |
| 36 |
`sd2svg -o $filePath.svg $filePath` if ($fileType eq "G" || $fileType eq "P"); |
| 37 |
|
| 38 |
`sd2odf $filePath > $filePath.writerperfect.tmp`; |
| 39 |
`xmllint --format $filePath.writerperfect.tmp > $filePath.writerperfect`; |
| 40 |
`rm $filePath.writerperfect.tmp`; |
| 41 |
} |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
# Main function |
| 46 |
&GenRaw; |
| 47 |
|
| 48 |
1; |