poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 61474] New: [Patch] Adjusting of formulas in context of column shifting
Date Thu, 31 Aug 2017 12:37:55 GMT

            Bug ID: 61474
           Summary: [Patch] Adjusting of formulas in context of column
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: drjovanovic@gmail.com
  Target Milestone: ---

In POI there is class FormulaShifter which deals with problem of adjusting cell
references inside formulas in case of shifting or copying of rows. This works
fine, but only for rows. 
There is completely same need for reference-adjusting in the case of shifting
or copying of columns, and it is not implemented.
Algorithm for formula adjusting is pretty complex, with a lot of use cases, so
it would be good to use existing algorithm for columns, and not create an other

Solution :
I've created class CompleteFormulaShifter, as an improved version of
FormulaShifter, with following enhancements :
- it takes formula string as input, not a list of Ptgs;
- it can work in both column and row modes.
Column mode is implemented in a simple way : 
1. transpose cell references (switch column and row coordinates);
2. adjust references using existing algorithm for shifting of rows;
3. transpose new cell references back.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message