Commit Graph

5111 Commits

Author SHA1 Message Date
dependabot[bot] ecd6b587e9 Bump tecnickcom/tcpdf from 6.7.7 to 6.8.0
Bumps [tecnickcom/tcpdf](https://github.com/tecnickcom/TCPDF) from 6.7.7 to 6.8.0.
- [Changelog](https://github.com/tecnickcom/TCPDF/blob/main/CHANGELOG.TXT)
- [Commits](https://github.com/tecnickcom/TCPDF/compare/6.7.7...6.8.0)

---
updated-dependencies:
- dependency-name: tecnickcom/tcpdf
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-27 19:58:22 +00:00
oleibman 2297dbac15 Merge pull request #4288 from oleibman/newchglog
Prepare Change Log for Next Release
2024-12-27 06:20:38 +00:00
oleibman a89b187234 Prepare Change Log for Next Release 2024-12-26 22:17:03 -08:00
oleibman 2fc12fdc58 Prepare Changelog for New Release 3.7.0 2024-12-26 21:34:47 -08:00
oleibman 45052f88e0 Merge commit from fork 2024-12-26 16:34:48 -08:00
oleibman 700a80346b Merge commit from fork
* Validate Post Item in Convert-Online.php

* Correct Samples - Currency, Accounting, and Downloader

* Smarter Color Formatting for Currency

* Use helper->log Rather than echo in Convert-Online

Responding to comment from @PowerKiki about use of echo for error messages. I do not believe that an exception is warranted, but other scripts use helper->log for error messages, and now so will this one.
2024-12-25 19:11:31 -08:00
oleibman 687d87c4d5 Merge pull request #4279 from oleibman/currsymbol
Unexpected Charset Possible for Currency Symbol
2024-12-23 16:59:44 +00:00
oleibman f00ebdaa6c Merge branch 'master' into currsymbol 2024-12-23 08:54:43 -08:00
oleibman b8f2aa97c2 Update CHANGELOG.md 2024-12-23 08:53:31 -08:00
oleibman 12b201b0a4 Keep Trying 2024-12-23 02:49:00 -08:00
oleibman eed339fb9c Try Default Locale Rather than English 2024-12-23 00:20:16 -08:00
oleibman 81440e711e Use en_ca Rather than en_us
Installing language-pack-en does not install en_US????
2024-12-23 00:12:04 -08:00
oleibman f4c576b9d4 Add English Language Pack 2024-12-22 23:55:04 -08:00
oleibman ea9af88e49 Add Language Packs to Ubuntu Images 2024-12-22 23:45:07 -08:00
oleibman 1721aa41ad Merge pull request #4277 from oleibman/biffcover
Slight Increase in Coverage Reading BIFF8
2024-12-23 05:15:19 +00:00
oleibman c3c1aca477 Merge branch 'master' into biffcover 2024-12-22 20:58:43 -08:00
oleibman 06a6549f82 Update CHANGELOG.md 2024-12-22 20:56:50 -08:00
oleibman af07ad1026 Merge pull request #4271 from oleibman/issue4269
Add forceFullCalc Option to Xlsx Writer
2024-12-23 01:52:34 +00:00
oleibman 22c4956ee2 Merge branch 'master' into issue4269 2024-12-22 17:49:27 -08:00
oleibman c744f570c1 Update CHANGELOG.md 2024-12-22 17:48:30 -08:00
oleibman 08e2260b68 Merge pull request #4266 from oleibman/odspage
Ods Writer Master Page Name
2024-12-15 18:41:23 +00:00
oleibman ed158f20eb Update CHANGELOG.md 2024-12-15 10:39:00 -08:00
oleibman d38b5cd332 Merge branch 'master' into odspage 2024-12-15 10:32:04 -08:00
oleibman b03e10bc16 Merge pull request #4264 from oleibman/odsrepeat
Ods Writer Eliminate Padding at End of Row
2024-12-15 18:24:20 +00:00
oleibman 3dfec28516 Merge branch 'master' into odsrepeat 2024-12-15 10:21:48 -08:00
oleibman 61272f03e1 Merge pull request #4263 from oleibman/issue4261
Ods Writer Horizontal Alignment
2024-12-15 18:13:50 +00:00
oleibman b417ac416a Merge pull request #4278 from oleibman/ignorecoverage
Ignore Coverage for SimpleCache1, ZipStream2
2024-12-15 18:09:23 +00:00
oleibman 86a87e093b Unexpected Charset Possible for Currency Symbol
We do not recommend it, but users can call the Php function `setlocale` and that might affect the character used as currency symbol. A problem arises when the caller to setlocale does not specify a character set - in that case, Php will attempt to return its `localeconv()` values in a single-byte character set rather than UTF-8. This is particularly problematic for currency symbols. PhpSpreadsheet till now has accepted such a character, and that can lead to corrupt spreadsheets. It is changed to validate the currency symbol as UTF-8, and fall back to a different choice if not (e.g. EUR rather than 0x80, which is how the euro symbol is depicted in Win-1252).

An additional problem arises because Linux systems seem to return the alternate symbol with a trailing blank, but Windows systems do not. To allow callers to get a consistent result, a parameter is added to `getCurrencyCode` which will trim or not (default) the currency code.
2024-12-14 12:40:56 -08:00
oleibman d76310d57d Ignore Coverage for SimpleCache1, ZipStream2
PhpSpreadsheet will use either SimpleCache1/3 (but not both). Likewise for ZipStream2/3. However, only SimpleCache3/Zipstream3 are used while processing code coverage. Indicate this with appropriate annotations.

No executable code is changed.
2024-12-14 12:18:09 -08:00
oleibman e6d92201fe Slight Increase in Coverage Reading BIFF8
After breaking up Xls Reader (PR #4118), it is a little easier to identify uncovered code. BIFF8 had no tests involving constant arrays. This PR adds some. Most of the work is in the tests, but some source code is modernized to use things like null coercion.
2024-12-14 09:13:26 -08:00
oleibman eccbcce498 Merge pull request #4276 from oleibman/streamcontext
Additional Context Options for https, Restore Disabled Tests
2024-12-14 00:01:32 +00:00
oleibman 92292e58eb Simplify Accept Header 2024-12-13 14:58:27 -08:00
oleibman cc86557b77 Remove Connection: keep-alive
Unacceptable performance.
2024-12-13 09:18:02 -08:00
oleibman 62476437ab Add Context for http Requests 2024-12-13 08:22:26 -08:00
oleibman 3078ea9f87 Additional Context Options for https, Restore Disabled Tests
Additional Context Options needed, at least sometimes, to read https images.
2024-12-12 00:10:02 -08:00
oleibman ead183f023 Merge branch 'master' into issue4269 2024-12-11 06:29:42 -08:00
oleibman 1e78397ec1 Merge pull request #4273 from oleibman/disable2tests
Disable 2 Tests
2024-12-11 14:25:17 +00:00
oleibman beb0ac856a Disable 2 Tests
For the second time in recent months, some tests are failing/erring because https file_get_contents is not working on github (cannot reproduce locally on Windows or Linux). Filed an issue with Php when this first happened, and their suggested code change worked till now. If they come up with another successful code change, I will implement it and restore these tests.
2024-12-11 06:21:20 -08:00
oleibman 08c5ff071b Add forceFullCalc Option to Xlsx Writer
Fix #4269. In response to issue #456 PR #515, `forceFullCalc` was added to workbook.xml whenever `preCalculateFormulas` was set to false. It is not clear why this should have been needed; attempts to reproduce the error in the original 6.5-year-old issue are unable to reproduce it today. Nevertheless, it is, or was, there for a reason.

Today, the forceFullCalc option sets an option where formulas *might* not be recalculated when a cell used in the formula changes. I have not succeeded in finding a situation where it doesn't automatically recalculate, but it probably exists on complicated spreadsheets. To overcome this possibility, Excel offers a button which can be used to recalculate on demand. By itself, this might not be a terrible problem. However, it seems to come with the strange property that any spreadsheets opened at the same time as a forceFullCalc spreadsheet operate as if they too specified forceFullCalc. That *is* a problem, especially since users when closing a spreasheet affected in this way will be prompted to save it even when they haven't changed anything.

I am not willing to make a BC change at this time, although I might consider it in future (PR #4240). For now, I am adding a new property `forceFullCalc` with setter (no getter needed) to Xlsx Writer. That property can be `null` (default, in which case the Xml attribute is set as today), or `false` or `true` (in which case the Xml attribute will be set to the Writer attribute). I think that, when `preCalculateFormulas` is set to false, the calling application should give consideration to setting `forceFullCalc` to false as well. All other situations should just use the default.
2024-12-11 04:37:05 -08:00
oleibman b35de99c16 Merge pull request #4268 from oleibman/changelog370
Prepare Changelog For Next Release
2024-12-08 16:45:12 +00:00
oleibman c7794495e4 Prepare Changelog For Next Release 2024-12-08 08:41:03 -08:00
oleibman bce5db9987 Merge pull request #4267 from oleibman/dompdf84b
Upgrade Dompdf to 8.4-Compatible Version
3.6.0
2024-12-08 15:04:12 +00:00
oleibman e8e8b3cd26 Update CHANGELOG.md 2024-12-07 22:32:19 -08:00
oleibman 1c12d32bb5 Merge branch 'master' into dompdf84b 2024-12-07 21:14:48 -08:00
oleibman 94df5941c5 Upgrade Dompdf to 8.4-Compatible Version 2024-12-07 21:09:04 -08:00
oleibman e2ec705ee8 Ods Writer Master Page Name
PR #2850 and PR #2851 added support for Worksheet Visibility to ODS. They work well when LibreOffice is used to open the spreadsheet. However, when Excel tries to open it, it reports corruption. Strictly speaking, this is not a PhpSpreadsheet problem, but, if we can fix it, we should.

It took a while to figure out what's bothering Excel. I'm not sure that all of what follows is necessary, but it works. It appears that it wants the content.xml `style:automatic-styles` definition for the `table` (i.e. worksheet) to include a `style:master-page-name` attribute. That attribute requires a corresponding definition in the `office:master-styles` section in styles.xml, and that attribute likewise requires a definition in `office:automatic-styles`.

The new entries in styles.xml can be used to specify things like header and footer. However, the ways that these are specified is distinctly different from what Excel (and therefore PhpSpreadsheet) does. Implementing that will be a good future project. However, for now, they will remain unsupported for Ods.
2024-12-07 00:26:40 -08:00
oleibman 8654e805f4 Ods Writer Eliminate Padding at End of Row
Ods Writer currently will write something like `<table:table-cell table:number-columns-repeated="1023" />` at the end of each row. This is not necessary. In eliminating that, I have made the code a bit more efficient and (hopefully) more readable.
2024-12-05 20:14:12 -08:00
oleibman eb450c489e Ods Writer Horizontal Alignment
Fix #4261. Ods does nothing with the `indent` property of Alignment. The fix is easy, but not as easy as it should be. Excel treats indent as an int in some unspecified unit. Ods, on the other hand, specifies it as a float with unit (inches, ems, etc.). Since MS does not reveal what an indent unit is, I resorted to some experimentation. It appears that 1 unit is equal to  0.1043 inches. That is not a guaranteed relationship - the conversion might be non-linear, or it might be affected by external factors like font size. I think multiplying by 0.1043 is adequate for now, and unquestionably better than what we're currently doing (ignoring the property). If it breaks down at some point, we'll look at it again. BTW, Shared\Drawing uses some conversion values of 9525, which, reciprocating and sliding the decimal point along yields a value of 0.10498..., which is close but not close enough for me to use.

The other property used in conjunction with indent is `text-align`, and here we have not been doing the right thing. If that property has the default value (`General`), it is treated as `start` (i.e. `left` on LTR docs and presumably `right` on RTL). This will align numbers as if they were text, which does no harm (they're still usable as numbers), but is not how LibreOffice handles them by default. Ods writer is changed to omit `text-align` when it is set to `General`, and let LibreOffice choose the appropriate alignment.

These changes are for Writer only. Ods Reader support for styles remains severely lacking.
2024-12-05 20:10:42 -08:00
oleibman e23c9870b0 Merge pull request #4257 from oleibman/htmlbool
Html Reader/Writer Better Handling of Booleans
2024-12-06 04:06:41 +00:00
oleibman 40d0b8ef97 Merge branch 'master' into htmlbool 2024-12-05 20:01:59 -08:00