Commit Graph

1591 Commits

Author SHA1 Message Date
Adrien Crivelli 5df66809bc
Workaround for RTD search
For details, see https://github.com/rtfd/readthedocs.org/issues/1487

FIX #153
2017-05-05 11:56:18 +02:00
Adrien Crivelli a80c680bc0
Document hyperlinks support 2017-04-26 16:41:23 +09:00
Adrien Crivelli 2ad559639e
Use PHP 7.0 for code coverage
Hopefully this will avoid the frequent core dump
seen on Travis.
2017-04-21 17:15:42 +09:00
Adrien Crivelli 870d8640f5
Enforce writer parts parent to be concrete writer
We used to type hint against IWriter for writer part parent, but this
was not respected in writer part who often coded against the implementation
instead of the interface. With this change we make it a requirement for
writer parts to use their respective writer implementation instead of an
interface. This give legitimate access to all `BaseWriter` methods amongst
other things.
2017-04-21 14:46:17 +09:00
Markus Lanthaler 3ee9cc5ce6
Infer CSV delimiter if it hasn't been set explicitly
Closes #141
2017-04-20 17:02:03 +09:00
Adrien Crivelli 0bd3a9c60a
HHVM compatibility fix 2017-04-16 16:20:33 +09:00
Adrien Crivelli a06533f766
Upgrade to Precise on Travis
This is an attempt to get rid of segfault during code coverage,
and at the same get the latest hhvm that may pass our tests.
2017-04-16 15:33:59 +09:00
Adrien Crivelli 75d3bdb016
Declare arguments as required when they are
Closes #110
2017-04-16 14:25:28 +09:00
Adrien Crivelli 06ca8f9b04
Leverage type hinting to assert array parameters 2017-04-16 14:25:28 +09:00
Adrien Crivelli 033a4bdad5
Remove default values for function that should not have any default
Having default values made it harder for end-user to figure out whether
it the arguement had to be supplied or not. Ommitting the argument may
lead to hard to debug issues, and is overall not a good idea.

Closes #110
2017-04-16 14:25:28 +09:00
Ivan Bragin 67581a0dd5 Fallback from iconv to mbstring for encoding convertion
In some exotic environnement (IBM AIX) it may happens that `//TRANSLIT` is not supported. In that case iconv would return false. We can easily identify the case and fallback on mbstring instead. That should give correct result.

Closes #135
Closes #136
2017-04-14 20:54:37 +09:00
simivar 8fd1825d39 Throw exception in XLS with columns or rows overflow (#138)
This is a hard limit of the BIFF format that cannot be worked around,
so it is best to throw exceptions than silently discard data or generate
corrupted files.
2017-04-14 20:45:53 +09:00
Adrien Crivelli bd9eb19593
Split changelog not to confuse version numbers 2017-04-14 17:38:40 +09:00
Adrien Crivelli 45e8529a7e
Remove mention of bug in SQLite3
Since the refactoring towards PSR-16 it is very unlikely that the bug
still exists.
2017-04-14 17:27:54 +09:00
Adrien Crivelli fd9c925a7b
Refactor CachedObjectStorage to PSR-16
This drop a lot of non-core features code and delegate their maintainance
to third parties. Also it open the door to any missing implementation
out of the box, such as Redis for the moment.

Finally this consistently enforce a constraint where there can be one and
only one active cell at any point in time in code. This used to be true for
non-default implementation of cache, but it was not true for default
implementation where all cells were kept in-memory and thus were never
detached from their worksheet and thus were all kept functionnal at any
point in time.

This inconsistency of behavior between in-memory and off-memory could
lead to bugs when changing cache system if the end-user code was badly
written. Now end-user will never be able to write buggy code in the first
place, avoiding future headache when introducing caching.

Closes #3
2017-04-14 16:56:27 +09:00
Adrien Crivelli 2d630fbbb9
Document non-available data validation support 2017-04-12 13:25:37 +09:00
Adrien Crivelli 969baa1122
Document data validation support 2017-04-12 12:59:00 +09:00
Adrien Crivelli c2b38b0ee0
Error style of data validation was incorrectly written to Xls
We use to write the wrong property to file, leading to a warning
in PHP 7.1 since the `switch` never matched anything and the variable
was left as a string instead of as an int.

Closes https://github.com/PHPOffice/PHPExcel/issues/1110
2017-04-12 12:40:28 +09:00
Adrien Crivelli 714dc29890
Document macro support 2017-04-04 19:31:58 +09:00
Kurounin b01671213a
Removed double un-escaping when reading CSV
Removed "unescape enclosure functionality", since the unescaping is already handled by fgetcsv,
and performing the unescaping again would actually result int the text from the cell being read wrong.

As an example try parsing the folowing CSV:

```
"<img alt="""" src=""http://example.com/image.jpg"" />"
```

With the additional unescaping it would have ended up as:

```
<img alt=" src="http://example.com/image.jpg" />
```

instead of the correct:
```
<img alt="" src="http://example.com/image.jpg" />
```

Fixes https://github.com/PHPOffice/PHPExcel/pull/1171
2017-04-03 11:57:10 +09:00
Adrien Crivelli b7b10612ab
Re-enable unit tests that should work again now 2017-04-01 14:17:53 +09:00
Paolo Agostinetto fd83c191ea MATCH function behavior when third parameter is equal to 1 or -1
Fixes #51 
Closes #122
2017-04-01 12:36:02 +09:00
Galkin Ivan 7fd5eefe04 Add empty cell condition for conditional formatting (#128) 2017-04-01 12:12:31 +09:00
Roland Häder 134652a045 updated libraries with `composer update` #124 (#125)
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-29 18:59:07 +09:00
tsmsogn 0f0de914f4 Fix sample which does't work (#123) 2017-03-24 22:09:32 +09:00
Adrien Crivelli 2e24a1e1b4
Fix PDF samples 2017-03-24 19:46:19 +09:00
Gabriel Machado 4b75f7d469 Fix Quadratic equation solver example (#120) 2017-03-17 00:24:43 +09:00
Adrien Crivelli 8e8d0e4a30
Improve doc formatting with backticks 2017-03-13 14:57:37 +09:00
Adrien Crivelli fec674e797
Typo 2017-03-13 12:33:24 +09:00
Adrien Crivelli b8adec4938
Update documentation with composer instructions
And split first page into several topics to improve sidebar navigation

Closes #114
2017-03-13 12:30:26 +09:00
Paolo Agostinetto 9767112b23 Settings: deleted libxml_disable_entity_loader() calls (#113)
Settings: deleted libxml_disable_entity_loader() calls since they're not necessary.
Prevent setLibXmlLoaderOptions() and getLibXmlLoaderOptions() to call the libxml_disable_entity_loader() function which alter the global state of libxml.
See the discussion here https://github.com/PHPOffice/PhpSpreadsheet/issues/74
2017-03-12 22:00:46 +09:00
NilsRenaud de57bf722c
Split sentences for better readability
Closes https://github.com/PHPOffice/PHPExcel/pull/1147
2017-03-12 11:02:43 +09:00
Adrien Crivelli b669d48f2f
Un-deprecate `getCalculatedValue()`
Those were deprecated a long time ago in 59932b0cac
but their replacement seems to have never been added. 5 years later the
best solution is to un-deprecate them and if someday their replacement are
actually added, then we can re-deprecate them properly.

Closes #22
2017-03-11 12:16:07 +09:00
Adrien Crivelli ea5663bc00
Drop support for PclZip
Over the years PclZip became a maintenance problem. It's code base
is old and the official project seems to have died out. ZipArchive
is now more commonly available and offer an easier and more complete
API. So PclZip was dropped in order to focus our efforts on what matters.

Closes #18
2017-03-11 11:48:46 +09:00
Adrien Crivelli c5339b7302
Reformat column width section 2017-03-10 19:58:25 +09:00
Adrien Crivelli da9df0ba78
Fix internal link in documentation 2017-03-10 19:58:25 +09:00
ankitm123 f99eb8dbba Cloned worksheet updates were reflected on original (MemoryDrawing)
We need to make note of two things:

- The old code was trying to clone an objectArray, and hence was performing a shallow copy of memoryDrawing objects (the __clone magic function was not getting invoked).
Instead, if one loops over the objectArray, and then clones the individual memory drawing objects, then the __clone function for the MemoryDrawing object is invoked.

- The __clone function for memory drawing was using the clone keyword which does not deal with circular references (Since memoryDrawing object had references to worksheet object, it was encountering an infinite loop). However, serializing and unserializing objects deals with circular references pretty well. 

Fixes #92 
Closes #106
2017-03-06 22:58:19 +09:00
Adrien Crivelli 93e2204774
Document ODS supported features
This should be completed in the future.
2017-03-06 14:40:27 +09:00
Adrien Crivelli 5fce89e76b Merge pull request #108 from redokun/fix-105
Ods writer: add support for basic text styling (Fix #105)
2017-03-06 11:39:50 +09:00
Christian Schmidt 3560f11935
Replace mbStrReplace() with str_replace()
By design, UTF-8 allows any byte-oriented substring searching algorithm,
since the sequence of bytes for a character cannot occur anywhere else
([source](https://en.wikipedia.org/wiki/UTF-8#Advantages_3)).

So `str_replace()` also works for UTF-8-encoded strings, assuming that
the input strings are valid UTF-8 strings. The previous implementation
of mbStrReplace() did nothing to detect invalid strings.

Also, `str_replace()` does not support [Unicode equivalence](https://en.wikipedia.org/wiki/Unicode_equivalence),
but nor do the other `mb_string` functions, and nor does `=SUBSTITUTE()` in Excel
(tested on Excel for Mac version 15.19.1, Excel 2016 for Windows and LibreOffice 5.1).

Closes #109
2017-03-06 11:33:06 +09:00
Paolo Agostinetto 219e4e6258 Writer\Ods\Content: Set "CompatibilityMode" before and after running the tests in
order to avoid conflicts with other tests
2017-03-04 17:18:18 +01:00
Paolo Agostinetto 93b5337bda Writer\Ods\Content: Fix CS 2017-03-04 17:18:18 +01:00
Paolo Agostinetto 4efda2a512 Ods\Writer\Content: added support for xr styles (bold, italic, font family, font size, underline, bg color) 2017-03-04 17:18:18 +01:00
Paolo Agostinetto 5620510991 Writer\Ods\Content: basic unit tests 2017-03-04 17:18:18 +01:00
Paolo Agostinetto e60897ae5f Writer\Ods\Content: all variable names to camelcase 2017-03-04 17:18:18 +01:00
Paolo Agostinetto 8600e63123 Writer\Ods\Content: added docblock and removed unnecessary method parameter 2017-03-04 17:18:18 +01:00
Paolo Agostinetto 13bf3d4361 Writer\Ods\Content: making use of the "use" statement rather than explicit namespaces 2017-03-04 17:18:18 +01:00
Adrien Crivelli 85c3bd0154
Fix typo in bug number 2017-03-02 09:40:10 +09:00
Adrien Crivelli 0d1ff5b95f
Better exception message for new Excel functions
Closes https://github.com/PHPOffice/PHPExcel/issues/1136
2017-02-28 10:50:22 +09:00
Adrien Crivelli 13472e8247
Upgrade to PHP-CS-Fixer 2.1 2017-02-25 17:38:45 +09:00