Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent corrupted pptx compilation #302

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open

Conversation

igavriil
Copy link
Contributor

When a translation contains less parts (separate by tags) the remaining parts of the source, that are present in the source file, must be removed from the xml.

Until now the removal was removing the text element by itself (<a:t>) leaving other elements intact.

This resulted in the presence of some <a:r> blocks that had not content in them and should be the reason why the pptx files is considered corrupted.

With this commit instead of removeing the <a:t> element only we instead remove the surround <a:r> block all together that will lead to compilation of non corrupted files.

Problem and/or solution

How to test

Reviewer checklist

Code:

  • Change is covered by unit-tests
  • Code is well documented, well styled and is following best practices
  • Performance issues have been taken under consideration
  • Errors and other edge-cases are handled properly

PR:

  • Problem and/or solution are well-explained
  • Commits have been squashed so that each one has a clear purpose
  • Commits have a proper commit message according to TEM

When a translation contains less parts (separate by <tx> tags)
the remaining parts of the source, that are present in the source file,
must be removed from the xml.

Until now the removal was removing the text element by itself (<a:t>)
leaving other elements intact.

This resulted in the presence of some <a:r> blocks
that had not content in them and should be the reason why
the pptx files is considered corrupted.

With this commit instead of removeing the <a:t> element only we
instead remove the surround <a:r> block all together that
will lead to compilation of non corrupted files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant