Add a way to set graphics in a header/footer #2018
Merged
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.
The full functionality of the VML drawing is not addressed here. However this seems to work for embedding regular images.
PR Details
Adds the ability to set header/footer graphics.
Description
This is a somewhat restricted implementation out of all the options possible. But it's enough to get the basics going, and I doubt anyone out there wants too much more than this offers -- image + width/height for scaling.
If this function is called twice, it won't "update" the existing bits, but rather just leave them around and make a new drawing / media image. I don't think there's any process to "GC" the left-overs, but it's also not completely clear what to do about this. The media object may be shared by multiple drawings / sheets that have the same image.
How Has This Been Tested
This is based on what MS Excel produces. I tried other variations but was mostly unsuccessful. I had some variations which produced a border (without using the formulas bit), and many which crashed Excel -- seems like the logic to processing these is a bit fragile. Not 100% sure what all is needed since there are a lot of permutations, but with everything I have, it seems to work OK.
Types of changes
Checklist
I wasn't too sure how to test the change, so I added an example.