Moodle  2.2.1
http://www.collinsharper.com
OLEwriter Class Reference

Public Member Functions

 OLEwriter ($OLEfilename)
 _initialize ()
 set_size ($biffsize)
 _calculate_sizes ()
 close ()
 write ($data)
 write_header ()
 _write_big_block_depot ()
 _write_property_storage ()
 _write_pps ($name, $type, $dir, $start, $size)
 _write_padding ()

Data Fields

 $_OLEfilename
 $_filehandle
 $_tmp_filename
 $_fileclosed
 $_biffsize
 $_booksize
 $_big_blocks
 $_list_blocks
 $_root_start

Detailed Description

Definition at line 41 of file OLEwriter.php.


Member Function Documentation

Calculate various sizes needed for the OLE stream

Definition at line 185 of file OLEwriter.php.

Here is the caller graph for this function:

Check for a valid filename and store the filehandle. Filehandle "-" writes to STDOUT

Definition at line 123 of file OLEwriter.php.

Here is the caller graph for this function:

Write big block depot.

Definition at line 289 of file OLEwriter.php.

Here is the caller graph for this function:

Pad the end of the file

Definition at line 396 of file OLEwriter.php.

Here is the caller graph for this function:

_write_pps ( name,
type,
dir,
start,
size 
)

Write property sheet in property storage

Parameters:
string$namename of the property storage.
integer$typetype of the property storage.
integer$dirdir of the property storage.
integer$startstart of the property storage.
integer$sizesize of the property storage. private

Definition at line 339 of file OLEwriter.php.

Here is the caller graph for this function:

Write property storage. TODO: add summary sheets

Definition at line 319 of file OLEwriter.php.

Here is the call graph for this function:

Here is the caller graph for this function:

close ( )

Write root entry, big block list and close the filehandle. This routine is used to explicitly close the open filehandle without having to wait for DESTROY.

public

See also:
Workbook::store_OLE_file()

Definition at line 208 of file OLEwriter.php.

Here is the call graph for this function:

OLEwriter ( OLEfilename)

Class for creating an OLEwriter

Parameters:
string$OLEfilenamethe name of the file for the OLE stream

Definition at line 103 of file OLEwriter.php.

Here is the call graph for this function:

set_size ( biffsize)

Set the size of the data to be written to the OLE stream. The maximun size comes from this: $big_blocks = (109 depot block x (128 -1 marker word)

  • (1 x end words)) = 13842 $maxsize = $big_blocks * 512 bytes = 7087104

public

See also:
Workbook::store_OLE_file()
Parameters:
integer$biffsizeThe size of the data to be written to the OLE stream
Returns:
integer 1 for success

Definition at line 161 of file OLEwriter.php.

write ( data)

Write BIFF data to OLE file.

Parameters:
string$datastring of bytes to be written

Definition at line 235 of file OLEwriter.php.

Write OLE header block.

Definition at line 244 of file OLEwriter.php.

Here is the call graph for this function:


Field Documentation

$_biffsize

Definition at line 72 of file OLEwriter.php.

$_big_blocks

Definition at line 84 of file OLEwriter.php.

$_booksize

Definition at line 78 of file OLEwriter.php.

$_fileclosed

Definition at line 66 of file OLEwriter.php.

$_filehandle

Definition at line 54 of file OLEwriter.php.

$_list_blocks

Definition at line 90 of file OLEwriter.php.

$_OLEfilename

Definition at line 48 of file OLEwriter.php.

$_root_start

Definition at line 96 of file OLEwriter.php.

$_tmp_filename

Definition at line 60 of file OLEwriter.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations