Bug 63264

Summary: Conditional Format rule evaluation calculates relative references incorrectly
Product: POI Reporter: Greg Woolsey <gwoolsey>
Component: SS CommonAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.0.x-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 61652    

Description Greg Woolsey 2019-03-16 00:26:34 UTC
I apparently missed this when I implemented conditional format evaluation.  One of the test files even showed the problem, I just wasn't checking the right cells.

Issue 1, when adjusting formulas for relative references, the calculation is using the full target row/column rather than calculating an offset from the region top-left corner.

Issue 2, Excel appears to specify that if a rule applies to multiple regions, relative references are calculated from the top-left-most cell in any region, not the one containing the current target cell, as is being passed currently from the rule.
Comment 1 Greg Woolsey 2019-03-16 00:27:35 UTC
Fixing the offset calculation and passing the top-left-most region rather than the region matching the current cell fixed these cases.  I've augmented unit tests to check for them to avoid future regressions.
Comment 2 Dominik Stadler 2019-03-16 08:09:34 UTC
r1855619