-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Writer ODS : Writer Border Style for cells #3693
Conversation
1c1f029
to
e517afe
Compare
@Progi1984 It's late here. I will try to start reviewing tomorrow. In the meantime, can you add some tests to demonstrate that your change works as expected? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments, and should add tests as mentioned by @oleibman
@oleibman Can i add XML Tester like in PHPWord unit tests : for example, https://github.com/PHPOffice/PHPWord/blob/master/tests/PhpWordTests/Writer/Word2007/ElementTest.php#L109 ? |
@Progi1984 Take a look at tests/PhpSpreadsheet/Writer/Ods/ContentTest. It puts the generated Xml in a string via: $content = new Content(new Ods($workbook)); I'm not sure offhand if the results of your change will go into the xml file content.xml (in which case the code above will do) or styles.xml (in which case you'll have to tweak it a bit). |
e65bdd0
to
16144f8
Compare
@Progi1984 I agree that your test confirms that your change is working, but ... it seems unmaintainable (e.g. the unnecessary number-columns-repeated in the xml seem like a bug, and, if we fix that, your test breaks) and opaque. It is just not clear why that xml demonstrates the correctness of the change. I will let @PowerKiKi weigh in on this - if it's okay with him, it's okay with me. But, if not, what I had in mind was for you to load the xml string as a DomDocument, and then query the DomDocument (possibly using normal Dom methods or xpath) to confirm the following:
Does that sound like a test you can set up? Some tests in PhpWord Writer/Html (e.g. ElementTest) use this technique. |
@oleibman No soucis. I work on it. |
7b6ddbc
to
629b0cb
Compare
629b0cb
to
53f8860
Compare
@Progi1984 Your new test looks good (and has definitely expanded my horizons on how to use xpath). I will try to merge this over the next day or two. |
53f8860
to
db5bc8c
Compare
@oleibman I rebase the PR ;) |
Thank you for your contribution. |
@oleibman It's not the first contribution. I've been contributing since 2011. |
This is:
Checklist:
Why this change is needed?
Fixes #3690