Freeze Panes takes wrong coordinates for XLSX

Fixes #322
This commit is contained in:
Adrien Crivelli 2018-01-09 00:42:30 +09:00
parent 653adf8e10
commit 25bc54f9eb
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
3 changed files with 6 additions and 5 deletions

View File

@ -9,13 +9,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Support cell comments in HTML writer and reader- [#308](https://github.com/PHPOffice/PhpSpreadsheet/issues/308)
- Support cell comments in HTML writer and reader - [#308](https://github.com/PHPOffice/PhpSpreadsheet/issues/308)
- Option to stop at a conditional styling, if it matches (only XLSX format) - [#292](https://github.com/PHPOffice/PhpSpreadsheet/pull/292)
### Fixed
- Better auto-detection of CSV separators - [#305](https://github.com/PHPOffice/PhpSpreadsheet/issues/305)
- Support for shape style ending with `;` - [#304](https://github.com/PHPOffice/PhpSpreadsheet/issues/304)
- Freeze Panes takes wrong coordinates for XLSX - [#322](https://github.com/PHPOffice/PhpSpreadsheet/issues/322)
## [1.0.0] - 2017-12-25

View File

@ -1603,8 +1603,8 @@ class Worksheet extends BIFFwriter
return;
}
$y = isset($panes[0]) ? $panes[0] : null;
$x = isset($panes[1]) ? $panes[1] : null;
$x = isset($panes[0]) ? $panes[0] : null;
$y = isset($panes[1]) ? $panes[1] : null;
$rwTop = isset($panes[2]) ? $panes[2] : null;
$colLeft = isset($panes[3]) ? $panes[3] : null;
if (count($panes) > 4) { // if Active pane was received

View File

@ -21,8 +21,8 @@ class FreezePaneTest extends AbstractFunctional
*/
public function testFreezePane($format)
{
$cellSplit = 'B2';
$topLeftCell = 'E5';
$cellSplit = 'B4';
$topLeftCell = 'E7';
$spreadsheet = new Spreadsheet();
$spreadsheet->getActiveSheet()->freezePane($cellSplit, $topLeftCell);