Skip to content

Commit

Permalink
fixes iliaal#122 ExcelSheet::isLicensed() - required LibXL 3.6.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
johmue committed Mar 5, 2015
1 parent 31cc409 commit 9d7b854
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[2015-??-??] - Version 1.0.2
* Fixed bug in ExcelSheet::addPictureDim() (see issue #120)
* Fixed bug in ExcelSheet::isLicensed() (see issue #122)

[2015-02-26] - Version 1.0.1
* Added methods
Expand Down
44 changes: 22 additions & 22 deletions excel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4540,6 +4540,28 @@ EXCEL_METHOD(Sheet, setColHidden)
}
/* }}} */

/* {{{ proto long ExcelBook::sheetType(int sheet)
Returns type of sheet with specified index. */
EXCEL_METHOD(Book, sheetType)
{
zval *object = getThis();
BookHandle book;
long index;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) {
RETURN_FALSE;
}

if (index < 0) {
RETURN_FALSE;
}

BOOK_FROM_OBJECT(book, object);
RETURN_LONG(xlBookSheetType(book, index));
}
/* }}} */
#endif

/* {{{ proto bool ExcelSheet::isLicensed()
Get license status */
EXCEL_METHOD(Sheet, isLicensed)
Expand Down Expand Up @@ -4568,28 +4590,6 @@ EXCEL_METHOD(Sheet, isLicensed)
}
/* }}} */

/* {{{ proto long ExcelBook::sheetType(int sheet)
Returns type of sheet with specified index. */
EXCEL_METHOD(Book, sheetType)
{
zval *object = getThis();
BookHandle book;
long index;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) {
RETURN_FALSE;
}

if (index < 0) {
RETURN_FALSE;
}

BOOK_FROM_OBJECT(book, object);
RETURN_LONG(xlBookSheetType(book, index));
}
/* }}} */
#endif

#if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3)
# define PHP_EXCEL_ARGINFO
# else
Expand Down

0 comments on commit 9d7b854

Please sign in to comment.