Bug 58442

Summary: [PATCH] Add method to in-place reorganize an AreaPtg's to be defined as upper-left and lower-right
Product: POI Reporter: Javen O'Neal <onealj>
Component: SS CommonAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: PatchAvailable
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 58348    
Attachments: Add sortTopLeftToBottomRight method to AreaPtg

Description Javen O'Neal 2015-09-21 22:13:00 UTC
Created attachment 33126 [details]
Add sortTopLeftToBottomRight method to AreaPtg

An AreaPtg refers to an area defined by the first and last row and columns. It's possible for an AreaPtg's first row to be larger than its last row, or its first column to be larger than its last column. As a convenience, AreaPtg should provide a method that will re-sort the first/last row/columns to restore top left to lower right order.

This re-ordering currently happens as part of construction of the AreaPtg, but subsequent modifications (setFirstRow, setLastCol, etc) can allow the AreaPtg's references to become inverted.

This is needed when formulas are copied or compared.

Attached patch includes unit test.
Comment 1 Javen O'Neal 2015-10-31 11:18:08 UTC
Applied code changes to trunk in r1711592.

Updated site docs in r1711595