Commit Graph

106 Commits

Author SHA1 Message Date
Adrien Crivelli 2b7b4ddc5f
Revert "Add destructor wich will try to clean up temp file of the template"
This reverts commit e9cd17d4c7. Because
the temp file is the result of the `save()` method and it's up to the calling
code to handle the result appropriately. Or alternatively use `saveAs()` to
avoid handling it.
2022-09-20 11:05:16 +02:00
Adrien Crivelli 62444d2161
Merge pull request #2176 from maartendekeizer/cleanuptempfile
[TemplateProcessor] Clean up temp files
2022-09-17 23:21:07 +02:00
Adrien Crivelli 2bc75771cc
Use same code style as PhpSpreadsheet 2022-09-16 11:45:45 +02:00
neopheus fa84160f7f str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated" 2022-09-12 13:59:21 +02:00
neopheus 83b0bef3a8 Fix #2290 2022-09-12 12:56:45 +02:00
Adrien Crivelli 3bcd4b5370
PHP 8.1 compatibility 2022-02-17 16:37:24 +01:00
Maarten de Keizer e9cd17d4c7 Add destructor wich will try to clean up temp file of the template
processor
2022-01-04 10:35:29 +01:00
troosan 7fd0489567 fix checkstyle issues 2021-04-16 23:38:14 +02:00
Ebben Feagan 524c08bafb running composer fix 2021-04-16 15:19:55 -05:00
Ebben Feagan 94b74c27a4 when adding image to relationship list check that the generated relationship id is actually unique 2021-04-16 15:06:37 -05:00
troosan 264f1590f0 make xmlReplaceBlock public 2021-02-08 22:08:29 +01:00
troosan ca45d14511
Merge pull request #1809 from juzser/dev-master
Update the regexp to avoid catastrophic backtracking
2021-02-07 23:42:57 +01:00
troosan bf8f2ac12f
Merge pull request #1763 from TimeTonic/fixes-1750-block-with-images-inside
TemplateProcessor cloneBlock wrongly clones images
2021-02-07 22:27:40 +01:00
troosan 137238faed
Merge pull request #1967 from jsochor/develop
fix image limit
2021-02-07 22:09:34 +01:00
troosan 26e479422a
Fix formatting 2021-02-07 15:06:01 +01:00
Antoine de Troostembergh 1168789e8a fix formatting 2021-02-06 21:32:30 +01:00
dbarzin 31002fc6e8 add chart in template 2021-02-06 10:40:52 +01:00
troosan 4e87e72110
Merge pull request #1716 from enflow/allowImageClosure
Allow a closure to be passed with image replacement tags
2021-02-05 22:08:56 +01:00
troosan 8922632ead
Merge pull request #1936 from YannikFirre/patch-1
Add null check when setComplexValue is not found
2021-02-05 21:26:02 +01:00
troosan 24e46544d8
remove space 2021-02-05 21:25:21 +01:00
Libor M ea917c28da fix coverage 2021-01-10 14:06:19 +01:00
Libor M a2c8d8c2d5 \PhpOffice\Common\XMLWriter -> \PhpOffice\PhpWord\Shared\XMLWriter 2021-01-02 08:26:46 +01:00
Libor M c52686c243 \PhpOffice\Common\Text -> \PhpOffice\PhpWord\Shared\Text 2021-01-01 16:09:16 +01:00
Yannik Firre 15ee5dee05
Fix missing space after if keyword 2020-12-30 14:02:29 +01:00
troosan 31d8b547c8
Merge pull request #1992 from Adizbek/develop
Fix image stroke in libreoffice 7.x
2020-12-29 23:32:32 +01:00
Ergashev Adizbek 18e41a1c4e
Update TemplateProcessor.php 2020-12-23 16:00:06 +05:00
Johannes Sochor f7242e1250 fix image limit 2020-11-11 17:18:52 +01:00
Libor M 93978211a1 PHP 8.0 - depracated libxml_disable_entity_loader, is disabled by default 2020-10-17 15:48:39 +02:00
Yannik Firre aa7c1d0fe8
FIX - When setComplexValue is not found 2020-09-22 16:28:52 +02:00
oe.sonnh 608730531f Fix: Catastrophic Backtracking RegExp 2020-01-21 16:48:27 +07:00
oe.sonnh d965a69601 Fix: CloneBlock regexp for different regexp engine with xml line-drop 2020-01-07 13:52:13 +07:00
Aurélien Vandoorine 0945a37c61 Fixed block capture so that it would work properly with blocks to be cloned in rows 2019-12-02 08:54:45 +01:00
Aurélien Vandoorine d9ea617545 Fixes #1750 added proper block cloning to put the image size part after the #number and fixing Process call to array instead of string 2019-11-28 09:24:06 +01:00
Michel Bardelmeijer 5a68ef600b Allow a closure to be passed with image replacement tags 2019-09-09 13:49:16 +02:00
Seamus Lee 607378b8fb Ensure that entity_loader disable variable is re-set back to the original setting
Simplify the setting of libxml_disable_entity_loader
2019-03-31 08:31:49 +11:00
troosan 58a2849e38 Add reading of the settings part 2019-02-04 23:59:37 +01:00
troosan d2b0b317e0 fix scrutinizer warnings 2019-02-04 22:57:33 +01:00
troosan bc448aed6c improve code coverage 2019-02-04 21:53:19 +01:00
troosan 67f3bd369c Add methods to replace macro with ComplexType 2019-01-31 01:26:19 +01:00
troosan 1956908aa7 Merge remote-tracking branch
'geraldb-nicat/PHPWord/templateProcessingViaArray' into develop

Conflicts:
	docs/templates-processing.rst
2019-01-03 18:57:00 +01:00
troosan 23407c99dd Add unit tests 2018-12-29 22:03:01 +01:00
troosan 5057617de7 change regex instead of checking twice 2018-12-29 14:56:11 +01:00
Antonio Malatesta 7c8cfb7b8a Adding condition for document template saving using libreoffice
When  I save document template with libreoffice (in .docx format) the cloneRow with nested table doesn't work.
The problem is that the regular expression, that used for search if row is no longer part of the spanned row, was wrong: 
<w:vMerge w:val="continue" /> became <w:vMerge w:val="continue"/> without space at the closure tag.
Sorry for my English.
2018-12-29 14:50:30 +01:00
troosan a4b532083b
Merge pull request #1162 from abcdmitry/patch-2
Break the references in foreach within TemplateProcessor
2018-12-27 22:22:20 +01:00
troosan 7790b6a6b0 Pass values to replace macros with in cloneBlock 2018-12-27 22:13:48 +01:00
troosan 75620caf51 add parameter to keep backward compatibility + add test 2018-12-27 01:44:37 +01:00
troosan 1bcef04ddc Merge remote-tracking branch 'JPBetley/PHPWord/clone-block-variables' into rebase_pull_request 2018-12-27 01:29:51 +01:00
troosan 575c5531b8 replace self with static 2018-12-26 20:07:53 +01:00
troosan 6cf10b4562
Merge pull request #1161 from abcdmitry/patch-1
Get rid of duplicated code in TemplateProcessor
call static methods with static:: instead of self::
2018-12-26 20:04:18 +01:00
Maxim d5da80b56e Support adding images in Templates (#1170)
* setImageValue() + fix adding files via ZipArchive
* fix phpdoc variable name
* Changed logic that determines extension image file extension for document to depend on MIME type. This same logic is used in Element/Image.php
* support <w:t> tags with arguments
* allow setup size of image into template variable
* support of 'ratio' replace attribute + documentation
2018-12-26 14:35:21 +01:00