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

Word2007 Writer : Fixed StrikeThrough property #2661

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Word2007 Writer : Fixed StrikeThrough property #2661

merged 1 commit into from
Aug 27, 2024

Conversation

Progi1984
Copy link
Member

@Progi1984 Progi1984 commented Aug 27, 2024

Description

Word2007 Writer : Fixed StrikeThrough property

Superseeds #2604 by @noec764

Fixes #1693
Fixes #1722

If a strikethrough style was added to a text element it never appeared in the resulting document.
Indeed, the XML generated was as follows

<w:r>
   <w:rPr>
       <w:strike w:val="1"/>
       <w:dstrike w:val="0"/>
    </w:rPr>
    <w:t xml:space="preserve">some text</w:t>
</w:r>

The statement <w:dstrike w:val="0"/> should not be present here
I figure out that the test $style->isDoubleStrikethrough() !== null is true if $style->isDoubleStrikethrough() === false
So as a text cannot be strike and doublestrike at the same time, word2007 ignores it.

Checklist:

  • My CI is 🟢
  • I have covered by unit tests my new code (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • I have updated the changelog

@coveralls
Copy link

coveralls commented Aug 27, 2024

Coverage Status

coverage: 97.04%. remained the same
when pulling 2065d00 on pr2604
into 39e806b on master.

@Progi1984 Progi1984 merged commit 89a202e into master Aug 27, 2024
13 checks passed
@Progi1984 Progi1984 deleted the pr2604 branch August 27, 2024 10:26
@Progi1984
Copy link
Member Author

Thanks @noec764 for your contribution :)

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.

Strikethrough font style in Word2007 does not work Strikethrough not working in v0.16.0
2 participants