Skip to content

Conversation

moromete
Copy link

If you want to enable track changes on added text you can mark it as INSERTED or DELETED by a specific user at a given time:

$text = $section->addText('Hello World!');
$text->setChanged(\PhpOffice\PhpWord\Element\ChangedElement::TYPE_INSERTED, 'Fred', time());

@Progi1984 Progi1984 added this to the 0.12.0 milestone Aug 29, 2014
@ghost ghost modified the milestones: 0.13.0, 0.12.0 Jan 3, 2015
@ghost ghost removed the Pull Request label Mar 1, 2015
@ghost ghost removed this from the v0.13.0 milestone Jul 30, 2016
@moromete
Copy link
Author

Can you please tell me why this was removed from v0.13.0 ? Is there any problem we can solve ...

@troosan
Copy link
Contributor

troosan commented Dec 13, 2017

I guess at the time they did not have the time to include in 0.13
I did not check the code yet, but this should be merged with the PhpOffice\PhpWord\Element\TrackChange type, which is currently only used to add Comments.

see possible extensions here http://datypic.com/sc/ooxml/t-w_CT_TrackChange.html

@moromete
Copy link
Author

OK I updated the ChangedElement Type to extend from TrackChange and also added the reader from docx and odt to detect tracking changes inside the document.

@troosan troosan added this to the v0.15.0 milestone Dec 22, 2017
*/
protected function readParagraph(XMLReader $xmlReader, \DOMElement $domNode, $parent, $docPart = 'document')
{
protected function readParagraph(XMLReader $xmlReader, \DOMElement $domNode, $parent, $docPart = 'document') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the { on the next line to make the build succeed.

@troosan
Copy link
Contributor

troosan commented Jan 15, 2018

@troosan troosan mentioned this pull request Jan 30, 2018
3 tasks
@troosan
Copy link
Contributor

troosan commented Feb 2, 2018

@moromete since I cannot commit on your master branch I pulled your branch into another one and modified the code a bit. I also added unit tests to cover the new code.

@troosan troosan closed this Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants