From 28c02e3aaf585037f7d9035c21901844bdda91a2 Mon Sep 17 00:00:00 2001 From: nabeyama yoshihide Date: Thu, 4 Apr 2019 17:04:10 +0900 Subject: [PATCH 1/3] Fixed bug in column cell to check. The target cell for calclator the width was shifted by 1. --- col.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/col.go b/col.go index e3e057c..637f6e0 100644 --- a/col.go +++ b/col.go @@ -268,7 +268,7 @@ func (f *File) positionObjectPixels(sheet string, col, row, x1, y1, width, heigh height += y1 // Subtract the underlying cell widths to find end cell of the object. - for width >= f.getColWidth(sheet, colEnd) { + for width >= f.getColWidth(sheet, colEnd + 1) { colEnd++ width -= f.getColWidth(sheet, colEnd) } From b0acd922ef9e4874eeadd905a636ebc911b1b299 Mon Sep 17 00:00:00 2001 From: nabeyama yoshihide Date: Thu, 4 Apr 2019 17:26:26 +0900 Subject: [PATCH 2/3] Fixed bug in the calculation target cell(row). The target cell for calclator the height was shifted by 1. --- col.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/col.go b/col.go index 637f6e0..5fc7461 100644 --- a/col.go +++ b/col.go @@ -275,8 +275,8 @@ func (f *File) positionObjectPixels(sheet string, col, row, x1, y1, width, heigh // Subtract the underlying cell heights to find end cell of the object. for height >= f.getRowHeight(sheet, rowEnd) { - rowEnd++ height -= f.getRowHeight(sheet, rowEnd) + rowEnd++ } // The end vertices are whatever is left from the width and height. From 8134197b07c5aa7615d97b586d69d8ff02f19df3 Mon Sep 17 00:00:00 2001 From: nabeyama yoshihide Date: Thu, 4 Apr 2019 17:34:05 +0900 Subject: [PATCH 3/3] Adjust coding style --- col.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/col.go b/col.go index 5fc7461..3660783 100644 --- a/col.go +++ b/col.go @@ -268,7 +268,7 @@ func (f *File) positionObjectPixels(sheet string, col, row, x1, y1, width, heigh height += y1 // Subtract the underlying cell widths to find end cell of the object. - for width >= f.getColWidth(sheet, colEnd + 1) { + for width >= f.getColWidth(sheet, colEnd+1) { colEnd++ width -= f.getColWidth(sheet, colEnd) }