Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Classes/PHPExcel/Shared/Excel5.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,15 @@ public static function oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offs

$width = $width + $x1 -1;
$height = $height + $y1 -1;

// Subtract the underlying cell widths to find the end cell of the image
while ($width >= self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_end))) {
$width -= self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_end));
++$col_end;
while ($width >= $colSize = self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex( $col_end++ ))) {
$width -= $colSize;
}

// Subtract the underlying cell heights to find the end cell of the image
while ($height >= self::sizeRow($sheet, $row_end + 1)) {
$height -= self::sizeRow($sheet, $row_end + 1);
++$row_end;
while ($height >= $rowSize = self::sizeRow($sheet, $row_end++ + 1)) {
$height -= $rowSize;
}

// Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell
Expand Down