|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 Common||Assignee:||POI Developers List <dev>|
|Bug Depends on:|
|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.