You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/09/11 16:57:57 UTC

DO NOT REPLY [Bug 45780] New: area references are not updated on shiftRows

https://issues.apache.org/bugzilla/show_bug.cgi?id=45780

           Summary: area references are not updated on shiftRows
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: antti.koskimaki@joinex.com


Created an attachment (id=22556)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22556)
Patch for shiftRows to update area references too

HSSFSheet.shiftRows updates single references (A1) but leaves area references
(A1:A4) intact. 

Patch fixing this attaced. I simply handled AreaPtg exactly the same way RefPtg
was handled.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45780] area references are not updated on shiftRows

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45780


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Josh Micich <jo...@gildedtree.com>  2008-09-16 13:38:44 PST ---
Fixed in svn r696038.

This fix has added (hopefully complete) support for adjusting area refs due to
row shifting.  Formulas are now adjusted in every cell in the workbook (i.e
current *and* all other sheets).  However, other (non-cell) formulas such as
defined names, data validation and conditional formats are not adjusted yet.

This turned out to be more complex than expected. There are many permutations
regarding the exact relation of the moved rows to the area ref in question, for
example whether the moved rows initially overlap or end up overlapping the area
ref, whether the overlap is complete or partial.  JUnits were updated and added
to cover this new functionality.

The Ptg translation logic was moved into a separate class, 'FormulaShifter', to
allow for easier testing and enhancement.  This class could be augmented later
to provide support for shifting columns, or perhaps any rectangular region. 
The Ptg adjusting logic should be easy to re-use for non-cell formulas if
someone ever wants to write that patch.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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