r2014 - packages/libspreadsheet-parseexcel-perl/trunk/debian/patches
Niko Tyni
ntyni-guest at costa.debian.org
Thu Jan 19 20:29:54 UTC 2006
Author: ntyni-guest
Date: 2006-01-19 20:29:54 +0000 (Thu, 19 Jan 2006)
New Revision: 2014
Added:
packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/30rstring.dpatch
Log:
Actually add the rstring patch.
Added: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/30rstring.dpatch
===================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/30rstring.dpatch 2006-01-19 20:29:00 UTC (rev 2013)
+++ packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/30rstring.dpatch 2006-01-19 20:29:54 UTC (rev 2014)
@@ -0,0 +1,57 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30rstring.dpatch by Niko Tyni <ntyni at iki.fi>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handle BIFF8 UTF16 strings in the 'RSTRING' opcode too, just
+## DP: like 'STRING'. (#299870)
+
+ at DPATCH@
+diff -urNad trunk~/ParseExcel.pm trunk/ParseExcel.pm
+--- trunk~/ParseExcel.pm 2006-01-19 22:24:01.082937820 +0200
++++ trunk/ParseExcel.pm 2006-01-19 22:24:13.268868467 +0200
+@@ -628,10 +628,21 @@
+ my($oBook, $bOp, $bLen, $sWk) = @_;
+ my($iR, $iC, $iF, $iL, $sTxt);
+ ($iR, $iC, $iF, $iL) = unpack("v4", $sWk);
+- $sTxt = substr($sWk, 8, $iL);
++ my $bver = $oBook->{BIFFVersion};
++ my ($rich, $sCode);
++ if($bver == verBIFF8) {
++ my( $raBuff, @rest) = _convBIFF8String($oBook, substr($sWk, 6), 1);
++ $sTxt = $raBuff->[0];
++ $sCode = ($raBuff->[1])? 'ucs2': undef;
++ $rich = $raBuff->[2];
++ } else {
++ $sTxt = substr($sWk, 8, $iL);
++ $sCode = '_native_';
++ $rich = substr($sWk, (8+$iL)+1)
++ if (length($sWk) > (8+$iL));
++ }
+
+- #Has STRUN
+- if(length($sWk) > (8+$iL)) {
++ if($rich) {
+ _NewCell (
+ $oBook, $iR, $iC,
+ Kind => 'RString',
+@@ -639,9 +650,9 @@
+ FormatNo=> $iF,
+ Format => $oBook->{Format}[$iF],
+ Numeric => 0,
+- Code => '_native_', #undef,
++ Code => $sCode,
+ Book => $oBook,
+- Rich => substr($sWk, (8+$iL)+1),
++ Rich => $rich,
+ );
+ }
+ else {
+@@ -652,7 +663,7 @@
+ FormatNo=> $iF,
+ Format => $oBook->{Format}[$iF],
+ Numeric => 0,
+- Code => '_native_',
++ Code => $sCode,
+ Book => $oBook,
+ );
+ }
Property changes on: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/30rstring.dpatch
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-perl-cvs-commits
mailing list