https://bz.apache.org/bugzilla/show_bug.cgi?id=61516

            Bug ID: 61516
           Summary: problem adjusting cell reference in formula to zeroth
                    row
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: drjovano...@gmail.com
  Target Milestone: ---

Created attachment 35324
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35324&action=edit
test cases which demonstrate issue

I am trying to implement cell copying algorithm for spreadsheet editor, and I
ran into a problem with a test case.
Consider following scenario : there is formula "A1-A2" in cell C3. Algorithm
has to copy C3 to C2. Formula should become A0-A1, that is #REF!-A1.

I use FormulaShifter class for adjusting of cell references, and I initialise
it with createForRowCopy() method, setting both firstMovedRowIndex and
lastMovedRowIndex parameters to 2, since that's index of row where C3 resides.
Method adjustFormula() converts A1 to just A.

I have tried a few other possibilities for initialisation of FormulaShifter
instance (since there is no documentation, and I am not really sure how those
parameters affect FormulaShifter), but all of them fail.

So, if this is not a bug in FormulaShifter, please tell me what is correct way
to initialise it. And also what is generally idea with ShiftMode.RowCopy value,
that is, in what use cases should I use it.

(Source code resides in attached file.)

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

Reply via email to