Commit d54ef9d
committed
fix(IE.Excel): 修复 P0-1 DoAdjustDrawings ship-blocker 及配套清理
P0-1 [高] DoAdjustDrawings = false 恢复无 try/finally
位置: ExportHelper.AddPictures line 932-1014
风险: 任一处抛未捕获异常时, package.DoAdjustDrawings 永久卡在 false,
后续用户代码 Row.Height = X / Column.Width = X / Column.Hidden = X
静默失效 (setter 走 _worksheet._package.DoAdjustDrawings 分支)
修复: 用 try/finally 包裹原 938-1010 整段, finally 恢复 prevDoAdjust
验证: 33/33 image-related 测试通过 (含 500/1000/2000 行压力);
319/319 全套测试通过
P1-1 [中] Preallocate 估算过乘
旧: imageUrls.Count * rowCount * imageColCount (3-way 过乘)
新: rowCount * imageColCount (精确值)
实际 drawing 数 = rowCount * imageColCount, imageUrls.Count 是 unique URLs
P1-2 [低] _doNotAdjust 收紧访问
旧: protected internal (允许跨 assembly 子类访问)
新: internal (仅同 assembly, ExcelPicture 与基类同 assembly 仍可访问)
影响: 0 (vendored EPPlus 不暴露给外部继承)
参考: .claude/plans/abstract-gathering-raven.md (P0-1, P1-1, P1-2)1 parent acc01a3 commit d54ef9d
2 files changed
Lines changed: 11 additions & 3 deletions
File tree
- src
- EPPlus/EPPlus/Drawing
- Magicodes.ExporterAndImporter.Excel/Utility
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | | - | |
| 929 | + | |
930 | 930 | | |
931 | 931 | | |
| 932 | + | |
| 933 | + | |
932 | 934 | | |
933 | 935 | | |
934 | 936 | | |
| 937 | + | |
| 938 | + | |
935 | 939 | | |
936 | 940 | | |
937 | 941 | | |
| |||
1007 | 1011 | | |
1008 | 1012 | | |
1009 | 1013 | | |
1010 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1011 | 1019 | | |
1012 | 1020 | | |
1013 | 1021 | | |
| |||
0 commit comments