poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58637] New: Add class for cell addresses which don't have the concept of absolute/relative references or sheets
Date Mon, 23 Nov 2015 09:24:27 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58637

            Bug ID: 58637
           Summary: Add class for cell addresses which don't have the
                    concept of absolute/relative references or sheets
           Product: POI
           Version: 3.14-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: onealj@apache.org
            Blocks: 58365

The concept of a cell reference and a cell address are distinct. A cell can
identify itself with a cell address, such as CTCell.getR(). A cell address plus
a sheet address can identify a particular cell in a workbook.

A cell address does not have the concept of being (row or column) absolute or
relative, nor does it need to know the sheet that it refers to.

On the other hand, a formula (cell formula, array formula, conditional
formatting) needs the concept of absolute or relative because the formula may
be shifted and we need to know what parts of the formula should be shifted.

In a way, a cell address is just a row-absolute column-absolute cell reference
with a null sheet, printed without the dollar signs, but it seems better to
have two distinct classes for this.

Why is a new class needed?
If I have two comments anchored at the same CellReference, but one
CellReference is relative while the other is absolute, the CellReference won't
*equal* each other, even though conceptually they do (since comment anchors
don't have a concept of relative/absolute).
However, if I could return a CellAddress for the comment anchors, the equals
method on two cell comments anchored at the same location would always behave
as expected (so long as I know that the two comments are on the same sheet).

-- 
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


Mime
View raw message