Subversion Repositories eFlore/Applications.cel

Rev

Rev 1604 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1604 Rev 1605
Line 880... Line 880...
880
        $cv              = $this->_codepage;   // The code page
880
        $cv              = $this->_codepage;   // The code page
Line 881... Line 881...
881
 
881
 
882
        $header          = pack('vv', $record, $length);
882
        $header          = pack('vv', $record, $length);
Line 883... Line 883...
883
        $data            = pack('v',  $cv);
883
        $data            = pack('v',  $cv);
-
 
884
 
884
 
885
        $data = $header . $data;
Line 885... Line 886...
885
        $this->_append($header . $data);
886
		$this->_append($data);
886
    }
887
    }
887
 
888
 
Line 910... Line 911...
910
        $header    = pack("vv",        $record, $length);
911
        $header    = pack("vv",        $record, $length);
911
        $data      = pack("vvvvvvvvv", $xWn, $yWn, $dxWn, $dyWn,
912
        $data      = pack("vvvvvvvvv", $xWn, $yWn, $dxWn, $dyWn,
912
                                       $grbit,
913
                                       $grbit,
913
                                       $itabCur, $itabFirst,
914
                                       $itabCur, $itabFirst,
914
                                       $ctabsel, $wTabRatio);
915
                                       $ctabsel, $wTabRatio);
915
        $this->_append($header . $data);
916
        $data = $header . $data;
-
 
917
		$this->_append($data);
916
    }
918
    }
Line 917... Line 919...
917
 
919
 
