cvs: pear /Structures_DataGrid/DataGrid/Renderer XLS.php
| From: | Andrew Nagy | Date: | Mon, 11 Apr 2005 22:11:21 +0000 |
| Subject: | cvs: pear /Structures_DataGrid/DataGrid/Renderer XLS.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-31110@lists.php.net to get a copy of this message | ||
asnagy Mon Apr 11 18:11:21 2005 EDT
Modified files:
/pear/Structures_DataGrid/DataGrid/Renderer XLS.php
Log:
Removed paging from spreadsheet render
http://cvs.php.net/diff.php/pear/Structures_DataGrid/DataGrid/Renderer/XLS.php?r1=1.17&r2=1.18&ty=u
Index: pear/Structures_DataGrid/DataGrid/Renderer/XLS.php
diff -u pear/Structures_DataGrid/DataGrid/Renderer/XLS.php:1.17
pear/Structures_DataGrid/DataGrid/Renderer/XLS.php:1.18
--- pear/Structures_DataGrid/DataGrid/Renderer/XLS.php:1.17 Thu Mar 31 13:22:29 2005
+++ pear/Structures_DataGrid/DataGrid/Renderer/XLS.php Mon Apr 11 18:11:20 2005
@@ -16,14 +16,14 @@
// | Author: Andrew Nagy <asnagy@webitecture.org> |
// +----------------------------------------------------------------------+
//
-// $Id: XLS.php,v 1.17 2005/03/31 18:22:29 asnagy Exp $
+// $Id: XLS.php,v 1.18 2005/04/11 22:11:20 asnagy Exp $
require_once 'Spreadsheet/Excel/Writer.php';
/**
* Structures_DataGrid_Renderer_XLS Class
*
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
* @author Andrew S. Nagy <asnagy@webitecture.org>
* @access public
* @package Structures_DataGrid
@@ -184,27 +184,10 @@
function _buildBody()
{
if (count($this->_dg->recordSet)) {
-
- // Determine looping values
- if ($this->_dg->page > 1) {
- $begin = ($this->_dg->page - 1) * $this->_dg->rowLimit;
- $limit = $this->_dg->page * $this->_dg->rowLimit;
- } else {
- $begin = 0;
- if ($this->_dg->rowLimit == null) {
- $limit = count($this->_dg->recordSet);
- } else {
- $limit = $this->_dg->rowLimit;
- }
- }
-
- // Begin loop
- for ($i = $begin; $i < $limit; $i++) {
+ $rowCnt = 0;
+ foreach ($this->_dg->recordSet as $row) {
$cnt = 0;
- $row = $this->_dg->recordSet[$i];
foreach ($this->_dg->columnSet as $column) {
- $rowCnt = ($i-$begin)+1;
-
// Build Content
if ($column->formatter != null) {
$content = $column->formatter($row);
@@ -222,6 +205,7 @@
$cnt++;
}
+ $rowCnt++;
}
}
}