madflow
7367b89384
always write rows even with no cells #492
2017-11-10 11:21:57 +01:00
Adrien Loison
8aec9ea992
Apply default row style in WorkbookManager
...
Instead of doing it in the Writer
2017-11-05 14:13:22 +01:00
Adrien Loison
3d0f108b1d
Consolidate external EntityFactory
...
All entities will now be created through a single factory (including the Writers).
Also, added a EntityFactory::createRowFromArray() to make it easier to create rows
2017-11-05 13:18:29 +01:00
Adrien Loison
2d2151ac8d
Split Writer EntityFactory into interal and external ones
2017-11-05 13:04:03 +01:00
Adrien Loison
ca5962271e
Default row style should only apply to existing cells
2017-11-05 12:17:45 +01:00
Adrien Loison
727a90fd06
Remove @api annotation
2017-11-05 02:23:26 +01:00
Adrien Loison
7274226b75
Row objects and Cell styling
...
This commit introduces Row and Cell entities, that will replace the arrays passed in previously.
It also adds support for Cell styling (instead of Row styling only).
2017-11-05 02:12:28 +01:00
Adrien Loison
b968513cb9
Fix code style
2017-09-06 00:33:43 +02:00
Adrien Loison
740fcfb8c1
Fix code before applying PHP CS Fixer
2017-09-06 00:33:43 +02:00
Adrien Loison
4ec3a21170
Random DI improvements ( #458 )
...
* Add random DI improvements
Fixing things that were previously missed
* Split InternalFactory into Manager and Helper factories
2017-08-27 01:44:20 +02:00
Adrien Loison
b7e46740ce
Refactor readers for better di ( #457 )
...
* Refactor readers to get a proper DI
Similar to what was done with writers, readers also needed to be updated to match the new way of doing things.
This commits promotes a better DI (factories, injection through constructors).
* Escapers should not be singletons
Instead, they should be proper object that can be injected where needed.
2017-08-27 00:01:17 +02:00
Adrien Loison
3bb4fd3d48
Move Sheet to Common/Entity ( #438 )
...
... and introduce a SheetManager
2017-05-30 16:49:07 +02:00
Adrien Loison
30366e6a5d
Inject ZipHelper through constructor ( #437 )
2017-05-30 15:19:05 +02:00
Adrien Loison
762dd1573a
Inject GlobalFunctionsHelper through constructor for Writers ( #436 )
2017-05-30 14:37:38 +02:00
Adrien Loison
7ec0f565fd
Rename SharedStringsHelper to SharedStringsManager ( #435 )
2017-05-30 14:11:18 +02:00
Adrien Loison
cc9a0b526b
Refactory Writer Styles to match new code organization ( #433 )
...
Decomposed old StyleHelper into StyleManager, StyleRegistry and StyleMerger.
2017-05-30 13:05:18 +02:00
Adrien Loison
238756ab6e
Move Style classes into Common folder ( #432 )
2017-05-30 00:56:50 +02:00
Adrien Loison
c4e25a168e
Move entities and managers back to Common ( #431 )
2017-05-29 23:28:10 +02:00
Adrien Loison
878c4a9c8b
Rename Factory folder to Creator ( #430 )
2017-05-29 23:10:24 +02:00
Adrien Loison
cebffbe80c
Move Cell and Options to Entity folder ( #429 )
2017-05-29 22:51:12 +02:00
Adrien Loison
69b091b37c
Move OptionManager from Common/Manager to Manager ( #428 )
2017-05-29 22:34:25 +02:00
Adrien Loison
bc17311f5f
Refactor writers for better DI ( #427 )
...
This commit is a big refactor that improves the code organization.
It focuses on how dependencies are injected into the different classes. This is now done via some factories.
Also, the code is now built around entities (data model that only exposes getters and setters), managers (used to manage an entity) and helpers (used by the managers to perform some specific tasks).
The refactoring is not fully complete, as some dependencies are still hidden...
2017-05-29 22:18:40 +02:00
Adrien Loison
a366d0d0af
Introduce an options manager for all writers ( #423 )
...
This will improve the management of options and simplify some methods' signatures.
This commit will also help moving the code to a better state regarding Dependency Injection.
2017-05-24 13:17:50 +02:00
madflow
4acd9ad087
Cell value objects ( #383 )
...
* first stab at cell objects, #182
* removed comment parameter, streamlined cell detection, more tests #182
* shorter constant names, missing isFormula() #182
* first batch of changes #182
* documentation #182
2017-05-01 12:09:24 +02:00
Adrien Loison
4a65466b61
Prevent error when close() called while writer already closed ( #402 )
2017-03-28 15:07:48 +02:00
Adrien Loison
33c9d2f2ed
Enforce sheet name uniqueness per workbook ( #397 )
...
Instead of across all workbooks (in case of multiple spreadsheets being created at the same time).
2017-03-27 17:58:06 +02:00
Adrien Loison
521f799366
[XLSX] A cell should not contain more than 32,767 characters ( #365 )
2016-11-29 15:43:38 -08:00
Adrien Loison
984c9c1f67
Improve error message when invalid sheet name set ( #364 )
...
Instead of listing all the requirements, only list the requirements that actually failed to be met.
2016-11-29 14:36:57 -08:00
Adrien Loison
e276b4378e
Fix crash when using associative array with empty row ( #354 )
2016-11-03 13:45:18 -07:00
Adrien Loison
9ce77405e0
Refactor Style::mergeWith() and StyleHelper::getStyleSectionContent() ( #346 )
2016-10-19 17:01:19 -07:00
Adrien Loison
b61323d7d2
Remove XLSX references in ODS Writer ( #337 )
2016-10-17 11:54:49 -07:00
Adrien Loison
179ab483d6
Empty rows do not need to be written for XLSX files ( #336 )
2016-10-17 11:40:52 -07:00
Adrien Loison
77178122c3
Fix output file deletion after exception thrown on write ( #328 )
...
For relative paths, it would not work as the FileSystemHelper would not allow deleting a file that's not part of its base folder.
2016-10-12 11:15:07 -07:00
Adrien Loison
23f8cc4f05
Temp files should be deleted when an exception is thrown ( #327 )
...
If an exception is thrown while writing data, instead of letting the developer handle this situation gracefully, Spout can attempt to delete all the temporary files that were created so far, as well as the output file as it won't be completed and therefore corrupted.
2016-10-11 15:08:37 -07:00
Hastegan
30aa1b87e2
Fix boolean notation in PHPDoc ( #314 )
2016-09-16 15:12:58 -07:00
Hastegan
ddb7365a79
Add a way to disable text wrapping through the api ( Fix #247 ) ( #311 )
...
* Add a way to disable text wrapping (Fix #247 )
* Fix PHPDoc boolean notation
* Fix PHPDoc param notation
2016-09-16 11:24:36 -07:00
Adrien Loison
3e0afd858f
Apply custom style to empty cells if needed ( #307 )
...
Fixes #295
If a row should be written with a custom style, the handling of empty cells should change.
Instead of being skipped entirely, empty cells will be applied the custom style, if this style has custom background color or borders.
If not, then the cell definition can still be skipped.
2016-09-07 17:04:31 -07:00
Adrien Loison
d4e57b1f0d
Add consistency using getCellXML() ( #306 )
2016-09-06 19:47:18 -07:00
Stefan
5e7a1745ac
Initial extraction of method getCellXml from addRow ( #302 )
2016-09-02 19:48:10 -07:00
madflow
277c353984
Fix #297 ( #299 )
2016-08-30 10:56:52 -07:00
madflow
ff2d54cc8d
Fix #276 , some general refinement ( #289 )
...
* Fix #276 , some general refinement
* Failing test #267
* Fixed shared border definitions across different styles #267
* Fix finding the correct borderId
2016-08-23 19:57:57 -07:00
Adrien Loison
c94694cb60
API to set default row style ( #290 )
2016-08-16 21:18:44 -07:00
madflow
584121d478
Add background-color to styles ( #211 )
...
Removed default background color, cosmetics
Remove default background color
reuse bg colors
Cosmetics
Moved reusing fills to XLSX StyleHelper
Tests and inline doc
2016-08-10 13:11:47 -07:00
madflow
7a613eed8c
Border ordering ( #273 )
...
* Fix #271
* Minor fix for quick copy+paste
* Added link to issue #271
2016-07-13 11:45:37 -07:00
Marie
b02d13cd40
Set BOM as optional on CSV writer ( #265 )
2016-07-07 15:21:41 +02:00
madflow
e30bc37448
First stab at #135 - Add borders ( #200 )
...
Fixes #135
Added border support for ODS and XLSX files.
Updated README.
2016-06-18 23:36:10 -07:00
Adrien Loison
8edd8e2401
Clear previous output when openToBrowser() called ( #243 )
...
If any character has been outputted before, the generated file will be corrupted.
2016-06-08 13:53:41 -07:00
Pavel Zyukin
70c81e809f
Add the ability to pass an array with various keys to addRows() ( #240 )
2016-06-03 08:09:37 -07:00
Adrien Loison
1d3a9f939c
Convert escapers to singletons ( #239 )
2016-05-30 13:55:21 -07:00
Adrien Loison
2ed30321b4
ODS Writer should accept associative arrays ( #232 )
2016-05-25 19:59:18 -07:00