Seems ok to me. Submit the PR and it will be easier to understand the 
implications. Could you ensure that no existing tests are broken or removed and 
that new tests are added? I'm afraid a very high fraction of patches and PRs 
that we get break existing tests and very few of them contain adequate test 
coverage.





On Wednesday 25 January 2023 at 05:52:00 GMT, James Bench 
<[email protected]> wrote: 





Hello,

We're using OneCellAnchor's to insert images into Excel spreadsheets.

I've been able to achieve this using the reflection API to make POI's
internals accessible and writing my own implementation of
`XSSFDrawing.createPicture` but it's not pretty.

I would like to contribute a pull request to add support directly in POI
but I want to check you're happy with how I'm planning to do so:

  - In XSSFDrawing
      - create a new private createAnchor method
      - Replace all existing calls to createTwoCellAnchor with createAnchor
      - Create a new createOneCellAnchor method
      - In createAnchor check if XSSFClientAnchor has one or two cells set,
      call the appropriate createXCellAnchor method
  - In XSSFClientAnchor
      - Add a public setter for size (setSize(extx: Long, exty: Long))
      - Add a public constructor for a single cell, dx, dy, size x and size
      y (XSSFClientAnchor(int dx1, int dy1, int col1, int row1, long extx, long
      exty)

Would you be happy with this approach and are there any gotchas you can
think of that I should look out for?

Cheers,
James Bench

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to