From 08c258ac3ea0e28ec20dd2ae02cb77cc238c59cc Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 3 Sep 2024 13:55:10 +0200 Subject: [PATCH] `phpoffice/phpspreadsheet`: Allow version 1.9 or 2.0 --- README.md | 12 ++++-------- composer.json | 2 +- docs/changes/1.1.0.md | 2 +- docs/changes/1.2.0.md | 13 +++++++++++++ mkdocs.yml | 3 ++- .../Writer/PowerPoint2007/PptCharts.php | 6 +++--- 6 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 docs/changes/1.2.0.md diff --git a/README.md b/README.md index fa3bebe85..b0a085390 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,12 @@ # ![PHPPresentation](https://raw.githubusercontent.com/mvargasmoran/PHPPresentation/develop/docs/images/PHPPresentationLogo.png "PHPPresentation") -[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppresentation/v/stable.png)](https://packagist.org/packages/phpoffice/phppresentation) -[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPPresentation/badge.svg?branch=develop)](https://coveralls.io/github/PHPOffice/PHPPresentation?branch=develop) -[![Total Downloads](https://poser.pugx.org/phpoffice/phppresentation/downloads.png)](https://packagist.org/packages/phpoffice/phppresentation) -[![License](https://poser.pugx.org/phpoffice/phppresentation/license.png)](https://packagist.org/packages/phpoffice/phppresentation) -[![BountySource](https://img.shields.io/bountysource/team/phpoffice/activity.svg)](https://www.bountysource.com/teams/phpoffice) -[![Join the chat at https://gitter.im/PHPOffice/PHPPresentation](https://img.shields.io/badge/Gitter-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPPresentation) +[![Latest Stable Version](https://poser.pugx.org/phpoffice/phppresentation/v)](https://packagist.org/packages/phpoffice/phppresentation) +[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPPresentation/badge.svg?branch=master)](https://coveralls.io/github/PHPOffice/PHPPresentation?branch=master) +[![Total Downloads](https://poser.pugx.org/phpoffice/phppresentation/downloads)](https://packagist.org/packages/phpoffice/phppresentation) +[![License](https://poser.pugx.org/phpoffice/phppresentation/license)](https://packagist.org/packages/phpoffice/phppresentation) Branch Master : [![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml) -Branch Develop : [![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml/badge.svg?branch=develop)](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml) - PHPPresentation is a library written in pure PHP that provides a set of classes to write to different presentation file formats, i.e. Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML) or OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF). PHPPresentation is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPPresentation/blob/develop/COPYING.LESSER). PHPPresentation is aimed to be a high quality software product by incorporating [continuous integration](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml) and [unit testing](https://coveralls.io/github/PHPOffice/PHPPresentation). You can learn more about PHPPresentation by reading the [Developers' Documentation](https://phpoffice.github.io/PHPPresentation) and the [API Documentation](https://phpoffice.github.io/PHPPresentation/docs/). diff --git a/composer.json b/composer.json index be83206bc..062c385db 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "ext-xml": "*", "ext-zip": "*", "phpoffice/common": "^1", - "phpoffice/phpspreadsheet": "^1.9.0" + "phpoffice/phpspreadsheet": "^1.9 || ^2.0" }, "require-dev": { "phpunit/phpunit": ">=7.0", diff --git a/docs/changes/1.1.0.md b/docs/changes/1.1.0.md index d9ee1da48..d86ef483e 100644 --- a/docs/changes/1.1.0.md +++ b/docs/changes/1.1.0.md @@ -1,4 +1,4 @@ -# 1.1.0 - WIP +# 1.1.0 ## Features diff --git a/docs/changes/1.2.0.md b/docs/changes/1.2.0.md new file mode 100644 index 000000000..b1f048265 --- /dev/null +++ b/docs/changes/1.2.0.md @@ -0,0 +1,13 @@ +# 1.2.0 + +[Full Changelog](https://github.com/PHPOffice/PHPPresentation/compare/1.1.0...1.2.0) + +## Enhancements + +- `phpoffice/phpspreadsheet`: Allow version 1.9 or 2.0 by [@Progi1984](https://github.com/Progi1984) fixing [#790](https://github.com/PHPOffice/PHPPresentation/pull/790), [#812](https://github.com/PHPOffice/PHPPresentation/pull/812) in [#816](https://github.com/PHPOffice/PHPPresentation/pull/816) + +## Bug fixes + +## Miscellaneous + +## BC Breaks diff --git a/mkdocs.yml b/mkdocs.yml index b1888ee68..831216cb1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -67,7 +67,8 @@ nav: - FAQ: 'faq.md' - Credits: 'credits.md' - Releases: - - '1.1.0 (WIP)': 'changes/1.1.0.md' + - '1.2.0 (WIP)': 'changes/1.2.0.md' + - '1.1.0': 'changes/1.1.0.md' - '1.0.0': 'changes/1.0.0.md' - '0.9.0': 'changes/0.9.0.md' - '0.8.0': 'changes/0.8.0.md' diff --git a/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php b/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php index f28fb74ad..2e1c03cdc 100644 --- a/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php +++ b/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php @@ -253,20 +253,20 @@ protected function writeSpreadsheet(PhpPresentation $presentation, Chart $chart, $seriesIndex = 0; foreach ($chart->getPlotArea()->getType()->getSeries() as $series) { // Title - $sheet->setCellValueByColumnAndRow(2 + $seriesIndex, 1, $series->getTitle()); + $sheet->setCellValue([2 + $seriesIndex, 1], $series->getTitle()); // X-axis $axisXData = array_keys($series->getValues()); $numAxisXData = count($axisXData); for ($i = 0; $i < $numAxisXData; ++$i) { - $sheet->setCellValueByColumnAndRow(1, $i + 2, $axisXData[$i]); + $sheet->setCellValue([1, $i + 2], $axisXData[$i]); } // Y-axis $axisYData = array_values($series->getValues()); $numAxisYData = count($axisYData); for ($i = 0; $i < $numAxisYData; ++$i) { - $sheet->setCellValueByColumnAndRow(2 + $seriesIndex, $i + 2, $axisYData[$i]); + $sheet->setCellValue([2 + $seriesIndex, $i + 2], $axisYData[$i]); } ++$seriesIndex;