From e2e982f98a4403bb9b530e6eab8a743a6fb5ff88 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Thu, 6 Oct 2016 21:07:57 +0900 Subject: [PATCH] Rename OOCalc and OpenDocument into Ods FIX #6 --- CHANGELOG.md | 2 ++ .../Examples/Reader/exampleReader03.php | 2 +- .../Examples/Reader/exampleReader05.php | 2 +- .../Examples/Reader/exampleReader06.php | 2 +- .../Examples/Reader/exampleReader07.php | 2 +- .../Examples/Reader/exampleReader08.php | 2 +- .../Examples/Reader/exampleReader09.php | 2 +- .../Examples/Reader/exampleReader10.php | 2 +- .../Examples/Reader/exampleReader11.php | 2 +- .../Examples/Reader/exampleReader12.php | 2 +- .../Examples/Reader/exampleReader17.php | 2 +- .../Examples/Reader/exampleReader18.php | 2 +- .../Examples/Reader/exampleReader19.php | 2 +- .../markdown/Overview/01-Getting-Started.md | 4 ++-- .../01-File-Formats.md | 2 +- .../04-Loading-with-a-Reader.md | 2 +- .../05-Reader-Options.md | 14 ++++++------ samples/01_Simple_download_ods.php | 4 ++-- samples/{14_Excel5.php => 14_Xls.php} | 0 .../{20_Read_OOCalc.php => 20_Read_Ods.php} | 2 +- ...PCLZip.php => 20_Read_Ods_with_PCLZip.php} | 2 +- .../{20_Read_Excel5.php => 20_Read_Xls.php} | 0 ...27_Images_excel5.php => 27_Images_Xls.php} | 0 src/PhpSpreadsheet/IOFactory.php | 4 ++-- .../Reader/{OOCalc.php => Ods.php} | 4 ++-- .../Writer/{OpenDocument.php => Ods.php} | 22 +++++++++---------- .../{OpenDocument => Ods}/Cell/Comment.php | 2 +- .../Writer/{OpenDocument => Ods}/Content.php | 2 +- .../Writer/{OpenDocument => Ods}/Meta.php | 2 +- .../Writer/{OpenDocument => Ods}/MetaInf.php | 2 +- .../Writer/{OpenDocument => Ods}/Mimetype.php | 2 +- .../Writer/{OpenDocument => Ods}/Settings.php | 2 +- .../Writer/{OpenDocument => Ods}/Styles.php | 2 +- .../{OpenDocument => Ods}/Thumbnails.php | 2 +- .../{OpenDocument => Ods}/WriterPart.php | 2 +- tests/PhpSpreadsheetTests/SampleTest.php | 2 +- 36 files changed, 54 insertions(+), 52 deletions(-) rename samples/{14_Excel5.php => 14_Xls.php} (100%) rename samples/{20_Read_OOCalc.php => 20_Read_Ods.php} (81%) rename samples/{20_Read_OOCalc_with_PCLZip.php => 20_Read_Ods_with_PCLZip.php} (88%) rename samples/{20_Read_Excel5.php => 20_Read_Xls.php} (100%) rename samples/{27_Images_excel5.php => 27_Images_Xls.php} (100%) rename src/PhpSpreadsheet/Reader/{OOCalc.php => Ods.php} (99%) rename src/PhpSpreadsheet/Writer/{OpenDocument.php => Ods.php} (88%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/Cell/Comment.php (97%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/Content.php (99%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/Meta.php (98%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/MetaInf.php (98%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/Mimetype.php (96%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/Settings.php (98%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/Styles.php (98%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/Thumbnails.php (96%) rename src/PhpSpreadsheet/Writer/{OpenDocument => Ods}/WriterPart.php (95%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea55fbe3..0c67b52a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,8 +39,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | `PHPExcel` | `PhpOffice\PhpSpreadsheet\Spreadsheet` | | `PHPExcel_Reader_Excel2007` | `PhpOffice\PhpSpreadsheet\Reader\Xlsx` | | `PHPExcel_Reader_Excel5` | `PhpOffice\PhpSpreadsheet\Reader\Xls` | +| `PHPExcel_Reader_OOcalc` | `PhpOffice\PhpSpreadsheet\Reader\Ods` | | `PHPExcel_Writer_Excel2007` | `PhpOffice\PhpSpreadsheet\Writer\Xlsx` | | `PHPExcel_Writer_Excel5` | `PhpOffice\PhpSpreadsheet\Writer\Xls` | +| `PHPExcel_Writer_OpenOffice` | `PhpOffice\PhpSpreadsheet\Writer\Ods` | - Some methods were renamed for clarity and/or consistency: diff --git a/Documentation/Examples/Reader/exampleReader03.php b/Documentation/Examples/Reader/exampleReader03.php index c698a012..39da2137 100644 --- a/Documentation/Examples/Reader/exampleReader03.php +++ b/Documentation/Examples/Reader/exampleReader03.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'SYLK'; // $inputFileType = 'Gnumeric'; // $inputFileType = 'CSV'; diff --git a/Documentation/Examples/Reader/exampleReader05.php b/Documentation/Examples/Reader/exampleReader05.php index ce8c9751..c2301c65 100644 --- a/Documentation/Examples/Reader/exampleReader05.php +++ b/Documentation/Examples/Reader/exampleReader05.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; diff --git a/Documentation/Examples/Reader/exampleReader06.php b/Documentation/Examples/Reader/exampleReader06.php index 5e475204..9f38b69a 100644 --- a/Documentation/Examples/Reader/exampleReader06.php +++ b/Documentation/Examples/Reader/exampleReader06.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; diff --git a/Documentation/Examples/Reader/exampleReader07.php b/Documentation/Examples/Reader/exampleReader07.php index b359b81f..26eeab00 100644 --- a/Documentation/Examples/Reader/exampleReader07.php +++ b/Documentation/Examples/Reader/exampleReader07.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; $sheetname = 'Data Sheet #2'; diff --git a/Documentation/Examples/Reader/exampleReader08.php b/Documentation/Examples/Reader/exampleReader08.php index 90b4dfda..882f177f 100644 --- a/Documentation/Examples/Reader/exampleReader08.php +++ b/Documentation/Examples/Reader/exampleReader08.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; $sheetnames = array('Data Sheet #1','Data Sheet #3'); diff --git a/Documentation/Examples/Reader/exampleReader09.php b/Documentation/Examples/Reader/exampleReader09.php index 3d0913d9..eba8c2dd 100644 --- a/Documentation/Examples/Reader/exampleReader09.php +++ b/Documentation/Examples/Reader/exampleReader09.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; $sheetname = 'Data Sheet #3'; diff --git a/Documentation/Examples/Reader/exampleReader10.php b/Documentation/Examples/Reader/exampleReader10.php index a722c564..3a82b6b8 100644 --- a/Documentation/Examples/Reader/exampleReader10.php +++ b/Documentation/Examples/Reader/exampleReader10.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; $sheetname = 'Data Sheet #3'; diff --git a/Documentation/Examples/Reader/exampleReader11.php b/Documentation/Examples/Reader/exampleReader11.php index 26289b29..943e8a02 100644 --- a/Documentation/Examples/Reader/exampleReader11.php +++ b/Documentation/Examples/Reader/exampleReader11.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example2.xls'; diff --git a/Documentation/Examples/Reader/exampleReader12.php b/Documentation/Examples/Reader/exampleReader12.php index d4131ca7..83d5d677 100644 --- a/Documentation/Examples/Reader/exampleReader12.php +++ b/Documentation/Examples/Reader/exampleReader12.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example2.xls'; diff --git a/Documentation/Examples/Reader/exampleReader17.php b/Documentation/Examples/Reader/exampleReader17.php index de2e2a1e..bfbedfe3 100644 --- a/Documentation/Examples/Reader/exampleReader17.php +++ b/Documentation/Examples/Reader/exampleReader17.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; diff --git a/Documentation/Examples/Reader/exampleReader18.php b/Documentation/Examples/Reader/exampleReader18.php index 9aebb0f9..2f9ac8b1 100644 --- a/Documentation/Examples/Reader/exampleReader18.php +++ b/Documentation/Examples/Reader/exampleReader18.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; diff --git a/Documentation/Examples/Reader/exampleReader19.php b/Documentation/Examples/Reader/exampleReader19.php index cfb8a14e..7c4998c7 100644 --- a/Documentation/Examples/Reader/exampleReader19.php +++ b/Documentation/Examples/Reader/exampleReader19.php @@ -29,7 +29,7 @@ include 'PHPExcel/IOFactory.php'; $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'Gnumeric'; $inputFileName = './sampleData/example1.xls'; diff --git a/Documentation/markdown/Overview/01-Getting-Started.md b/Documentation/markdown/Overview/01-Getting-Started.md index 34ea3697..464efefd 100644 --- a/Documentation/markdown/Overview/01-Getting-Started.md +++ b/Documentation/markdown/Overview/01-Getting-Started.md @@ -73,7 +73,7 @@ It is necessary to use UTF-8 encoding for all texts in PHPExcel. If the script u Make sure you meet all requirements, especially php_zip extension should be enabled. -The ZipArchive class is only required when reading or writing formats that use Zip compression (Xlsx and OOCalc). Since version 1.7.6 the PCLZip library has been bundled with PHPExcel as an alternative to the ZipArchive class. +The ZipArchive class is only required when reading or writing formats that use Zip compression (Xlsx and Ods). Since version 1.7.6 the PCLZip library has been bundled with PHPExcel as an alternative to the ZipArchive class. This can be enabled by calling: ```php @@ -85,7 +85,7 @@ You can revert to using ZipArchive by calling: ```php PHPExcel_Settings::setZipClass(PHPExcel_Settings::ZIPARCHIVE); ``` -At present, this only allows you to write Xlsx files without the need for ZipArchive (not to read Xlsx or OOCalc) +At present, this only allows you to write Xlsx files without the need for ZipArchive (not to read Xlsx or Ods) ##### Excel 2007 cannot open the file generated by PHPExcel_Writer_2007 on Windows diff --git a/Documentation/markdown/ReadingSpreadsheetFiles/01-File-Formats.md b/Documentation/markdown/ReadingSpreadsheetFiles/01-File-Formats.md index 9dde98e0..b81505a2 100644 --- a/Documentation/markdown/ReadingSpreadsheetFiles/01-File-Formats.md +++ b/Documentation/markdown/ReadingSpreadsheetFiles/01-File-Formats.md @@ -19,7 +19,7 @@ Microsoft Excel™ 2003 included options for a file format called SpreadsheetML. Microsoft Excel™ 2007 shipped with a new file format, namely Microsoft Office Open XML SpreadsheetML, and Excel 2010 extended this still further with its new features such as sparklines. These files typically have an extension of .xlsx. This format is based around a zipped collection of eXtensible Markup Language (XML) files. Microsoft Office Open XML SpreadsheetML is mostly standardized in ECMA 376 ([http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm][4]) and ISO 29500. -### OOCalc +### Ods aka Open Document Format (ODF) or OASIS, this is the OpenOffice.org XML File Format for spreadsheets. It comprises a zip archive including several components all of which are text files, most of these with markup in the eXtensible Markup Language (XML). It is the standard file format for OpenOffice.org Calc and StarCalc, and files typically have an extension of .ods. The published specification for the file format is available from the OASIS Open Office XML Format Technical Committee web page ([http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office#technical][5]). Other information is available from the OpenOffice.org XML File Format web page ([http://xml.openoffice.org/general.html][6]), part of the OpenOffice.org project. diff --git a/Documentation/markdown/ReadingSpreadsheetFiles/04-Loading-with-a-Reader.md b/Documentation/markdown/ReadingSpreadsheetFiles/04-Loading-with-a-Reader.md index a52298cb..83be909c 100644 --- a/Documentation/markdown/ReadingSpreadsheetFiles/04-Loading-with-a-Reader.md +++ b/Documentation/markdown/ReadingSpreadsheetFiles/04-Loading-with-a-Reader.md @@ -27,7 +27,7 @@ Alternatively, you can use the IO Factory's createReader() method to instantiate $inputFileType = 'Xls'; // $inputFileType = 'Xlsx'; // $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; +// $inputFileType = 'Ods'; // $inputFileType = 'SYLK'; // $inputFileType = 'Gnumeric'; // $inputFileType = 'CSV'; diff --git a/Documentation/markdown/ReadingSpreadsheetFiles/05-Reader-Options.md b/Documentation/markdown/ReadingSpreadsheetFiles/05-Reader-Options.md index a9d985d2..753f384b 100644 --- a/Documentation/markdown/ReadingSpreadsheetFiles/05-Reader-Options.md +++ b/Documentation/markdown/ReadingSpreadsheetFiles/05-Reader-Options.md @@ -30,7 +30,7 @@ Reading Only Data from a Spreadsheet File applies to Readers: Reader | Y/N |Reader | Y/N |Reader | Y/N | ----------|:---:|--------|:---:|--------------|:---:| Xlsx | YES | Xls | YES | Excel2003XML | YES | -OOCalc | YES | SYLK | NO | Gnumeric | YES | +Ods | YES | SYLK | NO | Gnumeric | YES | CSV | NO | HTML | NO ### Reading Only Named WorkSheets from a File @@ -89,7 +89,7 @@ Reading Only Named WorkSheets from a File applies to Readers: Reader | Y/N |Reader | Y/N |Reader | Y/N | ----------|:---:|--------|:---:|--------------|:---:| Xlsx | YES | Xls | YES | Excel2003XML | YES | -OOCalc | YES | SYLK | NO | Gnumeric | YES | +Ods | YES | SYLK | NO | Gnumeric | YES | CSV | NO | HTML | NO ### Reading Only Specific Columns and Rows from a File (Read Filters) @@ -218,7 +218,7 @@ Using Read Filters applies to: Reader | Y/N |Reader | Y/N |Reader | Y/N | ----------|:---:|--------|:---:|--------------|:---:| Xlsx | YES | Xls | YES | Excel2003XML | YES | -OOCalc | YES | SYLK | NO | Gnumeric | YES | +Ods | YES | SYLK | NO | Gnumeric | YES | CSV | YES | HTML | NO ### Combining Multiple Files into a Single PHPExcel Object @@ -265,7 +265,7 @@ Combining Multiple Files into a Single PHPExcel Object applies to: Reader | Y/N |Reader | Y/N |Reader | Y/N | ----------|:---:|--------|:---:|--------------|:---:| Xlsx | NO | Xls | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | YES | Gnumeric | NO | +Ods | NO | SYLK | YES | Gnumeric | NO | CSV | YES | HTML | NO ### Combining Read Filters with the setSheetIndex() method to split a large CSV file across multiple Worksheets @@ -326,7 +326,7 @@ Splitting a single loaded file across multiple worksheets applies to: Reader | Y/N |Reader | Y/N |Reader | Y/N | ----------|:---:|--------|:---:|--------------|:---:| Xlsx | NO | Xls | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | NO | Gnumeric | NO | +Ods | NO | SYLK | NO | Gnumeric | NO | CSV | YES | HTML | NO ### Pipe or Tab Separated Value Files @@ -358,7 +358,7 @@ Setting CSV delimiter applies to: Reader | Y/N |Reader | Y/N |Reader | Y/N | ----------|:---:|--------|:---:|--------------|:---:| Xlsx | NO | Xls | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | NO | Gnumeric | NO | +Ods | NO | SYLK | NO | Gnumeric | NO | CSV | YES | HTML | NO ### A Brief Word about the Advanced Value Binder @@ -387,6 +387,6 @@ Loading using a Value Binder applies to: Reader | Y/N |Reader | Y/N |Reader | Y/N | ----------|:---:|--------|:---:|--------------|:---:| Xlsx | NO | Xls | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | NO | Gnumeric | NO | +Ods | NO | SYLK | NO | Gnumeric | NO | CSV | YES | HTML | YES diff --git a/samples/01_Simple_download_ods.php b/samples/01_Simple_download_ods.php index ebbd28da..8e76e8cf 100644 --- a/samples/01_Simple_download_ods.php +++ b/samples/01_Simple_download_ods.php @@ -39,7 +39,7 @@ $spreadsheet->getActiveSheet()->setTitle('Simple'); // Set active sheet index to the first sheet, so Excel opens this as the first sheet $spreadsheet->setActiveSheetIndex(0); -// Redirect output to a client’s web browser (OpenDocument) +// Redirect output to a client’s web browser (Ods) header('Content-Type: application/vnd.oasis.opendocument.spreadsheet'); header('Content-Disposition: attachment;filename="01simple.ods"'); header('Cache-Control: max-age=0'); @@ -52,6 +52,6 @@ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modifie header('Cache-Control: cache, must-revalidate'); // HTTP/1.1 header('Pragma: public'); // HTTP/1.0 -$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'OpenDocument'); +$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Ods'); $writer->save('php://output'); exit; diff --git a/samples/14_Excel5.php b/samples/14_Xls.php similarity index 100% rename from samples/14_Excel5.php rename to samples/14_Xls.php diff --git a/samples/20_Read_OOCalc.php b/samples/20_Read_Ods.php similarity index 81% rename from samples/20_Read_OOCalc.php rename to samples/20_Read_Ods.php index 9dedb1ca..37f7d4f7 100644 --- a/samples/20_Read_OOCalc.php +++ b/samples/20_Read_Ods.php @@ -5,7 +5,7 @@ require __DIR__ . '/Header.php'; $filename = __DIR__ . '/templates/OOCalcTest.ods'; $callStartTime = microtime(true); $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($filename); -$helper->logRead('OOCalc', $filename, $callStartTime); +$helper->logRead('Ods', $filename, $callStartTime); // Save $helper->write($spreadsheet, __FILE__); diff --git a/samples/20_Read_OOCalc_with_PCLZip.php b/samples/20_Read_Ods_with_PCLZip.php similarity index 88% rename from samples/20_Read_OOCalc_with_PCLZip.php rename to samples/20_Read_Ods_with_PCLZip.php index 80d50299..152c91a7 100644 --- a/samples/20_Read_OOCalc_with_PCLZip.php +++ b/samples/20_Read_Ods_with_PCLZip.php @@ -8,7 +8,7 @@ require __DIR__ . '/Header.php'; $filename = __DIR__ . '/templates/OOCalcTest.ods'; $callStartTime = microtime(true); $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($filename); -$helper->logRead('OOCalc', $filename, $callStartTime); +$helper->logRead('Ods', $filename, $callStartTime); // Save $helper->write($spreadsheet, __FILE__); diff --git a/samples/20_Read_Excel5.php b/samples/20_Read_Xls.php similarity index 100% rename from samples/20_Read_Excel5.php rename to samples/20_Read_Xls.php diff --git a/samples/27_Images_excel5.php b/samples/27_Images_Xls.php similarity index 100% rename from samples/27_Images_excel5.php rename to samples/27_Images_Xls.php diff --git a/src/PhpSpreadsheet/IOFactory.php b/src/PhpSpreadsheet/IOFactory.php index 68c2a51c..cab50c04 100644 --- a/src/PhpSpreadsheet/IOFactory.php +++ b/src/PhpSpreadsheet/IOFactory.php @@ -47,7 +47,7 @@ class IOFactory 'Xlsx', 'Xls', 'Excel2003XML', - 'OOCalc', + 'Ods', 'SYLK', 'Gnumeric', 'HTML', @@ -221,7 +221,7 @@ class IOFactory break; case 'ods': // Open/Libre Offic Calc case 'ots': // Open/Libre Offic Calc Template - $extensionType = 'OOCalc'; + $extensionType = 'Ods'; break; case 'slk': $extensionType = 'SYLK'; diff --git a/src/PhpSpreadsheet/Reader/OOCalc.php b/src/PhpSpreadsheet/Reader/Ods.php similarity index 99% rename from src/PhpSpreadsheet/Reader/OOCalc.php rename to src/PhpSpreadsheet/Reader/Ods.php index 8fbece26..c5fe358d 100644 --- a/src/PhpSpreadsheet/Reader/OOCalc.php +++ b/src/PhpSpreadsheet/Reader/Ods.php @@ -27,7 +27,7 @@ use DateTimeZone; * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @version ##VERSION##, ##DATE## */ -class OOCalc extends BaseReader implements IReader +class Ods extends BaseReader implements IReader { /** * Formats @@ -37,7 +37,7 @@ class OOCalc extends BaseReader implements IReader private $styles = []; /** - * Create a new OOCalc Reader instance + * Create a new Ods Reader instance */ public function __construct() { diff --git a/src/PhpSpreadsheet/Writer/OpenDocument.php b/src/PhpSpreadsheet/Writer/Ods.php similarity index 88% rename from src/PhpSpreadsheet/Writer/OpenDocument.php rename to src/PhpSpreadsheet/Writer/Ods.php index ae393dac..9e1e48f5 100644 --- a/src/PhpSpreadsheet/Writer/OpenDocument.php +++ b/src/PhpSpreadsheet/Writer/Ods.php @@ -26,12 +26,12 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet; * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @version ##VERSION##, ##DATE## */ -class OpenDocument extends BaseWriter implements IWriter +class Ods extends BaseWriter implements IWriter { /** * Private writer parts * - * @var OpenDocument\WriterPart[] + * @var Ods\WriterPart[] */ private $writerParts = []; @@ -43,7 +43,7 @@ class OpenDocument extends BaseWriter implements IWriter private $spreadSheet; /** - * Create a new OpenDocument + * Create a new Ods * * @param \PhpOffice\PhpSpreadsheet\SpreadSheet $spreadsheet */ @@ -52,13 +52,13 @@ class OpenDocument extends BaseWriter implements IWriter $this->setSpreadsheet($spreadsheet); $writerPartsArray = [ - 'content' => \PhpOffice\PhpSpreadsheet\Writer\OpenDocument\Content::class, - 'meta' => \PhpOffice\PhpSpreadsheet\Writer\OpenDocument\Meta::class, - 'meta_inf' => \PhpOffice\PhpSpreadsheet\Writer\OpenDocument\MetaInf::class, - 'mimetype' => \PhpOffice\PhpSpreadsheet\Writer\OpenDocument\Mimetype::class, - 'settings' => \PhpOffice\PhpSpreadsheet\Writer\OpenDocument\Settings::class, - 'styles' => \PhpOffice\PhpSpreadsheet\Writer\OpenDocument\Styles::class, - 'thumbnails' => \PhpOffice\PhpSpreadsheet\Writer\OpenDocument\Thumbnails::class, + 'content' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Content::class, + 'meta' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Meta::class, + 'meta_inf' => \PhpOffice\PhpSpreadsheet\Writer\Ods\MetaInf::class, + 'mimetype' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Mimetype::class, + 'settings' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Settings::class, + 'styles' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Styles::class, + 'thumbnails' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Thumbnails::class, ]; foreach ($writerPartsArray as $writer => $class) { @@ -70,7 +70,7 @@ class OpenDocument extends BaseWriter implements IWriter * Get writer part * * @param string $pPartName Writer part name - * @return OpenDocument\WriterPart|null + * @return Ods\WriterPart|null */ public function getWriterPart($pPartName = '') { diff --git a/src/PhpSpreadsheet/Writer/OpenDocument/Cell/Comment.php b/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php similarity index 97% rename from src/PhpSpreadsheet/Writer/OpenDocument/Cell/Comment.php rename to src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php index dc57f6df..223829f6 100644 --- a/src/PhpSpreadsheet/Writer/OpenDocument/Cell/Comment.php +++ b/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php @@ -1,6 +1,6 @@