xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acumis...@apache.org
Subject svn commit: r674497 [9/11] - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: ./ lib/ lib/build/ src/codegen/unicode/data/ src/codegen/unicode/java/org/apache/fop/text/linebreak/ src/documentation/ src/documentation/content/xdocs/ src/documentation...
Date Mon, 07 Jul 2008 14:09:10 GMT
Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/RTFHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/RTFHandler.java?rev=674497&r1=674496&r2=674497&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/RTFHandler.java
(original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/RTFHandler.java
Mon Jul  7 07:09:01 2008
@@ -76,6 +76,8 @@
 import org.apache.fop.fo.flow.PageNumber;
 import org.apache.fop.fo.flow.table.Table;
 import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.flow.table.TableFooter;
+import org.apache.fop.fo.flow.table.TablePart;
 import org.apache.fop.fo.flow.table.TableCell;
 import org.apache.fop.fo.flow.table.TableColumn;
 import org.apache.fop.fo.flow.table.TableHeader;
@@ -611,25 +613,29 @@
     /**
      * {@inheritDoc}
      */
-    public void startHeader(TableBody th) {
+    public void startHeader(TableHeader header) {
+        startPart(header);
     }
 
     /**
      * {@inheritDoc}
      */
-    public void endHeader(TableBody th) {
+    public void endHeader(TableHeader header) {
+        endPart(header);
     }
 
     /**
      * {@inheritDoc}
      */
-    public void startFooter(TableBody tf) {
+    public void startFooter(TableFooter footer) {
+        startPart(footer);
     }
 
     /**
      * {@inheritDoc}
      */
-    public void endFooter(TableBody tf) {
+    public void endFooter(TableFooter footer) {
+        endPart(footer);
     }
 
     /**
@@ -687,31 +693,25 @@
         }
     }
 
-     /**
-     * {@inheritDoc}
-     */
-    public void startBody(TableBody tb) {
+    private void startPart(TablePart part) {
         if (bDefer) {
             return;
         }
 
         try {
-            RtfAttributes atts = TableAttributesConverter.convertTableBodyAttributes(tb);
+            RtfAttributes atts = TableAttributesConverter.convertTablePartAttributes(part);
 
             RtfTable tbl = (RtfTable)builderContext.getContainer(RtfTable.class, true, this);
             tbl.setHeaderAttribs(atts);
         } catch (IOException ioe) {
             handleIOTrouble(ioe);
         } catch (Exception e) {
-            log.error("startBody: " + e.getMessage());
+            log.error("startPart: " + e.getMessage());
             throw new RuntimeException(e.getMessage());
-        }
+        }        
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public void endBody(TableBody tb) {
+    private void endPart(TablePart tb) {
         if (bDefer) {
             return;
         }
@@ -722,9 +722,25 @@
         } catch (IOException ioe) {
             handleIOTrouble(ioe);
         } catch (Exception e) {
-            log.error("endBody: " + e.getMessage());
+            log.error("endPart: " + e.getMessage());
             throw new RuntimeException(e.getMessage());
-        }
+        }        
+    }
+
+    
+     /**
+     * {@inheritDoc}
+     */
+    public void startBody(TableBody body) {
+        startPart(body);
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public void endBody(TableBody body) {
+        endPart(body);
     }
 
     /**
@@ -1552,7 +1568,7 @@
         } else if (foNode instanceof FOText) {
             if (bStart) {
                 FOText text = (FOText) foNode;
-                text(text, text.ca, text.startIndex, text.endIndex);
+                text(text, text.getCharArray(), 0, text.length());
             }
         } else if (foNode instanceof Character) {
             if (bStart) {
@@ -1607,6 +1623,18 @@
             } else {
                 endTable( (Table) foNode);
             }
+        } else if (foNode instanceof TableHeader) {
+            if (bStart) {
+                startHeader( (TableHeader) foNode);
+            } else {
+                endHeader( (TableHeader) foNode);
+            }
+        } else if (foNode instanceof TableFooter) {
+            if (bStart) {
+                startFooter( (TableFooter) foNode);
+            } else {
+                endFooter( (TableFooter) foNode);
+            }
         } else if (foNode instanceof TableBody) {
             if (bStart) {
                 startBody( (TableBody) foNode);

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java?rev=674497&r1=674496&r2=674497&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
(original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
Mon Jul  7 07:09:01 2008
@@ -24,12 +24,11 @@
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.flow.table.Table;
-import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.flow.table.TablePart;
 import org.apache.fop.fo.flow.table.TableCell;
 import org.apache.fop.fo.flow.table.TableHeader;
 import org.apache.fop.fo.flow.table.TableRow;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
-import org.apache.fop.fo.properties.FixedLength;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.ITableAttributes;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes;
 
@@ -91,7 +90,7 @@
      *
      * @throws ConverterException On convertion error
      */
-    static RtfAttributes convertTableBodyAttributes(TableBody fobj)
+    static RtfAttributes convertTablePartAttributes(TablePart part)
             throws FOPException {
         FOPRtfAttributes attrib = new FOPRtfAttributes();
         return attrib;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=674497&r1=674496&r2=674497&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/xml/XMLRenderer.java
(original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/xml/XMLRenderer.java
Mon Jul  7 07:09:01 2008
@@ -35,11 +35,7 @@
 
 import org.w3c.dom.Document;
 
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.AttributesImpl;
 
 import org.apache.xmlgraphics.util.QName;
 import org.apache.xmlgraphics.util.XMLizable;
@@ -99,39 +95,17 @@
  * The output can be used to build a new area tree which can be 
  * rendered to any renderer.
  */
-public class XMLRenderer extends PrintRenderer {
+public class XMLRenderer extends AbstractXMLRenderer {
 
     /** XML MIME type */
     public static final String XML_MIME_TYPE = MimeConstants.MIME_FOP_AREA_TREE;
 
-    /** Main namespace in use. */
-    public static final String NS = "";
-
-    /** CDATA type */
-    public static final String CDATA = "CDATA";
-
-    /** An empty Attributes object used when no attributes are needed. */
-    public static final Attributes EMPTY_ATTS = new AttributesImpl();
-
     private boolean startedSequence = false;
-    private RendererContext context;
     private boolean compactFormat = false;
 
     /** If not null, the XMLRenderer will mimic another renderer by using its font setup.
*/
     protected Renderer mimic;
 
-    /** ContentHandler that the generated XML is written to */
-    protected ContentHandler handler;
-
-    /** AttributesImpl instance that can be used during XML generation. */
-    protected AttributesImpl atts = new AttributesImpl();
-
-    /** The OutputStream to write the generated XML to. */
-    protected OutputStream out;
-
-    /** A list of ExtensionAttachements received through processOffDocumentItem() */
-    protected List extensionAttachments;
-
     /**
      * Creates a new XML renderer.
      */
@@ -171,15 +145,6 @@
         }
     }
 
-    /**
-     * Sets an outside TransformerHandler to use instead of the default one
-     * create in this class in startRenderer().
-     * @param handler Overriding TransformerHandler
-     */
-    public void setContentHandler(ContentHandler handler) {
-        this.handler = handler;
-    }
-
     public void setCompactFormat(boolean compact) {
         this.compactFormat = compact;
     }
@@ -189,111 +154,6 @@
     }
 
     /**
-     * Handles SAXExceptions.
-     * @param saxe the SAXException to handle
-     */
-    protected void handleSAXException(SAXException saxe) {
-        throw new RuntimeException(saxe.getMessage());
-    }
-
-    /**
-     * Writes a comment to the generated XML.
-     * @param comment the comment
-     */
-    protected void comment(String comment) {
-        if (handler instanceof LexicalHandler) { 
-            try {
-                ((LexicalHandler) handler).comment(comment.toCharArray(), 0, comment.length());
-            } catch (SAXException saxe) {
-                handleSAXException(saxe);
-            }
-        }
-    }
-    
-    /**
-     * Starts a new element (without attributes).
-     * @param tagName tag name of the element
-     */
-    protected void startElement(String tagName) {
-        startElement(tagName, EMPTY_ATTS);
-    }
-
-    /**
-     * Starts a new element.
-     * @param tagName tag name of the element
-     * @param atts attributes to add
-     */
-    protected void startElement(String tagName, Attributes atts) {
-        try {
-            handler.startElement(NS, tagName, tagName, atts);
-        } catch (SAXException saxe) {
-            handleSAXException(saxe);
-        }
-    }
-
-    /**
-     * Ends an element.
-     * @param tagName tag name of the element
-     */
-    protected void endElement(String tagName) {
-        try {
-            handler.endElement(NS, tagName, tagName);
-        } catch (SAXException saxe) {
-            handleSAXException(saxe);
-        }
-    }
-
-    /**
-     * Sends plain text to the XML
-     * @param text the text
-     */
-    protected void characters(String text) {
-        try {
-            char[] ca = text.toCharArray();
-            handler.characters(ca, 0, ca.length);
-        } catch (SAXException saxe) {
-            handleSAXException(saxe);
-        }
-    }
-
-    /**
-     * Adds a new attribute to the protected member variable "atts".
-     * @param name name of the attribute
-     * @param value value of the attribute
-     */
-    protected void addAttribute(String name, String value) {
-        atts.addAttribute(NS, name, name, CDATA, value);
-    }
-
-    /**
-     * Adds a new attribute to the protected member variable "atts".
-     * @param name name of the attribute
-     * @param value value of the attribute
-     */
-    protected void addAttribute(QName name, String value) {
-        atts.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.getQName(), 
-                CDATA, value);
-    }
-
-    /**
-     * Adds a new attribute to the protected member variable "atts".
-     * @param name name of the attribute
-     * @param value value of the attribute
-     */
-    protected void addAttribute(String name, int value) {
-        addAttribute(name, Integer.toString(value));
-    }
-
-    /**
-     * Adds a new attribute to the protected member variable "atts".
-     * @param name name of the attribute
-     * @param rect a Rectangle2D to format and use as attribute value
-     */
-    protected void addAttribute(String name, Rectangle2D rect) {
-        addAttribute(name, createString(rect));
-    }
-
-    /**
      * Adds the general Area attributes.
      * @param area Area to extract attributes from
      */
@@ -406,18 +266,6 @@
         }
     }
 
-    private String createString(Rectangle2D rect) {
-        return "" + (int) rect.getX() + " " + (int) rect.getY() + " "
-                  + (int) rect.getWidth() + " " + (int) rect.getHeight();
-    }
-
-    private void handleDocumentExtensionAttachments() {
-        if (extensionAttachments != null && extensionAttachments.size() > 0) {
-            handleExtensionAttachments(extensionAttachments);
-            extensionAttachments.clear();
-        }
-    }
-
     /** {@inheritDoc} */
     public void processOffDocumentItem(OffDocumentItem oDI) {
         if (oDI instanceof BookmarkData) {
@@ -518,9 +366,7 @@
         startElement("areaTree");
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     public void stopRenderer() throws IOException {
         endPageSequence();
         endElement("areaTree");
@@ -535,9 +381,7 @@
         log.debug("Written out Area Tree XML");
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     public void renderPage(PageViewport page) throws IOException, FOPException {
         atts.clear();
         addAttribute("bounds", page.getViewArea());
@@ -561,7 +405,8 @@
         endElement("pageViewport");
     }
 
-    private void handleExtensionAttachments(List attachments) {
+    /** {@inheritDoc} */
+    protected void handleExtensionAttachments(List attachments) {
         if (attachments != null && attachments.size() > 0) {
             startElement("extension-attachments");
             Iterator i = attachments.iterator();
@@ -582,10 +427,6 @@
         }
     }
 
-    private void handlePageExtensionAttachments(PageViewport page) {
-        handleExtensionAttachments(page.getExtensionAttachments());
-    }
-
     /** {@inheritDoc} */
     public void startPageSequence(PageSequence pageSequence) {
         handleDocumentExtensionAttachments();
@@ -754,9 +595,17 @@
         endElement("flow");
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
+    protected void renderReferenceArea(Block block) {
+        handleBlockTraits(block);
+
+        List children = block.getChildAreas();
+        if (children != null) {
+            renderBlocks(block, children);
+        }
+    }
+    
+    /** {@inheritDoc} */
     protected void renderBlock(Block block) {
         atts.clear();
         addAreaAttributes(block);

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/text/linebreak/LineBreakStatus.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/text/linebreak/LineBreakStatus.java?rev=674497&r1=674496&r2=674497&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/text/linebreak/LineBreakStatus.java
(original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/text/linebreak/LineBreakStatus.java
Mon Jul  7 07:09:01 2008
@@ -61,88 +61,152 @@
     }
 
     /**
-     * Check whether a line break may happen.
-     * The function returns the line breaking status of the point before the given character.

-     * The algorithm is the table driven algorithm described in the Unicode
-     * <a href="http://unicode.org/reports/tr14/#PairBasedImplementation">technical
report #14</a>.
-     * The pair table is taken from @see LineBreakUtils
+     * Check whether a line break may happen according to the rules described in
+     * the <a href="http://unicode.org/reports/tr14/#Algorithm">Unicode Line Breaking
Algorithm</a>.
+     * The function returns the line breaking status of the point <em>before</em>
the given character. 
+     * The algorithm is the table-driven algorithm, as described in 
+     * <a href="http://unicode.org/reports/tr14/#PairBasedImplementation">
+     * Unicode Technical Report #14</a>.
+     * The pair table is taken from {@link LineBreakUtils}.
      * 
-     * TODO: Better handling for AI, SA, CB and other line break classes.
+     * TODO: Better handling for AI, SA, SG and XX line break classes.
      * 
-     * @param c The character.
+     * @param c the character to check
      * @return the break action to be taken
+     *          one of: {@link #DIRECT_BREAK}, 
+     *                  {@link #INDIRECT_BREAK}, 
+     *                  {@link #COMBINING_INDIRECT_BREAK}, 
+     *                  {@link #COMBINING_PROHIBITED_BREAK},
+     *                  {@link #PROHIBITED_BREAK},
+     *                  {@link #EXPLICIT_BREAK}
      */
     public byte nextChar(char c) {
+        
         byte currentClass = LineBreakUtils.getLineBreakProperty(c);
-        if (currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_AI
-            || leftClass == LineBreakUtils.LINE_BREAK_PROPERTY_XX) {
-            currentClass = LineBreakUtils.LINE_BREAK_PROPERTY_AL;
-        } else if (currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_NL) {
-            currentClass = LineBreakUtils.LINE_BREAK_PROPERTY_BK;
+        
+        /* Initial conversions */
+        switch (currentClass) {
+            case LineBreakUtils.LINE_BREAK_PROPERTY_AI:
+            case LineBreakUtils.LINE_BREAK_PROPERTY_SG:
+            case LineBreakUtils.LINE_BREAK_PROPERTY_XX:
+                // LB 1: Resolve AI, ... SG and XX into other line breaking classes 
+                //       depending on criteria outside the scope of this algorithm.
+                //       In the absence of such criteria, it is recommended that 
+                //       classes AI, ... SG and XX be resolved to AL
+                currentClass = LineBreakUtils.LINE_BREAK_PROPERTY_AL;
+                break;
+            
+            case LineBreakUtils.LINE_BREAK_PROPERTY_SA:
+                // LB 1: Resolve ... SA ... into other line breaking classes 
+                //       depending on criteria outside the scope of this algorithm.
+                //       In the absence of such criteria, it is recommended that 
+                //       ... SA be resolved to AL, except that characters of 
+                //       class SA that have General_Category Mn or Mc be resolved to CM
+                switch (Character.getType(c)) {
+                    case Character.COMBINING_SPACING_MARK: //General_Category "Mc"
+                    case Character.NON_SPACING_MARK: //General_Category "Mn"
+                        currentClass = LineBreakUtils.LINE_BREAK_PROPERTY_CM;
+                        break;
+                    default:
+                        currentClass = LineBreakUtils.LINE_BREAK_PROPERTY_AL;
+                }
+                
+            default:
+                //nop
         }
-        if (leftClass == -1) {
-            if (currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_LF) {
-                leftClass = LineBreakUtils.LINE_BREAK_PROPERTY_BK;
-            } else {
+        
+        /* Check 1: First character or initial character after a reset/mandatory break? */
+        switch (leftClass) {
+            case -1:
+                //first character or initial character after a reset()
                 leftClass = currentClass;
                 if (leftClass == LineBreakUtils.LINE_BREAK_PROPERTY_CM) {
-                    leftClass = LineBreakUtils.LINE_BREAK_PROPERTY_ID;
+                    // LB 10: Treat any remaining combining marks as AL
+                    leftClass = LineBreakUtils.LINE_BREAK_PROPERTY_AL;
                 }
-            }
-            // LB 2a
-            return PROHIBITED_BREAK;
-        } else if (!(leftClass != LineBreakUtils.LINE_BREAK_PROPERTY_BK
-                    && (leftClass != LineBreakUtils.LINE_BREAK_PROPERTY_CR
-                        || currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_LF)
-                )) {
-            reset();
-            if (currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_LF) {
-                leftClass = LineBreakUtils.LINE_BREAK_PROPERTY_BK;
-            }
-            return EXPLICIT_BREAK;
-        } else if (currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_BK
-                    || currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_LF) {
-            leftClass = LineBreakUtils.LINE_BREAK_PROPERTY_BK;
-            return PROHIBITED_BREAK;
-        } else if (currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_CR) {
-            leftClass = LineBreakUtils.LINE_BREAK_PROPERTY_CR;
-            return PROHIBITED_BREAK;
-        } else if (currentClass == LineBreakUtils.LINE_BREAK_PROPERTY_SP) {
-            hadSpace = true;
-            return PROHIBITED_BREAK;
-        } else {
-            boolean savedHadSpace = hadSpace;
-            hadSpace = false;
-            switch (LineBreakUtils.getLineBreakPairProperty(leftClass, currentClass)) {
-                case LineBreakUtils.PROHIBITED_BREAK :
+                // LB 2: Never break at the start of text
+                return PROHIBITED_BREAK;
+            
+            case LineBreakUtils.LINE_BREAK_PROPERTY_BK:
+            case LineBreakUtils.LINE_BREAK_PROPERTY_LF:
+            case LineBreakUtils.LINE_BREAK_PROPERTY_NL:
+                //first character after mandatory break
+                // LB 4: Always break after hard line breaks
+                // LB 5: Treat ... LF and NL has hard line breaks
+                reset();
+                leftClass = currentClass;
+                return EXPLICIT_BREAK;
+            
+            case LineBreakUtils.LINE_BREAK_PROPERTY_CR:
+                //first character after a carriage return: 
+                // LB 5: Treat CR followed by LF, as well as CR ... as hard line breaks
+                // If current is LF, then fall through to Check 2 (see below),
+                // and the hard break will be signaled for the character after LF (see above)
+                if (currentClass != LineBreakUtils.LINE_BREAK_PROPERTY_LF) {
+                    reset();
                     leftClass = currentClass;
+                    return EXPLICIT_BREAK;
+                }
+                
+            default:
+                //nop
+        }
+        
+        /* Check 2: current is a mandatory break or space? */
+        switch (currentClass) {
+            case LineBreakUtils.LINE_BREAK_PROPERTY_BK:
+            case LineBreakUtils.LINE_BREAK_PROPERTY_LF:
+            case LineBreakUtils.LINE_BREAK_PROPERTY_NL:
+            case LineBreakUtils.LINE_BREAK_PROPERTY_CR:
+                // LB 6: Do not break before a hard break
+                leftClass = currentClass;
+                return PROHIBITED_BREAK;
+            
+            case LineBreakUtils.LINE_BREAK_PROPERTY_SP:
+                // LB 7: Do not break before spaces ...
+                // Zero-width spaces are in the pair-table (see below)
+                hadSpace = true;
+                return PROHIBITED_BREAK;
+            
+            default:
+                //nop
+        }
+        
+        /* Normal treatment, if the first two checks did not return */
+        boolean savedHadSpace = hadSpace;
+        hadSpace = false;
+        byte breakAction = LineBreakUtils.getLineBreakPairProperty(leftClass, currentClass);
+        switch (breakAction) {
+            case PROHIBITED_BREAK:
+            case DIRECT_BREAK:
+                leftClass = currentClass;
+                return breakAction;
+            
+            case INDIRECT_BREAK:
+                leftClass = currentClass;
+                if (savedHadSpace) {
+                    return INDIRECT_BREAK;
+                } else {
                     return PROHIBITED_BREAK;
-                case LineBreakUtils.DIRECT_BREAK :
+                }
+                
+            case COMBINING_INDIRECT_BREAK:
+                if (savedHadSpace) {
                     leftClass = currentClass;
-                    return DIRECT_BREAK;
-                case LineBreakUtils.INDIRECT_BREAK :
+                    return COMBINING_INDIRECT_BREAK;
+                } else {
+                    return PROHIBITED_BREAK;
+                }
+                
+            case COMBINING_PROHIBITED_BREAK:
+                if (savedHadSpace) {
                     leftClass = currentClass;
-                    if (savedHadSpace) {
-                        return INDIRECT_BREAK;
-                    } else {
-                        return PROHIBITED_BREAK;
-                    }
-                case LineBreakUtils.COMBINING_INDIRECT_BREAK :
-                    if (savedHadSpace) {
-                        leftClass = currentClass;
-                        return COMBINING_INDIRECT_BREAK;
-                    } else {
-                        return PROHIBITED_BREAK;
-                    }
-                case LineBreakUtils.COMBINING_PROHIBITED_BREAK :
-                    if (savedHadSpace) {
-                        leftClass = currentClass;
-                    }
-                    return COMBINING_PROHIBITED_BREAK;
-                default :
-                    throw new RuntimeException("duh");
-            }
-
+                }
+                return COMBINING_PROHIBITED_BREAK;
+            
+            default:
+                assert false;
+                return breakAction;
         }
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message