What a mess! I knew why I did not want to touch this initially...
Both applications position images differently (that's at least why I found out):
- OpenOffice uses sheet-absolute coordinates for the upper left corner of the image; the lower right corner has the image width and height added, i.e. floats.
- Excel uses coordinates relative to the cell containing the upper left corner of the image. In addition they also want the coordinates of the opposite corner relative to that cell containing it.
- fpspreadsheet has the upper left corner relative to the cell, but the lower right corner floating according to the image size.
Three ways of calculation - three different results...
Regarding your test project, OO displays the image as written by fps unless you change the width of a column (or height of a row) at the left of the (above) image (in fps the image moves with the cell while in OO is does not)
The Excel size, however, differs because it requires that fps calculates the lower right image corner correctly. This in turn depends on the column widths and row heights. Here again, there are discrepancies: I introduced column widths and row heights when I was working with the old xls format which specifies column widths as "character count" and row heights as "line count" - plus some ill-defined margins. This definition was introduced into fpspreadsheet. Later, Excel switched to more conventional units, such as centimeters or points. Because of the poor documentation, both methods do not match.
I am pretty sure that this argument is correct because when I adapt column widths and row heights such that the image does not extend into a neighbor cell, the image is displayed correctly also in Excel.
So, I think what will be next is a unit system for column widths and row heights. Unless we know for sure that column widths and row heights are the same in OO and Excel we cannot expect images to be equal.