poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46548] HSSFPrintSetup throws NPE when accasing print settings of existing XLS
Date Fri, 16 Jan 2009 16:01:53 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46548





--- Comment #2 from Dmitriy Kumshayev <dq@mail.com>  2009-01-16 08:01:52 PST ---
Created an attachment (id=23132)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23132)
Unit test and proposed fix

When PLS record in Print Settings Block is long some xls files
contain additional Continue record going right after PLS.

The while loop in the constructor PageSettingsBlock() breaks 
right after the PLS record since it does no expect the Continue Record.

There is impression that there might be more than one 
PageSettingsBlock and the logic in org.apache.poi.hssf.model.Sheet
even creates and gets that second aggregated piece of records following PLS and
Continue records, but finally just drops it. As a result 
PageSettingsBlock gets created without a very important PageSetupRecord
causing NPE when some of the getter methods (the ones which internaly supposed
to deal with that missing PageSetupRecord) in  HSSFPrintSetup are called.

Someone put these comments at in Sheet.java

           // more than one 'Page Settings Block' at nesting level 1 ?
           // apparently this happens in about 15 test sample files


-- 
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


Mime
View raw message