918
    /**
920
    /**
919
    * Writes Excel BIFF BOUNDSHEET record.
921
    * Writes Excel BIFF BOUNDSHEET record.
Line 943... Line 945...
943
        if ($this->_BIFF_version == 0x0600) {
945
        if ($this->_BIFF_version == 0x0600) {
944
            $data      = pack("VvCC", $offset, $grbit, $cch, 0x1);
946
            $data      = pack("VvCC", $offset, $grbit, $cch, 0x1);
945
        } else {
947
        } else {
946
            $data      = pack("VvC", $offset, $grbit, $cch);
948
            $data      = pack("VvC", $offset, $grbit, $cch);
947
        }
949
        }
-
 
950
 
-
 
951
		$data = $header.$data.$sheetname;
948
        $this->_append($header.$data.$sheetname);
952
        $this->_append($data);
949
    }
953
    }
Line 950... Line 954...
950
 
954
 
951
    /**
955
    /**
952
    * Write Internal SUPBOOK record
956
    * Write Internal SUPBOOK record
Line 958... Line 962...
958
        $record    = 0x01AE;   // Record identifier
962
        $record    = 0x01AE;   // Record identifier
959
        $length    = 0x0004;   // Bytes to follow
963
        $length    = 0x0004;   // Bytes to follow
Line 960... Line 964...
960
 
964
 
961
        $header    = pack("vv", $record, $length);
965
        $header    = pack("vv", $record, $length);
962
        $data      = pack("vv", count($this->_worksheets), 0x0104);
966
        $data      = pack("vv", count($this->_worksheets), 0x0104);
-
 
967
        $data = $header . $data;
963
        $this->_append($header . $data);
968
		$this->_append($data);
Line 964... Line 969...
964
    }
969
    }
965
 
970
 
966
    /**
971
    /**
Line 980... Line 985...
980
        $header           = pack("vv",  $record, $length);
985
        $header           = pack("vv",  $record, $length);
981
        $data             = pack('v', $total_references);
986
        $data             = pack('v', $total_references);
982
        for ($i = 0; $i < $total_references; $i++) {
987
        for ($i = 0; $i < $total_references; $i++) {
983
            $data .= $this->_parser->_references[$i];
988
            $data .= $this->_parser->_references[$i];
984
        }
989
        }
985
        $this->_append($header . $data);
990
        $data = $header . $data;
-
 
991
		$this->_append($data);
986
    }
992
    }
Line 987... Line 993...
987
 
993
 
988
    /**
994
    /**
989
    * Write Excel BIFF STYLE records.
995
    * Write Excel BIFF STYLE records.
Line 999... Line 1005...
999
        $BuiltIn   = 0x00;     // Built-in style
1005
        $BuiltIn   = 0x00;     // Built-in style
1000
        $iLevel    = 0xff;     // Outline style level
1006
        $iLevel    = 0xff;     // Outline style level
Line 1001... Line 1007...
1001
 
1007
 
1002
        $header    = pack("vv",  $record, $length);
1008
        $header    = pack("vv",  $record, $length);
1003
        $data      = pack("vCC", $ixfe, $BuiltIn, $iLevel);
1009
        $data      = pack("vCC", $ixfe, $BuiltIn, $iLevel);
-
 
1010
        $data = $header . $data;
1004
        $this->_append($header . $data);
1011
		$this->_append($data);
Line 1005... Line 1012...
1005
    }
1012
    }
1006
 
1013
 
Line 1040... Line 1047...
1040
            $data      = pack("vvC", $ifmt, $cch, $encoding);
1047
            $data      = pack("vvC", $ifmt, $cch, $encoding);
1041
        } elseif ($this->_BIFF_version == 0x0500) {
1048
        } elseif ($this->_BIFF_version == 0x0500) {
1042
            $header    = pack("vv", $record, 3 + $length);
1049
            $header    = pack("vv", $record, 3 + $length);
1043
            $data      = pack("vC", $ifmt, $cch);
1050
            $data      = pack("vC", $ifmt, $cch);
1044
        }
1051
        }
-
 
1052
		$data = $header . $data . $format;
1045
        $this->_append($header . $data . $format);
1053
        $this->_append($data);
1046
    }
1054
    }
Line 1047... Line 1055...
1047
 
1055
 
1048
    /**
1056
    /**
1049
    * Write DATEMODE record to indicate the date system in use (1904 or 1900).
1057
    * Write DATEMODE record to indicate the date system in use (1904 or 1900).
Line 1057... Line 1065...
1057
 
1065
 
Line 1058... Line 1066...
1058
        $f1904     = $this->_1904;   // Flag for 1904 date system
1066
        $f1904     = $this->_1904;   // Flag for 1904 date system
1059
 
1067
 
1060
        $header    = pack("vv", $record, $length);
1068
        $header    = pack("vv", $record, $length);
-
 
1069
        $data      = pack("v", $f1904);
1061
        $data      = pack("v", $f1904);
1070
        $data = $header . $data;
Line 1062... Line 1071...
1062
        $this->_append($header . $data);
1071
		$this->_append($data);
1063
    }
1072
    }
Line 1081... Line 1090...
1081
        $record   = 0x0016;          // Record identifier
1090
        $record   = 0x0016;          // Record identifier
1082
        $length   = 0x0002;          // Number of bytes to follow
1091
        $length   = 0x0002;          // Number of bytes to follow
Line 1083... Line 1092...
1083
 
1092
 
1084
        $header   = pack("vv", $record, $length);
1093
        $header   = pack("vv", $record, $length);
1085
        $data     = pack("v",  $cxals);
1094
        $data     = pack("v",  $cxals);
-
 
1095
        $data = $header . $data;
1086
        $this->_append($header . $data);
1096
		$this->_append($data);
Line 1087... Line 1097...
1087
    }
1097
    }
1088
 
1098
 
Line 1105... Line 1115...
1105
        $cch         = strlen($sheetname);         // Length of sheet name
1115
        $cch         = strlen($sheetname);         // Length of sheet name
1106
        $rgch        = 0x03;                       // Filename encoding
1116
        $rgch        = 0x03;                       // Filename encoding
Line 1107... Line 1117...
1107
 
1117
 
1108
        $header      = pack("vv",  $record, $length);
1118
        $header      = pack("vv",  $record, $length);
1109
        $data        = pack("CC", $cch, $rgch);
1119
        $data        = pack("CC", $cch, $rgch);
-
 
1120
		$data = $header . $data . $sheetname;
1110
        $this->_append($header . $data . $sheetname);
1121
        $this->_append($data);
Line 1111... Line 1122...
1111
    }
1122
    }
1112
 
1123
 
Line 1169... Line 1180...
1169
        $data              .= pack("v", $index);
1180
        $data              .= pack("v", $index);
1170
        $data              .= pack("v", $rowmin);
1181
        $data              .= pack("v", $rowmin);
1171
        $data              .= pack("v", $rowmax);
1182
        $data              .= pack("v", $rowmax);
1172
        $data              .= pack("C", $colmin);
1183
        $data              .= pack("C", $colmin);
1173
        $data              .= pack("C", $colmax);
1184
        $data              .= pack("C", $colmax);
1174
        $this->_append($header . $data);
1185
        $data = $header . $data;
-
 
1186
		$this->_append($data);
1175
    }
1187
    }
Line 1176... Line 1188...
1176
 
1188
 
1177
 
1189
 
Line 1254... Line 1266...
1254
        $data              .= pack("v", $rowmax);
1266
        $data              .= pack("v", $rowmax);
1255
        $data              .= pack("C", 0x00);
1267
        $data              .= pack("C", 0x00);
1256
        $data              .= pack("C", 0xff);
1268
        $data              .= pack("C", 0xff);
1257
        // End of data
1269
        // End of data
1258
        $data              .= pack("C", 0x10);
1270
        $data              .= pack("C", 0x10);
1259
        $this->_append($header . $data);
1271
        $data = $header . $data;
-
 
1272
		$this->_append($data);
1260
    }
1273
    }
Line 1261... Line 1274...
1261
 
1274
 
1262
    /**
1275
    /**
1263
    * Stores the COUNTRY record for localization
1276
    * Stores the COUNTRY record for localization
Line 1270... Line 1283...
1270
        $length          = 4;         // Number of bytes to follow
1283
        $length          = 4;         // Number of bytes to follow
Line 1271... Line 1284...
1271
 
1284
 
1272
        $header = pack('vv',  $record, $length);
1285
        $header = pack('vv',  $record, $length);
1273
        /* using the same country code always for simplicity */
