Skip to content

Commit

Permalink
Rename OOCalc and OpenDocument into Ods
Browse files Browse the repository at this point in the history
FIX #6
  • Loading branch information
PowerKiKi committed Oct 6, 2016
1 parent 4337de4 commit e2e982f
Show file tree
Hide file tree
Showing 36 changed files with 54 additions and 52 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader03.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'SYLK';
// $inputFileType = 'Gnumeric';
// $inputFileType = 'CSV';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader05.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader06.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader07.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #2';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader08.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetnames = array('Data Sheet #1','Data Sheet #3');
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader09.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #3';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader10.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';
$sheetname = 'Data Sheet #3';
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader11.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example2.xls';

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader12.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example2.xls';

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader17.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader18.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Examples/Reader/exampleReader19.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$inputFileType = 'Xls';
// $inputFileType = 'Xlsx';
// $inputFileType = 'Excel2003XML';
// $inputFileType = 'OOCalc';
// $inputFileType = 'Ods';
// $inputFileType = 'Gnumeric';
$inputFileName = './sampleData/example1.xls';

Expand Down
4 changes: 2 additions & 2 deletions Documentation/markdown/Overview/01-Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

4 changes: 2 additions & 2 deletions samples/01_Simple_download_ods.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// 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');
Expand All @@ -52,6 +52,6 @@
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;
File renamed without changes.
2 changes: 1 addition & 1 deletion samples/20_Read_OOCalc.php → samples/20_Read_Ods.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$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__);
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$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__);
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/PhpSpreadsheet/IOFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class IOFactory
'Xlsx',
'Xls',
'Excel2003XML',
'OOCalc',
'Ods',
'SYLK',
'Gnumeric',
'HTML',
Expand Down Expand Up @@ -221,7 +221,7 @@ public static function createReaderForFile($pFilename)
break;
case 'ods': // Open/Libre Offic Calc
case 'ots': // Open/Libre Offic Calc Template
$extensionType = 'OOCalc';
$extensionType = 'Ods';
break;
case 'slk':
$extensionType = 'SYLK';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @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
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
* @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 = [];

Expand All @@ -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
*/
Expand All @@ -52,13 +52,13 @@ public function __construct(\PhpOffice\PhpSpreadsheet\SpreadSheet $spreadsheet =
$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) {
Expand All @@ -70,7 +70,7 @@ public function __construct(\PhpOffice\PhpSpreadsheet\SpreadSheet $spreadsheet =
* Get writer part
*
* @param string $pPartName Writer part name
* @return OpenDocument\WriterPart|null
* @return Ods\WriterPart|null
*/
public function getWriterPart($pPartName = '')
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheet\Writer\OpenDocument\Cell;
namespace PhpOffice\PhpSpreadsheet\Writer\Ods\Cell;

/**
* PhpSpreadsheet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheet\Writer\OpenDocument;
namespace PhpOffice\PhpSpreadsheet\Writer\Ods;

/**
* PhpSpreadsheet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheet\Writer\OpenDocument;
namespace PhpOffice\PhpSpreadsheet\Writer\Ods;

/**
* Copyright (c) 2006 - 2015 PhpSpreadsheet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheet\Writer\OpenDocument;
namespace PhpOffice\PhpSpreadsheet\Writer\Ods;

/**
* Copyright (c) 2006 - 2015 PhpSpreadsheet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheet\Writer\OpenDocument;
namespace PhpOffice\PhpSpreadsheet\Writer\Ods;

/**
* This library is free software; you can redistribute it and/or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheet\Writer\OpenDocument;
namespace PhpOffice\PhpSpreadsheet\Writer\Ods;

/**
* Copyright (c) 2006 - 2015 PhpSpreadsheet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheet\Writer\OpenDocument;
namespace PhpOffice\PhpSpreadsheet\Writer\Ods;

/**
* Copyright (c) 2006 - 2015 PhpSpreadsheet
Expand Down
Loading

0 comments on commit e2e982f

Please sign in to comment.