Author: vhennebert
Date: Thu Oct 22 15:40:38 2009
New Revision: 828754

URL: http://svn.apache.org/viewvc?rev=828754&view=rev
Log:
Avoid NPE if intermediate XML was generated in accessibility mode but not the 
PDF

Modified:
    
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java

Modified: 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java?rev=828754&r1=828753&r2=828754&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
 Thu Oct 22 15:40:38 2009
@@ -112,7 +112,8 @@
                 targetRect2D, pdfAction);
         if (pdfLink != null) {
             String ptr = link.getAction().getStructurePointer();
-            if (ptr != null && ptr.length() > 0) {
+            if (documentHandler.getUserAgent().isAccessibilityEnabled()
+                    && ptr != null && ptr.length() > 0) {
                 
documentHandler.getLogicalStructureHandler().addLinkContentItem(pdfLink, ptr);
             }
             documentHandler.currentPage.addAnnotation(pdfLink);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to