Antoine de Troostembergh
1168789e8a
fix formatting
2021-02-06 21:32:30 +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
Libor M
36b63a107c
skip test, because php 8.0 contain internally validation
2020-12-11 12:43:15 +01:00
Michel Bardelmeijer
5a68ef600b
Allow a closure to be passed with image replacement tags
2019-09-09 13:49:16 +02:00
troosan
58a2849e38
Add reading of the settings part
2019-02-04 23:59:37 +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
481f2c7310
fix code indenting
2018-12-29 23:30:23 +01:00
troosan
23407c99dd
Add unit tests
2018-12-29 22:03:01 +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
1717bd4978
add test for cloneBlock operation
2018-12-27 00:30:04 +01:00
troosan
8ffaa1c8b7
add test to cover get TemplateProcessor::getVariables
2018-12-26 22:27:17 +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
troosan
b188ab94e1
Merge branch 'develop' into add-getVariableCount-method
2018-12-11 21:31:18 +01:00
Yurii.sio2
260bb75fc2
Fix TemplateProcessor :: fixBrokenMacros; ( #1502 )
...
* Fix TemplateProcessor :: fixBrokenMacros;
* add unit test for fixBrokenMacros
2018-12-07 23:22:04 +01:00
troosan
9f28ece4e9
Fix path to test document
2018-11-16 22:40:37 +01:00
Martin Hanzl
7eb19c8f76
add test case for issue #1253
2018-10-11 09:40:12 +02:00
troosan
aa49536e3e
Merge branch 'develop' into add-getVariableCount-method
2018-07-21 14:48:24 +02:00
troosan
e07c6559a9
adapt test
2018-07-19 00:52:22 +02:00
troosan
affccc7937
Merge branch 'improve-cloneBlock-regex' of https://github.com/nicoder/PHPWord into fix_clone_block
2018-07-17 08:03:35 +02:00
troosan
77f2b16bc1
update copyright to 2018
2018-03-08 23:52:25 +01:00
Nicolas Dermine
12ad6fa865
adapt code for php 5.3
2018-02-06 09:30:24 +01:00
Nicolas Dermine
07e97c38cd
add `getVariableCount` method to `TemplateProcessor`
...
returns how many times each placeholder is present in the document
almost the same code as `getVariables`
useful when cloning a block a number of times and want to replace
placeholders that are present more than once in the block
(using the `$limit` parameter of `setValue`)
2018-02-05 17:45:24 +01:00
Nicolas Dermine
4105a9aad1
improve `cloneBlock` regex
...
it wrongly matched `<w:pPr` when looking for `<w:p`
in that case the cloned block would not be valid XML,
and so the generated docx document could not be opened by Word
adding the `\b` word boundary to the regex fixes this.
the accompanying unit test failed with this message when trying to load
the generated file:
```
ErrorException: DOMDocument::loadXML(): Opening and ending tag mismatch:
p line 2 and body in Entity, line: 2
```
This might solve issues such as #681 and #664 .
2018-02-02 17:03:49 +01:00
Gabriel Caruso
ba6c03e06d
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
2017-11-09 06:36:47 -02:00
troosan
0459670a9c
Enable php-cs-fixer in build & fix resulting warnings ( #1099 )
...
* enable php 7.1 build
* upgrade to dompdf/dompdf 0.8.*
* update phpunit & hide output during tests
* run code coverage analysis on 1 build only
* Add php-cs
* Update Copyright
2017-11-04 22:44:12 +01:00
Roman Syroeshko
2bcfacfbf9
Updated copyright.
2016-07-31 12:35:08 +04:00
Roman Syroeshko
fb863cdf21
https://github.com/PHPOffice/PHPWord/issues/335 .
2016-07-30 16:02:23 +04:00
Phil Betley
f51422ad8d
add variable indexing for block cloning
...
Use the same functionality from cloneRow to index variables inside
cloned block sections
2016-06-15 14:46:07 -04:00
Roman Syroeshko
ec3c62b051
#483 . Output escaping for OOXML.
2016-06-04 20:06:37 +04:00
Roman Syroeshko
d57973693d
#618 .
2016-04-23 19:49:10 +04:00
Roman Syroeshko
a621447993
Improved coverage for `\PhpOffice\PhpWord\Element\Section` ( #665 ).
2016-01-23 21:35:04 +04:00
Roman Syroeshko
43fb23d896
Copyright update.
2015-12-05 21:26:01 +04:00
Roman Syroeshko
ef3c3b8a9d
Reorganized unit tests.
2015-11-15 13:33:05 +04:00