Moving setTempDir to the BIFFWriter for now since Workbook and Worksheet both extend from that class
git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@241288 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c810d23f97
commit
c903d67a50
|
|
@ -84,6 +84,12 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
|
||||||
*/
|
*/
|
||||||
var $_limit;
|
var $_limit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The temporary dir for storing the OLE file
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
var $_tmp_dir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
|
|
@ -95,6 +101,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
|
||||||
$this->_data = '';
|
$this->_data = '';
|
||||||
$this->_datasize = 0;
|
$this->_datasize = 0;
|
||||||
$this->_limit = 2080;
|
$this->_limit = 2080;
|
||||||
|
$this->_tmp_dir = '';
|
||||||
// Set the byte order
|
// Set the byte order
|
||||||
$this->_setByteOrder();
|
$this->_setByteOrder();
|
||||||
}
|
}
|
||||||
|
|
@ -234,5 +241,21 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
|
||||||
|
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the temp dir used for storing the OLE file
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param string $dir The dir to be used as temp dir
|
||||||
|
* @return true if given dir is valid, false otherwise
|
||||||
|
*/
|
||||||
|
function setTempDir($dir)
|
||||||
|
{
|
||||||
|
if (is_dir($dir)) {
|
||||||
|
$this->_tmp_dir = $dir;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -159,12 +159,6 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
|
||||||
*/
|
*/
|
||||||
var $_country_code;
|
var $_country_code;
|
||||||
|
|
||||||
/**
|
|
||||||
* The temporary dir for storing the OLE file
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
var $_tmp_dir;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* number of bytes for sizeinfo of strings
|
* number of bytes for sizeinfo of strings
|
||||||
* @var integer
|
* @var integer
|
||||||
|
|
@ -207,7 +201,6 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
|
||||||
$this->_str_unique = 0;
|
$this->_str_unique = 0;
|
||||||
$this->_str_table = array();
|
$this->_str_table = array();
|
||||||
$this->_setPaletteXl97();
|
$this->_setPaletteXl97();
|
||||||
$this->_tmp_dir = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -563,22 +556,6 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the temp dir used for storing the OLE file
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string $dir The dir to be used as temp dir
|
|
||||||
* @return true if given dir is valid, false otherwise
|
|
||||||
*/
|
|
||||||
function setTempDir($dir)
|
|
||||||
{
|
|
||||||
if (is_dir($dir)) {
|
|
||||||
$this->_tmp_dir = $dir;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store the workbook in an OLE container
|
* Store the workbook in an OLE container
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,6 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr
|
||||||
//$this->ext_sheets = array();
|
//$this->ext_sheets = array();
|
||||||
$this->_filehandle = '';
|
$this->_filehandle = '';
|
||||||
$this->_using_tmpfile = true;
|
$this->_using_tmpfile = true;
|
||||||
$this->_tmp_dir = '';
|
|
||||||
//$this->fileclosed = 0;
|
//$this->fileclosed = 0;
|
||||||
//$this->offset = 0;
|
//$this->offset = 0;
|
||||||
$this->_xls_rowmax = $rowmax;
|
$this->_xls_rowmax = $rowmax;
|
||||||
|
|
@ -501,23 +500,6 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the temp dir used for storing the Excel file
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string $dir The dir to be used as temp dir
|
|
||||||
* @return true if given dir is valid, false otherwise
|
|
||||||
*/
|
|
||||||
function setTempDir($dir)
|
|
||||||
{
|
|
||||||
if (is_dir($dir)) {
|
|
||||||
$this->_tmp_dir = $dir;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add data to the beginning of the workbook (note the reverse order)
|
* Add data to the beginning of the workbook (note the reverse order)
|
||||||
* and to the end of the workbook.
|
* and to the end of the workbook.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue