Commit Graph

89 Commits

Author SHA1 Message Date
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
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
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
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
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
f3c62b615e Merge remote-tracking branch 'upstream/develop' into fix-85 2017-02-20 21:13:03 +01:00
Paolo Agostinetto
9785f926c1 php-cs run: fixed code style for new/changed files 2017-02-20 21:05:25 +01:00
Paolo Agostinetto
a0321fd6fd Removed PhpStorm comment on top of file 2017-02-20 21:02:49 +01:00
Paolo Agostinetto
c954eddf57 Ods reader: fix sheet count and added a test for sheet names 2017-02-20 21:02:04 +01:00
Paolo Agostinetto
6d6353c0f1 Ods reader: fix reading of cells with hyperlinks 2017-02-18 20:59:14 +01:00
Paolo Agostinetto
1dba2d1766 Ods reader: tests for repeated spaces and rich text 2017-02-18 20:49:48 +01:00
Paolo Agostinetto
bcd1bc364c Ods reader: test loading of Worksheets 2017-02-18 13:55:22 +01:00
Paolo Agostinetto
3c7b2e23da Added unit tests for Ods reader 2017-02-18 13:36:08 +01:00
Adrien Crivelli
7b90bb9394
Drop checks for mbstring existence
Since mbstring is now a hard dependency enforced by composer, it is
no longer necessary to check for its presence and implement fallbacks.
2017-02-16 11:56:22 +09:00
Adrien Crivelli
6e247c30d9
Drop support for SQLite 2 because it does not exist in PHP 5.6+ anymore 2017-02-14 12:53:20 +09:00
Adrien Crivelli
9e835676a6
Update dev dependencies 2017-01-23 16:02:59 +09:00
Adrien Crivelli
fe73b2d402
Drop PHPSPREADSHEET_ROOT constant 2017-01-23 15:35:10 +09:00
Adrien Crivelli
909353ea39
Simplify bootstrap for tests 2017-01-23 15:05:41 +09:00
Adrien Crivelli
8dddf56c2e
Use proper syntax for variadic functions
This simplify code, increase readability and improve the function
signature for API users.
2017-01-23 15:01:20 +09:00
Adrien Crivelli
031af1e9d2
Standardize writers and readers name to be the format most common extension in CamelCase 2017-01-22 17:39:23 +09:00
Henrik Gemal
5a8acce94c minor fixes to unit tests (#72) 2017-01-13 12:06:00 +09:00
Adrien Crivelli
ec928d393f
Fix indentation as suggested by Scrunitizer 2017-01-05 12:26:20 +09:00
Adrien Crivelli
f0445366d2
Fix date related unit tests for 2017 2017-01-04 17:37:23 +09:00
Adrien Crivelli
56245d558e
Use ::class notation as much as possible
```
               *             ,
                           _/^\_
                          <     >
         *                 /.-.\         *
                  *        `/&\`                   *
                          ,@.*;@,
                         /_o.I %_\    *
            *           (`'--:o(_@;
                       /`;--.,__ `')             *
                      ;@`o % O,*`'`&\
                *    (`'--)_@ ;o %'()\      *
                     /`;--._`''--._O'@;
                    /&*,()~o`;-.,_ `""`)
         *          /`,@ ;+& () o*`;-';\
                   (`""--.,_0 +% @' &()\
                   /-.,_    ``''--....-'`)  *
              *    /@%;o`:;'--,.__   __.'\
                  ;*,&(); @ % &^;~`"`o;@();         *
                  /(); o^~; & ().o@*&`;&%O\
            jgs   `"="==""==,,,.,="=="==="`
               __.----.(\-''#####---...___...-----._
             '`         \)_`"""""`
                     .--' ')
                   o(  )_-\
                     `"""` `
```
2016-12-26 13:21:12 +09:00
Adrien Crivelli
8c66afe39a
Upgrade to PHP-CS-Fixer 2.0 2016-12-22 23:46:26 +09:00
Adrien Crivelli
5d3fdf4f78
Skip test on Travis because of recent PHP upgrade 2016-12-14 22:40:21 +09:00
Adrien Crivelli
c8a8fd2610
Stricter check whether file exists before reading
This should avoid issues when user submit a non-existing filename
that is wrongly identified as CSV.

Typically https://github.com/PHPOffice/PHPExcel/issues/1076 and
https://github.com/PHPOffice/PHPExcel/issues/1078 could have been
avoided.
2016-12-09 00:15:22 +09:00
mattkibbler
62345ef4da
Allow start and end date of DATEDIF function to be the same 2016-12-04 19:04:10 +09:00
Adrien Crivelli
3bd0f6f985
Fix autofilter cloning across PHP versions
Avoid indirect access variable ambiguity across PHP 5.6 and PHP 7.0
2016-12-04 16:44:40 +09:00
Matthias Van Woensel
39b8dbd0a1
Adding float cast to MOD function
If $a or $b are not strings, you can get an error that fmod needs param 1 ($a) to be of type double.
MS Excel does not fall over when you insert an empty string in MOD, so I'm guessing PHPExcel should do the same?
2016-12-04 16:12:51 +09:00
Adrien Crivelli
e6d8362fb2
Some functions were not callable because of wrong declaration 2016-12-03 14:51:04 +09:00
Adrien Crivelli
5ad6ced95c
Introduce a tool to migrate from PHPExcel to PhpSpreadsheet 2016-11-28 00:13:57 +09:00
Adrien Crivelli
e6bbc4bd25
Convert all line ending to unix style 2016-11-27 15:45:15 +09:00
Green Wang
8c58385d6c
Fix cant get right format chinese date format error
modify preg expression in NumberFormat.php

[DBNum1][$-804]yyyy"年"m"月"d"日";@
[DBNum1][$-804]yyyy"年"m"月";@
[DBNum1][$-804]m"月"d"日";@

FIX #44
2016-11-27 13:39:45 +09:00
Alexander Kurilo
408da0c17a Make HTML checks more strict 2016-11-16 22:21:30 +09:00
Alexander Kurilo
928b592c14 Add readable labels for data provider samples 2016-11-16 22:21:30 +09:00
Alexander Kurilo
2809cce298 Remove unused data from test provider data set 2016-11-16 22:21:30 +09:00
Alexander Kurilo
edb3974a0d Move XEEE test data to add data for other readers 2016-11-16 22:21:30 +09:00
Adrien Crivelli
e2e982f98a
Rename OOCalc and OpenDocument into Ods
FIX #6
2016-10-06 21:07:57 +09:00
Adrien Crivelli
39b55ded30
Rename Excel2007 into Xlsx
FIX #5
2016-10-06 20:39:10 +09:00
Adrien Crivelli
ae1b85f961
Fix code style 2016-10-02 15:21:52 +09:00