1286
        /* using the same country code always for simplicity */
1274
        $data = pack('vv', $this->_country_code, $this->_country_code);
1287
        $data = pack('vv', $this->_country_code, $this->_country_code);
-
 
1288
        $data = $header . $data;
1275
        $this->_append($header . $data);
1289
		$this->_append($data);
Line 1276... Line 1290...
1276
    }
1290
    }
1277
 
1291
 
1278
    /**
1292
    /**
Line 1295... Line 1309...
1295
                $data .= pack("C",$byte);
1309
                $data .= pack("C",$byte);
1296
            }
1310
            }
1297
        }
1311
        }
Line 1298... Line 1312...
1298
 
1312
 
1299
        $header = pack("vvv",  $record, $length, $ccv);
1313
        $header = pack("vvv",  $record, $length, $ccv);
-
 
1314
        $data = $header . $data;
1300
        $this->_append($header . $data);
1315
		$this->_append($data);
Line 1301... Line 1316...
1301
    }
1316
    }
1302
 
1317
 
1303
    /**
1318
    /**
Line 1486... Line 1501...
1486
 
1501
 
1487
 
1502
 
1488
        // Write the SST block header information
1503
        // Write the SST block header information
1489
        $header      = pack("vv", $record, $length);
1504
        $header      = pack("vv", $record, $length);
-
 
1505
        $data        = pack("VV", $this->_str_total, $this->_str_unique);
Line 1490... Line 1506...
1490
        $data        = pack("VV", $this->_str_total, $this->_str_unique);
1506
        $data = $header . $data;