Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Edited Unassigned: ExcelRow.Height sets wrong height to ALL drawings in v4.0.4 [15387]

$
0
0
I add some picture (Drawings) with EditAs = OneCell (default) and set size,
then change some row's height, after that, all drawing's heights are changed (changed value is equal to width size).

following is test code:
```
ExcelWorksheet worksheet = package.Workbook.Worksheets.First();
var _imagePath = outputDir.FullName + @"\image.jpg";
var _image = System.Drawing.Image.FromFile(_imagePath);

var picture = worksheet.Drawings.AddPicture("Image", _image);
picture.SetPosition(0, 0, 0, 0);
picture.SetSize(200, 40);
picture.Locked = true;
picture.EditAs = OfficeOpenXml.Drawing.eEditAs.Absolute;

Samplex.AddPicture(worksheet, "Image1", _image, 0, 0, 200, 40);
worksheet.Row(1).Height = 50;
```


In ExcelRow's Height property, there is suspicious code:
```
public double Height
{
...
set
{
var r = GetRowInternal();
if (_worksheet._package.DoAdjustDrawings)
{
var pos = _worksheet.Drawings.GetDrawingWidths();
r.Height = value;
_worksheet.Drawings.AdjustHeight(pos);
}
else
...
}
}
```
Is it not __GetDrawingWidths__ but __GetDrawingHeight__ ?
(I think this codes is based on ExcelColumn's Width property...)

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>