PowerPoint2007 writer schema validation test case#307
Merged
Conversation
Progi1984
requested changes
Mar 13, 2017
| } | ||
| } | ||
|
|
||
| $objWriter->endElement(); |
Member
There was a problem hiding this comment.
@k42b3 Why do you remove this ?
Member
There was a problem hiding this comment.
@k42b3 That generates some errors in unit tests : https://travis-ci.org/PHPOffice/PHPPresentation/jobs/192111234#L353
# Conflicts: # src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php # src/PhpPresentation/Writer/PowerPoint2007/PptSlides.php # tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptSlidesTest.php
Progi1984
approved these changes
Apr 10, 2017
Member
|
@k42b3 Could you update the Changelog.md for adding your improvements, please ? Have you another modifications in this PR ? |
Contributor
Author
|
Hi, ok I have updated the changelog. So basically it adds only the test case and changes percentage format. |
Member
|
@k42b3 Very good job. I just merged it. |
Contributor
Author
|
Thats great, thx! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, this adds a new schema test case which validates the produced XML from the
PowerPoint2007writer against the ECMA/ISO
Office Open XML File FormatsXSD. In the test (tests/PhpPresentation/Tests/Writer/PowerPoint2007/SchemaTest.php) we basically generate a pptbased on the sample files and then check whether the generated XML is valid against the schema. This should help to protect us from generating the wrong format. Of course this test covers only the elements which are used but it is a start.
The test brought up an issue: Microsoft generates percentage values formatted as 1000th of a percent
but the standard requires it to be formatted with a trailing percent sign. I have adjusted the writer so that
the values are generated accordingly to the schema.
See: https://msdn.microsoft.com/en-us/library/gg548608(v=office.12).aspx