Bug 43402 - white-space-treatment="preserve" causes Exception
Summary: white-space-treatment="preserve" causes Exception
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout (show other bugs)
Version: trunk
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-16 02:03 UTC by Andreas L. Delmelle
Modified: 2012-04-01 06:41 UTC (History)
0 users



Attachments
fo demonstrating the bug (2.05 KB, application/octet-stream)
2007-09-16 02:04 UTC, Andreas L. Delmelle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas L. Delmelle 2007-09-16 02:03:53 UTC
The small FO file in attachment causes an ArrayIndexOutOfBoundsException in 
TextLayoutManager.addALetterSpaceTo(). If the white-space-treatment property is removed, the Exception 
does not occur.
Comment 1 Andreas L. Delmelle 2007-09-16 02:04:55 UTC
Created attachment 20828 [details]
fo demonstrating the bug
Comment 2 Andreas L. Delmelle 2007-09-20 13:01:54 UTC
Not white-space-preserve was causing the error, but white-space-collapse. The linefeed by itself is not 
related to the problem, and the same error occurs for non-collapsed white-space in the middle of a line.

It is possible that a KnuthBox has a position of -1 in sequences of non-collapsed spaces, apparently, so 
by adding a check for this in the related method in TextLayoutManager (~ line 810), the Exception can be 
avoided.
Comment 3 Andreas L. Delmelle 2007-09-20 13:03:23 UTC
for reference: http://svn.apache.org/viewvc?rev=577899&view=rev
Comment 4 Glenn Adams 2012-04-01 06:41:17 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed