lib/write_xlsx/worksheet.rb in write_xlsx-0.70.0 vs lib/write_xlsx/worksheet.rb in write_xlsx-0.71.0

- old
+ new

@@ -5606,20 +5606,20 @@ # width # Width of object frame. # height # Height of object frame. def position_object_pixels(col_start, row_start, x1, y1, width, height) #:nodoc: # Calculate the absolute x offset of the top-left vertex. if @col_size_changed - x_abs = (1 .. col_start).inject(0) {|sum, col| sum += size_col(col)} + x_abs = (0 .. col_start-1).inject(0) {|sum, col| sum += size_col(col)} else # Optimisation for when the column widths haven't changed. x_abs = 64 * col_start end x_abs += x1 # Calculate the absolute y offset of the top-left vertex. # Store the column change to allow optimisations. if @row_size_changed - y_abs = (1 .. row_start).inject(0) {|sum, row| sum += size_row(row)} + y_abs = (0 .. row_start-1).inject(0) {|sum, row| sum += size_row(row)} else # Optimisation for when the row heights haven't changed. y_abs = 20 * row_start end y_abs += y1