mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-24 09:09:22 +00:00
Bugfix: (manual merge from a pull request from amironov) Work item GH-82 - PHPExcel_Worksheet::getCellCollection() may not return last cached cell
This commit is contained in:
@@ -56,7 +56,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
private function _storeData() {
|
||||
protected function _storeData() {
|
||||
if ($this->_currentCellIsDirty) {
|
||||
$this->_currentObject->detach();
|
||||
|
||||
@@ -179,6 +179,10 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
|
||||
* @return array of string
|
||||
*/
|
||||
public function getCellList() {
|
||||
if ($this->_currentObjectID !== null) {
|
||||
$this->_storeData();
|
||||
}
|
||||
|
||||
$query = "SELECT id FROM kvp_".$this->_TableName;
|
||||
$cellIdsResult = $this->_DBHandle->query($query);
|
||||
if ($cellIdsResult === false)
|
||||
@@ -200,6 +204,9 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
|
||||
* @return void
|
||||
*/
|
||||
public function copyCellCollection(PHPExcel_Worksheet $parent) {
|
||||
$this->_currentCellIsDirty;
|
||||
$this->_storeData();
|
||||
|
||||
// Get a new id for the new table name
|
||||
$tableName = str_replace('.','_',$this->_getUniqueID());
|
||||
if (!$this->_DBHandle->exec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)
|
||||
|
||||
Reference in New Issue
Block a user