https://bz.apache.org/bugzilla/show_bug.cgi?id=61474
Bug ID: 61474
Summary: [Patch] Adjusting of formulas in context of column
shifting
Product: POI
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
Assignee: [email protected]
Reporter: [email protected]
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
one.
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: [email protected]
For additional commands, e-mail: [email protected]