Bug 58442 - [PATCH] Add method to in-place reorganize an AreaPtg's to be defined as upper-left and lower-right
Summary: [PATCH] Add method to in-place reorganize an AreaPtg's to be defined as upper...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks: 58348
  Show dependency tree
 
Reported: 2015-09-21 22:13 UTC by Javen O'Neal
Modified: 2015-10-31 11:18 UTC (History)
0 users



Attachments
Add sortTopLeftToBottomRight method to AreaPtg (3.48 KB, patch)
2015-09-21 22:13 UTC, Javen O'Neal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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