Bug 10702 - [PATCH] HSSFCellStyle setRotation
Summary: [PATCH] HSSFCellStyle setRotation
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 1.5.1
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-11 16:03 UTC by Kevin Weslowski
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments
The patch to the HSSFCellStyle. Forgot to mention it will throw an IllegalArgumentException for an invalid rotaion in the setRotation call (10.43 KB, patch)
2002-09-05 10:50 UTC, Jason Height
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Weslowski 2002-07-11 16:03:22 UTC
Hello,

this function when given a parameter of
Short.parseShort("-90")
produces a cell with rotation of -77 when I open it up in Excel.
Comment 1 Andy Oliver 2002-07-21 04:08:37 UTC
what happens if you give it (short)-90?
Comment 2 Kevin Weslowski 2002-07-22 14:12:12 UTC
(short)-90 produces the same result...

also, depending on some of the types of formatting given to cells, the cells 
are not formattable in Excel.

i.e. When you select a cell in Excel that was formatted by HSSF and 
select "Format cells", nothing happens...but cells that were not touched or 
created by HSSF in the sheet work fine for "Format cells".
Comment 3 Jason Height 2002-09-05 10:49:15 UTC
Attached is a patch that will correct this. What it does is ensures that the 
HSSFCellStyle will only accept the -90 to 90 degrees for the setRotation and 
the getRotation will return the same (-90 to 90). In excel the 4th quadrant is 
stored as 91 to 180 for a rotation of -1 to -90. Odd eh??

Jason
Comment 4 Jason Height 2002-09-05 10:50:46 UTC
Created attachment 2936 [details]
The patch to the HSSFCellStyle. Forgot to mention it will throw an IllegalArgumentException for an invalid rotaion in the setRotation call
Comment 5 Andy Oliver 2002-09-06 01:14:08 UTC
Jason can you also submit a patch noting you as a developer on the project.  You
should be recognized for your contributions.  (this page: 

Patch applied.  Please cross check.

Comment 6 Andy Oliver 2002-09-06 01:14:21 UTC
Jason can you also submit a patch noting you as a developer on the project.  You
should be recognized for your contributions.  (this page: 

Patch applied.  Please cross check.