Skip to content

Commit 8fff533

Browse files
authored
Merge pull request qax-os#379 from yoshhiide/bug-calc-position-object
fix calc object position for addPicture
2 parents 4e7d93a + 8134197 commit 8fff533

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

col.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,15 @@ func (f *File) positionObjectPixels(sheet string, col, row, x1, y1, width, heigh
268268
height += y1
269269

270270
// Subtract the underlying cell widths to find end cell of the object.
271-
for width >= f.getColWidth(sheet, colEnd) {
271+
for width >= f.getColWidth(sheet, colEnd+1) {
272272
colEnd++
273273
width -= f.getColWidth(sheet, colEnd)
274274
}
275275

276276
// Subtract the underlying cell heights to find end cell of the object.
277277
for height >= f.getRowHeight(sheet, rowEnd) {
278-
rowEnd++
279278
height -= f.getRowHeight(sheet, rowEnd)
279+
rowEnd++
280280
}
281281

282282
// The end vertices are whatever is left from the width and height.

0 commit comments

Comments
 (0)