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 2010/05/05 16:19:56 UTC
DO NOT REPLY [Bug 49253] New: setRepeatingRowsAndColumns sets print
orientation from landscape to portrait
https://issues.apache.org/bugzilla/show_bug.cgi?id=49253
Summary: setRepeatingRowsAndColumns sets print orientation from
landscape to portrait
Product: POI
Version: 3.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: dev@poi.apache.org
ReportedBy: thomas.herre@abosco.com
I have an XSSFWorkbook in which I set the page/print orientation to landscape
and set one row/some columns to repeat on each page. After setting the
repeating rows and columns, Excel displays orientation portrait instead of the
desired landscape.
Test code:
Workbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet();
Row row = sheet.createRow(0);
Cell cell = row.createCell(0);
cell.setCellValue("1");
cell = row.createCell(1);
cell.setCellValue("2");
cell = row.createCell(2);
PrintSetup printSetup = sheet.getPrintSetup();
printSetup.setLandscape(true);
workbook.setRepeatingRowsAndColumns(0, 0, 1, 0, 0);
// printSetup.setValidSettings(true);
workbook.write(new FileOutputStream(new File("test-landscape.xlsx")));
Now open the file in Excel and check the page settings.
It displays "portrait". That's wrong!
Now, if you comment in the line:
printSetup.setValidSettings(true);
and run the test again, the resulting file shows "landscape" again. Correct.
Looking into the sources, I found that in the last statement of method
setRepeatingRowsAndColumns, printSetup.setValidSettings(false); is called,
which led me to the described workaround.
--
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 49253] setRepeatingRowsAndColumns sets print
orientation from landscape to portrait
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49253
--- Comment #4 from filipdef <fi...@cirquedigital.com> 2011-03-30 18:57:47 EDT ---
Thanks for fixing this one - I was just gettin' around to actually filing a bug
for it !
- Filip
--
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 49253] setRepeatingRowsAndColumns sets print
orientation from landscape to portrait
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49253
--- Comment #2 from Thomas Herre <th...@abosco.com> 2010-05-05 10:23:47 EDT ---
Created an attachment (id=25402)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25402)
Workbook with correct orientation
This workbook was created using the workaround as described in the bug report.
--
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 49253] setRepeatingRowsAndColumns sets print
orientation from landscape to portrait
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49253
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Nick Burch <ni...@alfresco.com> 2011-03-18 12:06:37 EDT ---
Filip Defoort reported much the same thing on the mailing list last week. Based
on his postings, and this bug report, I think I've fixed this in r1082961
(along with a unit test).
--
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 49253] setRepeatingRowsAndColumns sets print
orientation from landscape to portrait
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49253
--- Comment #1 from Thomas Herre <th...@abosco.com> 2010-05-05 10:22:42 EDT ---
Created an attachment (id=25401)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25401)
Workbook with wrong orientation
--
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