summaryrefslogtreecommitdiff
blob: c94142c1ae46e3408169dd02e852372da5e09059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From e63587ddb88057cc2e403c48d2f41728ba1044ef Mon Sep 17 00:00:00 2001
From: flack <flack@contentcontrol-berlin.de>
Date: Tue, 27 Nov 2012 10:26:09 +0100
Subject: [PATCH] Fix problem where Excel files couldn't be opened in Ofccie
 2010

I haven't traced the problem, the fix is from one of the comments of http://pear.php.net/bugs/bug.php?id=19284, but for me, this reproducably fixes the issue the Excel 2010 refuses to open the files because they are corrupt
---
 OLE/PPS/Root.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OLE/PPS/Root.php b/OLE/PPS/Root.php
index 2f19ba0..387c3b3 100755
--- a/OLE/PPS/Root.php
+++ b/OLE/PPS/Root.php
@@ -620,7 +620,7 @@ function _create_header($num_sb_blocks, $num_bb_blocks, $num_pps_blocks)
       else
         fwrite($FILE, pack("V", -2));
 
-      fwrite($FILE, pack("V", 1));
+      fwrite($FILE, pack("V", $num_sb_blocks));
 
       // Extra BDList Start, Count
       if($bbd_info["blockchain_list_entries"] < $bbd_info["header_blockchain_list_entries"])