* @return mixed PEAR Excel Format object
*/
function MoodleExcelFormat2PearExcelFormat($format) {
- if ($format != 0) {
+ if (is_object($format)) {
return $format->pear_excel_format;
} else {
return 0;
*/
function _XF(&$format)
{
- if ($format != 0) {
+ if (is_object($format)) {
return($format->getXfIndex());
} else {
return(0x0F);
function writeBlank($row, $col, $format)
{
// Don't write a blank cell unless it has a format
- if ($format == 0) {
+ if (!is_object($format)) {
return(0);
}
$record = 0x01B8; // Record identifier
$length = 0x00000; // Bytes to follow
- if ($format == 0) {
+ if (!is_object($format)) {
$format = $this->_url_format;
}
$record = 0x01B8; // Record identifier
$length = 0x00000; // Bytes to follow
- if ($format == 0) {
+ if (!is_object($format)) {
$format = $this->_url_format;
}
$record = 0x01B8; // Record identifier
$length = 0x00000; // Bytes to follow
- if ($format == 0) {
+ if (!is_object($format)) {
$format = $this->_url_format;
}
$grbit |= 0x0020;
}
$grbit |= 0x0040; // fUnsynced
- if ($format) {
+ if (is_object($format)) {
$grbit |= 0x0080;
}
$grbit |= 0x0100;