jeremias    2003/11/08 11:58:03

  Modified:    src/java/org/apache/fop/render/rtf/rtflib/testdocs
                        CreateTestDocuments.java
               src/java/org/apache/fop/render/rtf
                        PageAttributesConverter.java
                        TextAttributesConverter.java RTFHandler.java
                        TableAttributesConverter.java
               src/java/org/apache/fop/render/rtf/rtflib/rtfdoc
                        IRtfTextrunContainer.java RtfTextrun.java
                        RtfParagraph.java RtfFile.java
                        WhitespaceCollapser.java ITableAttributes.java
                        RtfPageNumberCitation.java RtfTableRow.java
                        RtfTableCell.java RtfString.java
  Log:
  Style fixes only
  
  Revision  Changes    Path
  1.2       +2 -2      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
  
  Index: CreateTestDocuments.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CreateTestDocuments.java  4 Nov 2003 23:59:13 -0000       1.1
  +++ CreateTestDocuments.java  8 Nov 2003 19:58:03 -0000       1.2
  @@ -119,7 +119,7 @@
        * @param args String array of arguments
        * @throws Exception for errors
        */
  -    public static void main(String args[])
  +    public static void main(String[] args)
       throws Exception {
           if (args.length < 1) {
               System.err.println("usage: CreateTestDocuments <output directory>");
  
  
  
  1.2       +3 -2      
xml-fop/src/java/org/apache/fop/render/rtf/PageAttributesConverter.java
  
  Index: PageAttributesConverter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/PageAttributesConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PageAttributesConverter.java      4 Nov 2003 23:59:11 -0000       1.1
  +++ PageAttributesConverter.java      8 Nov 2003 19:58:03 -0000       1.2
  @@ -114,8 +114,9 @@
                       (int)FoUnitsConverter.getInstance().convertToTwips(f.toString() 
+ "pt"));
               }
           } catch (FOPException e) {
  -            log.error("Exception in convertPageAttributes: " + e.getMessage() + "- 
page attributes ignored");
  -            attrib=new RtfAttributes();
  +            log.error("Exception in convertPageAttributes: " 
  +                + e.getMessage() + "- page attributes ignored");
  +            attrib = new RtfAttributes();
           }
   
           return attrib;
  
  
  
  1.3       +28 -36    
xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
  
  Index: TextAttributesConverter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TextAttributesConverter.java      8 Nov 2003 19:31:41 -0000       1.2
  +++ TextAttributesConverter.java      8 Nov 2003 19:58:03 -0000       1.3
  @@ -50,23 +50,16 @@
   
   package org.apache.fop.render.rtf;
   
  -//XML
  -import org.xml.sax.Attributes;
  -
   //FOP
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.logger.ConsoleLogger;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.fo.EnumProperty;
  -import org.apache.fop.fo.expr.NCnameProperty;
   import org.apache.fop.fo.properties.Constants;
   import org.apache.fop.fo.LengthProperty;
  -import org.apache.fop.fo.ListProperty;
   import org.apache.fop.fo.PropertyList;
  -import org.apache.fop.fo.Property;
   import org.apache.fop.fo.SpaceProperty;
   import org.apache.fop.fo.ColorTypeProperty;
  -import org.apache.fop.fo.NumberProperty;
   import org.apache.fop.datatypes.ColorType;
   
   //RTF
  @@ -123,8 +116,8 @@
        * @param props list of FO properites, which are to be converted
        * @param props list of default FO properites (usally null)
        */
  -    public static RtfAttributes convertCharacterAttributes(PropertyList props, 
PropertyList defProps)
  -    throws FOPException {
  +    public static RtfAttributes convertCharacterAttributes(
  +            PropertyList props, PropertyList defProps) throws FOPException {
   
           RtfAttributes attrib = null;
   
  @@ -150,7 +143,8 @@
           String fopValue = properties.get("font-family").getString();
           
           if (fopValue != null) {
  -            rtfAttr.set(RtfText.ATTR_FONT_FAMILY, 
RtfFontManager.getInstance().getFontNumber(fopValue));
  +            rtfAttr.set(RtfText.ATTR_FONT_FAMILY, 
  +                RtfFontManager.getInstance().getFontNumber(fopValue));
           }
       }
   
  @@ -161,8 +155,8 @@
       
       private static void attrBlockFontColor(PropertyList properties, RtfAttributes 
rtfAttr) {
           // Cell background color
  -        ColorTypeProperty colorTypeProp=(ColorTypeProperty)properties.get("color");
  -        if(colorTypeProp != null) {
  +        ColorTypeProperty colorTypeProp = 
(ColorTypeProperty)properties.get("color");
  +        if (colorTypeProp != null) {
               ColorType colorType = colorTypeProp.getColorType();
               if (colorType != null) {
                   if (colorType.getAlpha() != 0
  @@ -192,7 +186,7 @@
   
       private static void attrBlockFontItalic(PropertyList properties, RtfAttributes 
rtfAttr) {
           String fopValue = properties.get("font-style").getString();
  -        if(fopValue.equals("italic")) {
  +        if (fopValue.equals("italic")) {
               rtfAttr.set(RtfText.ATTR_ITALIC, 1);
           } else {
               rtfAttr.set(RtfText.ATTR_ITALIC, 0);
  @@ -200,8 +194,8 @@
       }
       
       private static void attrBlockFontUnderline(PropertyList properties, 
RtfAttributes rtfAttr) {
  -        EnumProperty enumProp=(EnumProperty)properties.get("text-decoration");
  -        if(enumProp.getEnum()==Constants.UNDERLINE) {
  +        EnumProperty enumProp = (EnumProperty)properties.get("text-decoration");
  +        if (enumProp.getEnum() == Constants.UNDERLINE) {
               rtfAttr.set(RtfText.ATTR_UNDERLINE, 1);
           } else {
               rtfAttr.set(RtfText.ATTR_UNDERLINE, 0);
  @@ -209,34 +203,36 @@
       }
        
       private static void attrBlockSpaceBeforeAfter(PropertyList properties, 
RtfAttributes rtfAttr) {
  -        SpaceProperty spaceProp=null;
  +        SpaceProperty spaceProp = null;
           
           //space-before
  -        spaceProp=(SpaceProperty)properties.get("space-before");
  -        if(spaceProp!=null) {
  -            Float f = new 
Float(spaceProp.getLengthRange().getOptimum().getLength().getValue() / 1000f);
  +        spaceProp = (SpaceProperty)properties.get("space-before");
  +        if (spaceProp != null) {
  +            Float f = new Float(
  +                spaceProp.getLengthRange().getOptimum().getLength().getValue() / 
1000f);
               String sValue = f.toString() + "pt";
               
               try {
                   rtfAttr.set(
                           RtfText.SPACE_BEFORE,
                           
(int)FoUnitsConverter.getInstance().convertToTwips(sValue));           
  -            } catch(FOPException fe) {
  +            } catch (FOPException fe) {
                   log.warn("attrBlockSpaceBeforeAfter: " + fe.getMessage()); 
               }
           }
           
           //space-after
  -        spaceProp=(SpaceProperty)properties.get("space-after");
  -        if(spaceProp!=null) {
  -            Float f = new 
Float(spaceProp.getLengthRange().getOptimum().getLength().getValue() / 1000f);
  +        spaceProp = (SpaceProperty)properties.get("space-after");
  +        if (spaceProp != null) {
  +            Float f = new Float(
  +                spaceProp.getLengthRange().getOptimum().getLength().getValue() / 
1000f);
               String sValue = f.toString() + "pt";
               
               try {
                   rtfAttr.set(
                           RtfText.SPACE_AFTER,
                           (int)FoUnitsConverter.getInstance().convertToTwips(sValue));
  -            } catch(FOPException fe) {
  +            } catch (FOPException fe) {
                   log.warn("attrBlockSpaceBeforeAfter: " + fe.getMessage()); 
               }
           }
  @@ -244,10 +240,10 @@
   
       private static void attrBlockMargins(PropertyList properties, RtfAttributes 
rtfAttr) {
           try {
  -            LengthProperty lengthProp=null;
  +            LengthProperty lengthProp = null;
               
               // margin-left
  -            lengthProp=(LengthProperty)properties.get("margin-left");
  +            lengthProp = (LengthProperty)properties.get("margin-left");
               if (lengthProp != null) {
                   Float f = new Float(lengthProp.getLength().getValue() / 1000f);
                   String sValue = f.toString() + "pt";
  @@ -260,7 +256,7 @@
               }
   
               // margin-right
  -            lengthProp=(LengthProperty)properties.get("margin-right");
  +            lengthProp = (LengthProperty)properties.get("margin-right");
               if (lengthProp != null) {
                   Float f = new Float(lengthProp.getLength().getValue() / 1000f);
                   String sValue = f.toString() + "pt";
  @@ -271,7 +267,7 @@
               } else {
                   rtfAttr.set(RtfText.RIGHT_INDENT_BODY, 0);
               }
  -        } catch(FOPException fe) {
  +        } catch (FOPException fe) {
               log.warn("attrBlockSpaceBeforeAfter: " + fe.getMessage()); 
           }
       }
  @@ -282,22 +278,18 @@
           int fopValue = properties.get("text-align").getEnum();
           String rtfValue = null;
           switch (fopValue) {
  -            case Constants.CENTER: {
  +            case Constants.CENTER:
                   rtfValue = RtfText.ALIGN_CENTER;
                   break;
  -            }
  -            case Constants.END: {
  +            case Constants.END:
                   rtfValue = RtfText.ALIGN_RIGHT;
                   break;
  -            }
  -            case Constants.JUSTIFY: {
  +            case Constants.JUSTIFY:
                   rtfValue = RtfText.ALIGN_JUSTIFIED;
                   break;
  -            }
  -            default: {
  +            default:
                   rtfValue = RtfText.ALIGN_LEFT;
                   break;
  -            }
           }
           
           rtfAttr.set(rtfValue);
  
  
  
  1.4       +77 -79    xml-fop/src/java/org/apache/fop/render/rtf/RTFHandler.java
  
  Index: RTFHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/RTFHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RTFHandler.java   8 Nov 2003 19:31:41 -0000       1.3
  +++ RTFHandler.java   8 Nov 2003 19:58:03 -0000       1.4
  @@ -58,7 +58,6 @@
   import org.apache.avalon.framework.logger.ConsoleLogger;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.fop.apps.FOPException;
  -import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.fo.EnumProperty;
   import org.apache.fop.fo.FOInputHandler;
   import org.apache.fop.datatypes.FixedLength;
  @@ -81,26 +80,19 @@
   import org.apache.fop.fo.properties.Constants;
   import org.apache.fop.fo.Property;
   import org.apache.fop.fo.LengthProperty;
  -import org.apache.fop.fo.PropertyList;
   import org.apache.fop.apps.Document;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfAfterContainer;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfBeforeContainer;
  -import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfExternalGraphicContainer;
  -import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfPageNumberContainer;
  -import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfParagraphContainer;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfTextrunContainer;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAfter;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfBefore;
  -import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfColorTable;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfDocumentArea;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile;
  -import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFontManager;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfSection;
  -import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfText;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTextrun;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTable;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow;
  @@ -125,7 +117,7 @@
       private final Logger log = new ConsoleLogger();
       private RtfSection sect;
       private RtfDocumentArea docArea;
  -    private RtfParagraph para;
  +    //private RtfParagraph para; //never used
       private boolean warned = false;
       private boolean bPrevHeaderSpecified = false;//true, if there has been a
                                                    //header in any page-sequence
  @@ -188,17 +180,17 @@
   
               //read page size and margins, if specified
               Property prop;
  -            if((prop=pageSeq.properties.get("master-reference"))!=null) {
  -                String reference=prop.getString();
  +            if ((prop = pageSeq.properties.get("master-reference")) != null) {
  +                String reference = prop.getString();
   
  -                SimplePageMaster pagemaster=
  -                    pageSeq.getLayoutMasterSet().getSimplePageMaster(reference);
  +                SimplePageMaster pagemaster 
  +                    = pageSeq.getLayoutMasterSet().getSimplePageMaster(reference);
   
                   //only simple-page-master supported, so pagemaster may be null
  -                if(pagemaster!=null) {
  +                if (pagemaster != null) {
                       sect.getRtfAttributes().set(
                           PageAttributesConverter.convertPageAttributes(
  -                            pagemaster.properties,null));
  +                            pagemaster.properties, null));
                   }
               }
   
  @@ -232,8 +224,8 @@
                       RtfAttributes attr = new RtfAttributes();
                       attr.set(RtfBefore.HEADER);
   
  -                    final IRtfBeforeContainer contBefore =
  -                            (IRtfBeforeContainer)builderContext.getContainer
  +                    final IRtfBeforeContainer contBefore 
  +                        = (IRtfBeforeContainer)builderContext.getContainer
                                   (IRtfBeforeContainer.class, true, this);
                       contBefore.newBefore(attr);
                   }
  @@ -244,8 +236,8 @@
                       RtfAttributes attr = new RtfAttributes();
                       attr.set(RtfAfter.FOOTER);
   
  -                    final IRtfAfterContainer contAfter =
  -                            (IRtfAfterContainer)builderContext.getContainer
  +                    final IRtfAfterContainer contAfter
  +                        = (IRtfAfterContainer)builderContext.getContainer
                                   (IRtfAfterContainer.class, true, this);
                       contAfter.newAfter(attr);
                   }
  @@ -259,8 +251,9 @@
                   bHeaderSpecified = true;
                   bPrevHeaderSpecified = true;
   
  -                final IRtfBeforeContainer c =
  -                        
(IRtfBeforeContainer)builderContext.getContainer(IRtfBeforeContainer.class,
  +                final IRtfBeforeContainer c 
  +                    = (IRtfBeforeContainer)builderContext.getContainer(
  +                        IRtfBeforeContainer.class,
                           true, this);
   
                   RtfAttributes beforeAttributes = ((RtfElement)c).getRtfAttributes();
  @@ -275,8 +268,9 @@
                   bFooterSpecified = true;
                   bPrevFooterSpecified = true;
   
  -                final IRtfAfterContainer c =
  -                        
(IRtfAfterContainer)builderContext.getContainer(IRtfAfterContainer.class,
  +                final IRtfAfterContainer c 
  +                    = (IRtfAfterContainer)builderContext.getContainer(
  +                        IRtfAfterContainer.class,
                           true, this);
   
                   RtfAttributes afterAttributes = ((RtfElement)c).getRtfAttributes();
  @@ -321,14 +315,15 @@
        */
       public void startBlock(Block bl) {
           try {
  -            RtfAttributes rtfAttr = 
  -                    TextAttributesConverter.convertAttributes(bl.properties, null);
  +            RtfAttributes rtfAttr
  +                = TextAttributesConverter.convertAttributes(bl.properties, null);
                       
  -            IRtfTextrunContainer container =
  -                    
(IRtfTextrunContainer)builderContext.getContainer(IRtfTextrunContainer.class,
  -                    true,this);
  +            IRtfTextrunContainer container 
  +                = (IRtfTextrunContainer)builderContext.getContainer(
  +                    IRtfTextrunContainer.class,
  +                    true, this);
   
  -            RtfTextrun textrun=container.getTextrun();
  +            RtfTextrun textrun = container.getTextrun();
               
               textrun.addParagraphBreak();
               textrun.pushAttributes(rtfAttr);
  @@ -348,11 +343,12 @@
        */
       public void endBlock(Block bl) {
           try {
  -            IRtfTextrunContainer container =
  -                    
(IRtfTextrunContainer)builderContext.getContainer(IRtfTextrunContainer.class,
  -                    true,this);
  +            IRtfTextrunContainer container 
  +                = (IRtfTextrunContainer)builderContext.getContainer(
  +                    IRtfTextrunContainer.class,
  +                    true, this);
                       
  -            RtfTextrun textrun=container.getTextrun();
  +            RtfTextrun textrun = container.getTextrun();
               
               textrun.addParagraphBreak();
               textrun.popAttributes();
  @@ -374,12 +370,12 @@
           TableContext tableContext = new TableContext(builderContext);
   
           try {
  -            RtfAttributes atts = 
  -                    TableAttributesConverter.convertTableAttributes(tbl.properties);
  +            RtfAttributes atts 
  +                = TableAttributesConverter.convertTableAttributes(tbl.properties);
               
  -            final IRtfTableContainer tc =
  -                   
(IRtfTableContainer)builderContext.getContainer(IRtfTableContainer.class,
  -                   true, null);
  +            final IRtfTableContainer tc 
  +                = (IRtfTableContainer)builderContext.getContainer(
  +                    IRtfTableContainer.class, true, null);
               builderContext.pushContainer(tc.newTable(atts, tableContext));
           } catch (Exception e) {
               log.error("startTable:" + e.getMessage());
  @@ -450,17 +446,17 @@
        *
        * @param inl Inline that is starting.
        */
  -    public void startInline(Inline inl){
  +    public void startInline(Inline inl) {
   
           try {
  -            RtfAttributes rtfAttr = 
  -                    
TextAttributesConverter.convertCharacterAttributes(inl.properties, null);
  +            RtfAttributes rtfAttr
  +                = 
TextAttributesConverter.convertCharacterAttributes(inl.properties, null);
                       
  -            IRtfTextrunContainer container =
  -                    
(IRtfTextrunContainer)builderContext.getContainer(IRtfTextrunContainer.class,
  -                    true,this);
  +            IRtfTextrunContainer container
  +                = (IRtfTextrunContainer)builderContext.getContainer(
  +                    IRtfTextrunContainer.class, true, this);
                       
  -            RtfTextrun textrun=container.getTextrun();
  +            RtfTextrun textrun = container.getTextrun();
               textrun.pushAttributes(rtfAttr);
           } catch (IOException ioe) {
               log.error("startInline:" + ioe.getMessage());
  @@ -478,13 +474,13 @@
        *
        * @param inl Inline that is ending.
        */
  -    public void endInline(Inline inl){
  +    public void endInline(Inline inl) {
           try {
  -            IRtfTextrunContainer container =
  -                    
(IRtfTextrunContainer)builderContext.getContainer(IRtfTextrunContainer.class,
  -                    true,this);
  +            IRtfTextrunContainer container
  +                = (IRtfTextrunContainer)builderContext.getContainer(
  +                    IRtfTextrunContainer.class, true, this);
                       
  -            RtfTextrun textrun=container.getTextrun();
  +            RtfTextrun textrun = container.getTextrun();
               textrun.popAttributes();
           } catch (IOException ioe) {
               log.error("startInline:" + ioe.getMessage());
  @@ -703,16 +699,16 @@
           try {
          
           
  -            final IRtfTextrunContainer c =
  -                    
(IRtfTextrunContainer)builderContext.getContainer(IRtfTextrunContainer.class,
  -                    true, this);
  +            final IRtfTextrunContainer c 
  +                = (IRtfTextrunContainer)builderContext.getContainer(
  +                    IRtfTextrunContainer.class, true, this);
               
               final RtfExternalGraphic newGraphic = c.getTextrun().newImage();
          
  -            Property p=null; 
  +            Property p = null; 
                  
               //get source file
  -            if((p=eg.properties.get("src"))!=null) {
  +            if ((p = eg.properties.get("src")) != null) {
                   newGraphic.setURL (p.getString());
               } else {
                   log.error("The attribute 'src' of <fo:external-graphic> is 
required.");
  @@ -720,17 +716,17 @@
               }
               
               //get scaling
  -            if((p=eg.properties.get("scaling"))!=null) {
  -                EnumProperty e=(EnumProperty)p;
  -                if(p.getEnum()==Constants.UNIFORM) {
  +            if ((p = eg.properties.get("scaling")) != null) {
  +                EnumProperty e = (EnumProperty)p;
  +                if (p.getEnum() == Constants.UNIFORM) {
                       newGraphic.setScaling ("uniform");
                   }
               }
               
               //get width
  -            if((p=eg.properties.get("width"))!=null) {
  -                LengthProperty lengthProp=(LengthProperty)p;
  -                if(lengthProp.getLength() instanceof FixedLength) {
  +            if ((p = eg.properties.get("width")) != null) {
  +                LengthProperty lengthProp = (LengthProperty)p;
  +                if (lengthProp.getLength() instanceof FixedLength) {
                       Float f = new Float(lengthProp.getLength().getValue() / 1000f);
                       String sValue = f.toString() + "pt";
                       newGraphic.setWidth(sValue);
  @@ -738,9 +734,9 @@
               }
               
               //get height
  -            if((p=eg.properties.get("height"))!=null) {
  -                LengthProperty lengthProp=(LengthProperty)p;
  -                if(lengthProp.getLength() instanceof FixedLength) {
  +            if ((p = eg.properties.get("height")) != null) {
  +                LengthProperty lengthProp = (LengthProperty)p;
  +                if (lengthProp.getLength() instanceof FixedLength) {
                       Float f = new Float(lengthProp.getLength().getValue() / 1000f);
                       String sValue = f.toString() + "pt";
                       newGraphic.setHeight(sValue);
  @@ -751,11 +747,12 @@
               //      int compression = 
m_context.m_options.getRtfExternalGraphicCompressionRate ();
               int compression = 0;
               if (compression != 0) {
  -                if (! newGraphic.setCompressionRate (compression)) {
  -                    log.warn("The compression rate " + compression + " is invalid. 
The value has to be between 1 and 100 %.");
  +                if (!newGraphic.setCompressionRate(compression)) {
  +                    log.warn("The compression rate " + compression 
  +                        + " is invalid. The value has to be between 1 and 100 %.");
                   }
               }
  -        } catch(Exception e) {
  +        } catch (Exception e) {
               log.error("image: " + e.getMessage());
           }
       }
  @@ -787,13 +784,13 @@
       /**
        * @see org.apache.fop.fo.FOInputHandler#characters(char[], int, int)
        */
  -    public void characters(char data[], int start, int length) {
  +    public void characters(char[] data, int start, int length) {
           try {
  -            IRtfTextrunContainer container =
  -                    
(IRtfTextrunContainer)builderContext.getContainer(IRtfTextrunContainer.class,
  -                    true,this);
  +            IRtfTextrunContainer container
  +                = (IRtfTextrunContainer)builderContext.getContainer(
  +                    IRtfTextrunContainer.class, true, this);
                       
  -            RtfTextrun textrun=container.getTextrun();
  +            RtfTextrun textrun = container.getTextrun();
               textrun.addString(new String(data, start, length));
            } catch (IOException ioe) {
               // FIXME could we throw Exception in all FOInputHandler events?
  @@ -811,14 +808,15 @@
        */
       public void startPageNumber(PageNumber pagenum) {
           try {
  -            RtfAttributes rtfAttr = 
  -                    
TextAttributesConverter.convertCharacterAttributes(pagenum.properties, null);
  +            RtfAttributes rtfAttr
  +                = TextAttributesConverter.convertCharacterAttributes(
  +                    pagenum.properties, null);
                       
  -            IRtfTextrunContainer container =
  -                    
(IRtfTextrunContainer)builderContext.getContainer(IRtfTextrunContainer.class,
  -                    true,this);
  +            IRtfTextrunContainer container
  +                = (IRtfTextrunContainer)builderContext.getContainer(
  +                    IRtfTextrunContainer.class, true, this);
                       
  -            RtfTextrun textrun=container.getTextrun();
  +            RtfTextrun textrun = container.getTextrun();
               textrun.addPageNumber(rtfAttr);
           } catch (IOException ioe) {
               log.error("startPageNumber:" + ioe.getMessage());
  
  
  
  1.3       +4 -4      
xml-fop/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java
  
  Index: TableAttributesConverter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TableAttributesConverter.java     8 Nov 2003 19:31:41 -0000       1.2
  +++ TableAttributesConverter.java     8 Nov 2003 19:58:03 -0000       1.3
  @@ -115,12 +115,12 @@
        * @throws ConverterException On convertion error
        */
       static RtfAttributes convertTableAttributes(PropertyList properties)
  -    throws FOPException {
  +            throws FOPException {
           RtfAttributes attrib = new RtfAttributes();
   
  -        LengthProperty lengthProp=null;
  +        LengthProperty lengthProp = null;
           // margin-left
  -        lengthProp=(LengthProperty)properties.get("margin-left");
  +        lengthProp = (LengthProperty)properties.get("margin-left");
           if (lengthProp != null) {
               Float f = new Float(lengthProp.getLength().getValue() / 1000f);
               final String sValue = f.toString() + "pt";
  
  
  
  1.2       +1 -8      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfTextrunContainer.java
  
  Index: IRtfTextrunContainer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfTextrunContainer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IRtfTextrunContainer.java 4 Nov 2003 23:59:11 -0000       1.1
  +++ IRtfTextrunContainer.java 8 Nov 2003 19:58:03 -0000       1.2
  @@ -53,16 +53,9 @@
    * This file is part of the RTF library of the FOP project.
    */
   
  -
   package org.apache.fop.render.rtf.rtflib.rtfdoc;
   
   import java.io.IOException;
  -import java.io.Writer;
  -import java.util.LinkedList;
  -import java.util.List;
  -import java.util.Iterator;
  -import java.io.IOException;
  -import org.apache.fop.render.rtf.rtflib.exceptions.RtfStructureException;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTextrun;
   
   /**  Interface which enables an implementing class to contain linear text runs.
  @@ -70,5 +63,5 @@
    */
   
   public interface IRtfTextrunContainer {
  -    public RtfTextrun getTextrun()  throws IOException;
  +    RtfTextrun getTextrun() throws IOException;
   }
  
  
  
  1.4       +51 -53    
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
  
  Index: RtfTextrun.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RtfTextrun.java   8 Nov 2003 19:31:40 -0000       1.3
  +++ RtfTextrun.java   8 Nov 2003 19:58:03 -0000       1.4
  @@ -58,25 +58,23 @@
   
   import java.io.IOException;
   import java.io.Writer;
  -import java.util.LinkedList;
   import java.util.List;
   import java.util.Iterator;
  -import java.io.IOException;
  -import org.apache.fop.render.rtf.rtflib.exceptions.RtfStructureException;
   import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic;
   
  -/**  Class which contains a linear text run. It has methods to add attributes, 
text, paragraph breaks....
  - *  @author Peter Herweg, [EMAIL PROTECTED]
  +/** 
  + * Class which contains a linear text run. It has methods to add attributes, 
  + * text, paragraph breaks....
  + * @author Peter Herweg, [EMAIL PROTECTED]
    */
  -
   public class RtfTextrun extends RtfContainer {
  -    private boolean bSuppressLastPar=false;
  +    private boolean bSuppressLastPar = false;
       
       /**  Class which represents the opening of a RTF group mark.*/
  -    private class RtfOpenGroupMark extends RtfElement
  -    {        
  +    private class RtfOpenGroupMark extends RtfElement {
  +                
           RtfOpenGroupMark(RtfContainer parent, Writer w, RtfAttributes attr)
  -        throws IOException {
  +                throws IOException {
               super(parent, w, attr);
           }
           
  @@ -98,10 +96,10 @@
       }
       
       /**  Class which represents the closing of a RTF group mark.*/
  -    private class RtfCloseGroupMark extends RtfElement
  -    {
  +    private class RtfCloseGroupMark extends RtfElement {
  +        
           RtfCloseGroupMark(RtfContainer parent, Writer w)
  -        throws IOException {
  +                throws IOException {
               super(parent, w);
           }
           
  @@ -122,10 +120,10 @@
       }
   
       /**  Class which represents a paragraph break.*/
  -    private class RtfParagraphBreak extends RtfElement
  -    {
  +    private class RtfParagraphBreak extends RtfElement {
  +        
           RtfParagraphBreak(RtfContainer parent, Writer w)
  -        throws IOException {
  +                throws IOException {
               super(parent, w);
           }
       
  @@ -151,23 +149,23 @@
       }
       
       public void pushAttributes(RtfAttributes attrs) throws IOException {
  -        RtfOpenGroupMark r=new RtfOpenGroupMark(this, writer, attrs);
  +        RtfOpenGroupMark r = new RtfOpenGroupMark(this, writer, attrs);
       }
       
       public void popAttributes() throws IOException {
  -        RtfCloseGroupMark r=new RtfCloseGroupMark(this, writer);
  +        RtfCloseGroupMark r = new RtfCloseGroupMark(this, writer);
       }
       
       public void addString(String s) throws IOException {
  -        RtfString r=new RtfString(this, writer, s);
  +        RtfString r = new RtfString(this, writer, s);
       }
       
       public void addParagraphBreak() throws IOException {
  -        RtfParagraphBreak r=new RtfParagraphBreak(this, writer);
  +        RtfParagraphBreak r = new RtfParagraphBreak(this, writer);
       }
       
       public void addPageNumber(RtfAttributes attr) throws IOException {
  -        RtfPageNumber r=new RtfPageNumber(this, writer, attr);
  +        RtfPageNumber r = new RtfPageNumber(this, writer, attr);
       }
       
       public RtfExternalGraphic newImage() throws IOException {
  @@ -182,23 +180,23 @@
        * @throws IOException for I/O problems
        */
       public static RtfTextrun getTextrun(RtfContainer container, Writer writer, 
RtfAttributes attrs)
  -    throws IOException {
  +            throws IOException {
           Object obj;
  -        List list=container.getChildren();
  +        List list = container.getChildren();
                   
  -        if(list.size()==0) {
  +        if (list.size() == 0) {
               //add a new RtfTextrun
  -            RtfTextrun textrun=new RtfTextrun(container, writer, attrs);
  +            RtfTextrun textrun = new RtfTextrun(container, writer, attrs);
               list.add(textrun);
   
               return textrun;
  -        } else if ((obj=list.get(list.size()-1)) instanceof RtfTextrun ) {
  +        } else if ((obj = list.get(list.size() - 1)) instanceof RtfTextrun ) {
               //if the last child is a RtfTextrun, return it
               return (RtfTextrun)obj;
           }
   
           //add a new RtfTextrun as the last child
  -        RtfTextrun textrun=new RtfTextrun(container, writer, attrs);
  +        RtfTextrun textrun = new RtfTextrun(container, writer, attrs);
           list.add(textrun);
           
           return textrun;
  @@ -207,10 +205,9 @@
       /**
        * specify, if the last paragraph control word (\par) should be suppressed.
        * @param bSuppress true, if the last \par should be suppressed
  -     * @throws IOException for I/O problems
        */    
       public void setSuppressLastPar(boolean bSuppress) {
  -        bSuppressLastPar=bSuppress;
  +        bSuppressLastPar = bSuppress;
       }
      
       /**
  @@ -233,26 +230,26 @@
           }
           
           //determine, if this RtfTextrun is the last child of its parent
  -        boolean bLast=false;
  +        boolean bLast = false;
           for (Iterator it = parent.getChildren().iterator(); it.hasNext();) {
  -            if(it.next() == this) {
  -                bLast=!it.hasNext();
  +            if (it.next() == this) {
  +                bLast = !it.hasNext();
                   break;
               }
           }
           
           //get last RtfParagraphBreak, which is not followed by any visible child
  -        RtfParagraphBreak lastParagraphBreak=null;
  -        if(bLast) {
  +        RtfParagraphBreak lastParagraphBreak = null;
  +        if (bLast) {
               for (Iterator it = getChildren().iterator(); it.hasNext();) {
                   final RtfElement e = (RtfElement)it.next();
  -                if(e instanceof RtfParagraphBreak) {
  -                    lastParagraphBreak=(RtfParagraphBreak)e;
  +                if (e instanceof RtfParagraphBreak) {
  +                    lastParagraphBreak = (RtfParagraphBreak)e;
                   } else {
  -                    if(!(e instanceof RtfOpenGroupMark)
  -                    && !(e instanceof RtfCloseGroupMark)
  -                    && e.isEmpty()) {
  -                        lastParagraphBreak=null;
  +                    if (!(e instanceof RtfOpenGroupMark)
  +                            && !(e instanceof RtfCloseGroupMark)
  +                            && e.isEmpty()) {
  +                        lastParagraphBreak = null;
                       }
                   }
               }
  @@ -276,26 +273,27 @@
                * -If the RtfTextrun is the last child of its parent, write a
                * RtfParagraphBreak only, if it is not the last child.
                */
  -            boolean bHide=false;
  -            bHide=bRtfParagraphBreak;
  -            bHide=bHide &&
  -                    (bPrevPar || bFirst || 
  -                        (bSuppressLastPar && bLast && lastParagraphBreak!=null && 
e==lastParagraphBreak)
  -                    );
  +            boolean bHide = false;
  +            bHide = bRtfParagraphBreak;
  +            bHide = bHide 
  +                && (bPrevPar 
  +                    || bFirst 
  +                    || (bSuppressLastPar && bLast && lastParagraphBreak != null 
  +                        && e == lastParagraphBreak));
                   
  -            if( !bHide) {
  +            if (!bHide) {
                   e.writeRtf(); 
               }
               
  -            if(e instanceof RtfParagraphBreak) {
  -                bPrevPar=true;
  -            } else if(e instanceof RtfCloseGroupMark) {
  +            if (e instanceof RtfParagraphBreak) {
  +                bPrevPar = true;
  +            } else if (e instanceof RtfCloseGroupMark) {
                   //do nothing
  -            } else if(e instanceof RtfOpenGroupMark) {
  +            } else if (e instanceof RtfOpenGroupMark) {
                   //do nothing
               } else {
  -                bPrevPar=bPrevPar && e.isEmpty();
  -                bFirst=bFirst && e.isEmpty();
  +                bPrevPar = bPrevPar && e.isEmpty();
  +                bFirst = bFirst && e.isEmpty();
               }
           }
       }
  
  
  
  1.2       +2 -2      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java
  
  Index: RtfParagraph.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RtfParagraph.java 4 Nov 2003 23:59:11 -0000       1.1
  +++ RtfParagraph.java 8 Nov 2003 19:58:03 -0000       1.2
  @@ -90,7 +90,7 @@
       private boolean writeForBreak = false;
   
       /** Set of attributes that must be copied at the start of a paragraph */
  -    private static final String [] PARA_ATTRIBUTES = { "intbl" };
  +    private static final String[] PARA_ATTRIBUTES = {"intbl"};
   
       /** Create an RTF paragraph as a child of given container with default 
attributes */
       RtfParagraph(IRtfParagraphContainer parent, Writer w) throws IOException {
  
  
  
  1.2       +2 -2      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
  
  Index: RtfFile.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RtfFile.java      4 Nov 2003 23:59:11 -0000       1.1
  +++ RtfFile.java      8 Nov 2003 19:58:03 -0000       1.2
  @@ -244,7 +244,7 @@
        * @param args command-line arguments
        * @throws Exception for problems
        */
  -    public static void main(String args[])
  +    public static void main(String[] args)
       throws Exception {
           Writer w = null;
           if (args.length != 0) {
  
  
  
  1.2       +6 -6      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/WhitespaceCollapser.java
  
  Index: WhitespaceCollapser.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/WhitespaceCollapser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WhitespaceCollapser.java  4 Nov 2003 23:59:11 -0000       1.1
  +++ WhitespaceCollapser.java  8 Nov 2003 19:58:03 -0000       1.2
  @@ -89,16 +89,16 @@
   
       /** process one RtfText from our container */
       private void processText(RtfText txt) {
  -        final String newString=processString(txt.getText());
  -        if(newString!=null) {
  +        final String newString = processString(txt.getText());
  +        if (newString != null) {
               txt.setText(newString);
           }
       }
       
       /** process one RtfString from our container */
       private void processString(RtfString txt) {
  -        final String newString=processString(txt.getText());
  -        if(newString!=null) {
  +        final String newString = processString(txt.getText());
  +        if (newString != null) {
               txt.setText(newString);
           }
       }
  @@ -109,7 +109,7 @@
   
           // tokenize the text based on whitespace and regenerate it so as
           // to collapse multiple spaces into one
  -        if(orig==null) {
  +        if (orig == null) {
               return null;
           } else if (orig.length() > 0) { 
               final boolean allSpaces = orig.trim().length() == 0;
  
  
  
  1.3       +43 -43    
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ITableAttributes.java
  
  Index: ITableAttributes.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ITableAttributes.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ITableAttributes.java     8 Nov 2003 19:31:40 -0000       1.2
  +++ ITableAttributes.java     8 Nov 2003 19:58:03 -0000       1.3
  @@ -66,40 +66,40 @@
    */
   public interface ITableAttributes {
       /** to process column spanning */
  -    public static final String COLUMN_SPAN = "number-columns-spanned";
  +    String COLUMN_SPAN = "number-columns-spanned";
       /** to process row spanning */
  -    public static final String ROW_SPAN = "number-rows-spanned";
  +    String ROW_SPAN = "number-rows-spanned";
   
   // RTF 1.5 attributes (word 97)
   
       /** half the space between the cells of a table row in twips */
  -    public static final String ATTR_RTF_15_TRGAPH = "trgaph";
  -    public static final String ATTR_ROW_LEFT_INDENT = "trleft";
  +    String ATTR_RTF_15_TRGAPH = "trgaph";
  +    String ATTR_ROW_LEFT_INDENT = "trleft";
   
   // RTF 1.6 Row and table attributes
       /** table row padding, top */
  -    public static final String ATTR_ROW_PADDING_TOP = "trpaddt";
  +    String ATTR_ROW_PADDING_TOP = "trpaddt";
       /** table row padding, bottom */
  -    public static final String ATTR_ROW_PADDING_BOTTOM = "trpaddb";
  +    String ATTR_ROW_PADDING_BOTTOM = "trpaddb";
       /** table row padding, left */
  -    public static final String ATTR_ROW_PADDING_LEFT = "trpaddl";
  +    String ATTR_ROW_PADDING_LEFT = "trpaddl";
       /** table row padding, right */
  -    public static final String ATTR_ROW_PADDING_RIGHT = "trpaddr";
  +    String ATTR_ROW_PADDING_RIGHT = "trpaddr";
   
       /** table row padding, top */
  -    public static final String ATTR_ROW_U_PADDING_TOP = "trpaddft";
  +    String ATTR_ROW_U_PADDING_TOP = "trpaddft";
       /** table row padding, bottom */
  -    public static final String ATTR_ROW_U_PADDING_BOTTOM = "trpaddfb";
  +    String ATTR_ROW_U_PADDING_BOTTOM = "trpaddfb";
       /** table row padding, left */
  -    public static final String ATTR_ROW_U_PADDING_LEFT = "trpaddfl";
  +    String ATTR_ROW_U_PADDING_LEFT = "trpaddfl";
       /** table row padding, right */
  -    public static final String ATTR_ROW_U_PADDING_RIGHT = "trpaddfr";
  +    String ATTR_ROW_U_PADDING_RIGHT = "trpaddfr";
   
       /**
        * List of ALL ROW PADDING attributes, used to select them when writing
        * attributes
        */
  -    public static final String[] ATTRIB_ROW_PADDING = {
  +    String[] ATTRIB_ROW_PADDING = {
           ATTR_ROW_PADDING_TOP, ATTR_ROW_U_PADDING_TOP,
           ATTR_ROW_PADDING_BOTTOM, ATTR_ROW_U_PADDING_BOTTOM,
           ATTR_ROW_PADDING_LEFT, ATTR_ROW_U_PADDING_LEFT,
  @@ -109,76 +109,76 @@
   
   // Cell attributes
       /** cell padding, top */
  -    public static final String ATTR_CELL_PADDING_TOP = "clpadt";
  +    String ATTR_CELL_PADDING_TOP = "clpadt";
       /** cell padding, bottom */
  -    public static final String ATTR_CELL_PADDING_BOTTOM = "clpadb";
  +    String ATTR_CELL_PADDING_BOTTOM = "clpadb";
       /** cell padding, left */
  -    public static final String ATTR_CELL_PADDING_LEFT = "clpadl";
  +    String ATTR_CELL_PADDING_LEFT = "clpadl";
       /** cell padding, right */
  -    public static final String ATTR_CELL_PADDING_RIGHT = "clpadr";
  +    String ATTR_CELL_PADDING_RIGHT = "clpadr";
   
       /** cell padding, top */
  -    public static final String ATTR_CELL_U_PADDING_TOP = "clpadft";
  +    String ATTR_CELL_U_PADDING_TOP = "clpadft";
       /** cell padding, bottom */
  -    public static final String ATTR_CELL_U_PADDING_BOTTOM = "clpadfb";
  +    String ATTR_CELL_U_PADDING_BOTTOM = "clpadfb";
       /** cell padding, left */
  -    public static final String ATTR_CELL_U_PADDING_LEFT = "clpadfl";
  +    String ATTR_CELL_U_PADDING_LEFT = "clpadfl";
       /** cell padding, right */
  -    public static final String ATTR_CELL_U_PADDING_RIGHT = "clpadfr";
  +    String ATTR_CELL_U_PADDING_RIGHT = "clpadfr";
   
   // for border style file
       /** cell border, top */
  -    public static final String CELL_BORDER_TOP = "clbrdrt";
  +    String CELL_BORDER_TOP = "clbrdrt";
       /** cell border, bottom */
  -    public static final String CELL_BORDER_BOTTOM = "clbrdrb";
  +    String CELL_BORDER_BOTTOM = "clbrdrb";
       /** cell border, left */
  -    public static final String CELL_BORDER_LEFT = "clbrdrl";
  +    String CELL_BORDER_LEFT = "clbrdrl";
       /** cell border, right */
  -    public static final String CELL_BORDER_RIGHT = "clbrdrr";
  +    String CELL_BORDER_RIGHT = "clbrdrr";
   
   //Table row border attributes
       /** row border, top */
  -    public static final String ROW_BORDER_TOP = "trbrdrt";
  +    String ROW_BORDER_TOP = "trbrdrt";
       /** row border, bottom */
  -    public static final String ROW_BORDER_BOTTOM = "trbrdrb";
  +    String ROW_BORDER_BOTTOM = "trbrdrb";
       /** row border, left */
  -    public static final String ROW_BORDER_LEFT = "trbrdrl";
  +    String ROW_BORDER_LEFT = "trbrdrl";
       /** row border, right */
  -    public static final String ROW_BORDER_RIGHT = "trbrdrr";
  +    String ROW_BORDER_RIGHT = "trbrdrr";
       /** row border, horizontal */
  -    public static final String ROW_BORDER_HORIZONTAL = "trbrdrh";
  +    String ROW_BORDER_HORIZONTAL = "trbrdrh";
       /** row border, vertical */
  -    public static final String ROW_BORDER_VERTICAL = "trbrdrv";
  +    String ROW_BORDER_VERTICAL = "trbrdrv";
   
   //Table row attributes
       /** row attribute, keep-together */
  -    public static final String ROW_KEEP_TOGETHER = "trkeep";
  -    public static final String ROW_HEIGHT = "trrh";
  +    String ROW_KEEP_TOGETHER = "trkeep";
  +    String ROW_HEIGHT = "trrh";
   
       /**
        * This control word is nonexistent in RTF, used to simulate the
        * FO:keep-with-next attribute.
        */
  -    public static final String ROW_KEEP_WITH_NEXT = "knext";
  +    String ROW_KEEP_WITH_NEXT = "knext";
   
       /**
        * This control word is nonexistent in RTF, used to simulate the
        * FO:keep-with-previous attribute.
        */
  -    public static final String ROW_KEEP_WITH_PREVIOUS = "kprevious";
  +    String ROW_KEEP_WITH_PREVIOUS = "kprevious";
   
       /** cell shading, a unit-based attribute */
  -    public static final String CELL_SHADE = "clshdng";
  +    String CELL_SHADE = "clshdng";
       /** cell background color, a unit-based attribute */
  -    public static final String CELL_COLOR_BACKGROUND = "clcbpat";
  +    String CELL_COLOR_BACKGROUND = "clcbpat";
       /** cell foreground color, a unit-based attribute */
  -    public static final String CELL_COLOR_FOREGROUND = "clcfpat";
  +    String CELL_COLOR_FOREGROUND = "clcfpat";
   
       /**
        * List of ALL CELL PADDING attributes, used to select them when writing
        * attributes
        */
  -    public static final String[] ATTRIB_CELL_PADDING = {
  +    String[] ATTRIB_CELL_PADDING = {
           ATTR_CELL_PADDING_TOP, ATTR_CELL_U_PADDING_TOP,
           ATTR_CELL_PADDING_BOTTOM, ATTR_CELL_U_PADDING_BOTTOM,
           ATTR_CELL_PADDING_LEFT, ATTR_CELL_U_PADDING_LEFT,
  @@ -189,7 +189,7 @@
        * List of ALL CELL BORDER attributes, used to select them when writing
        * attributes
        */
  -    public static final String[] CELL_BORDER = {
  +    String[] CELL_BORDER = {
           CELL_BORDER_TOP,    CELL_BORDER_BOTTOM,
           CELL_BORDER_LEFT,   CELL_BORDER_RIGHT
       };
  @@ -198,7 +198,7 @@
        * List of ALL ROW BORDER attributes, used to select them when writing
        * attributes
        */
  -    public static final String[] ROW_BORDER = {
  +    String[] ROW_BORDER = {
           ROW_BORDER_TOP,     ROW_BORDER_BOTTOM,        ROW_BORDER_LEFT,
           ROW_BORDER_RIGHT,   ROW_BORDER_HORIZONTAL,    ROW_BORDER_VERTICAL
       };
  @@ -207,7 +207,7 @@
        * List of ALL CELL SHADING AND COLOR attributes, used to select them when
        * writing attributes
        */
  -    public static final String[] CELL_COLOR = {
  +    String[] CELL_COLOR = {
           CELL_SHADE,    CELL_COLOR_BACKGROUND,    CELL_COLOR_FOREGROUND
       };
   }
  
  
  
  1.2       +5 -5      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java
  
  Index: RtfPageNumberCitation.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RtfPageNumberCitation.java        4 Nov 2003 23:59:11 -0000       1.1
  +++ RtfPageNumberCitation.java        8 Nov 2003 19:58:03 -0000       1.2
  @@ -110,10 +110,10 @@
               // Build page reference field
               String pageRef = RTF_FIELD_PAGEREF_MODEL;
               final int insertionIndex = pageRef.indexOf("}");
  -            pageRef =
  -                pageRef.substring(0, insertionIndex) + "\"" + id + "\"" + " "
  -                + pageRef.substring(insertionIndex, pageRef.length())
  -            ;
  +            pageRef = pageRef.substring(0, insertionIndex) 
  +                + "\"" + id 
  +                + "\"" + " "
  +                + pageRef.substring(insertionIndex, pageRef.length());
               id = null;
   
               // Write RTF content
  
  
  
  1.3       +5 -5      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java
  
  Index: RtfTableRow.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RtfTableRow.java  8 Nov 2003 19:31:40 -0000       1.2
  +++ RtfTableRow.java  8 Nov 2003 19:58:03 -0000       1.3
  @@ -184,7 +184,7 @@
           writeAttributes(attrib, ITableAttributes.CELL_BORDER);
           writeAttributes(attrib, BorderAttributesConverter.BORDERS);
   
  -        if(attrib.isSet(ITableAttributes.ROW_HEIGHT)) {
  +        if (attrib.isSet(ITableAttributes.ROW_HEIGHT)) {
               writeOneAttribute(
                       ITableAttributes.ROW_HEIGHT,
                       attrib.getValue(ITableAttributes.ROW_HEIGHT));
  @@ -214,9 +214,9 @@
                             nestedTableFound = true;
                             indexesFound.addElement(new Integer(index));
                           } else if (subElement instanceof RtfParagraph) {
  -                           for (Iterator it3 =
  -                               ((RtfParagraph)subElement).getChildren().iterator(); 
it3.hasNext();)
  -                             {
  +                           for (Iterator it3
  +                                = 
((RtfParagraph)subElement).getChildren().iterator(); 
  +                                it3.hasNext();) {
                                   final RtfElement subSubElement = 
(RtfElement)it3.next();
                                   if (subSubElement instanceof RtfTable) {
                                       nestedTableFound = true;
  
  
  
  1.3       +4 -4      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
  
  Index: RtfTableCell.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RtfTableCell.java 8 Nov 2003 19:31:40 -0000       1.2
  +++ RtfTableCell.java 8 Nov 2003 19:58:03 -0000       1.3
  @@ -130,8 +130,8 @@
   
           if (parent.parent instanceof RtfTable) {
               // Get the context of the current table in order to get the width of 
each column
  -            ITableColumnsInfo tableColumnsInfo =
  -                    ((RtfTable)parent.parent).getITableColumnsInfo();
  +            ITableColumnsInfo tableColumnsInfo
  +                = ((RtfTable)parent.parent).getITableColumnsInfo();
               tableColumnsInfo.selectFirstColumn();
   
               // Reach the column index in table context corresponding to the current 
column cell
  @@ -481,7 +481,7 @@
           RtfAttributes attrs = new RtfAttributes();
           attrs.set("intbl");
           
  -        RtfTextrun textrun=RtfTextrun.getTextrun(this, writer, attrs);
  +        RtfTextrun textrun = RtfTextrun.getTextrun(this, writer, attrs);
   
           //Suppress the very last \par, because the closing \cell applies the
           //paragraph attributes. 
  
  
  
  1.2       +4 -5      
xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfString.java
  
  Index: RtfString.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfString.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RtfString.java    4 Nov 2003 23:59:11 -0000       1.1
  +++ RtfString.java    8 Nov 2003 19:58:03 -0000       1.2
  @@ -64,15 +64,14 @@
    *  @author Peter Herweg, [EMAIL PROTECTED]
    */
   
  -public class RtfString extends RtfElement
  -{
  -    String text="";
  +public class RtfString extends RtfElement {
  +    private String text = "";
           
       RtfString(RtfContainer parent, Writer w, String s)
       throws IOException {
           super(parent, w);
               
  -        text=s;
  +        text = s;
       }
           
       /**
  @@ -95,6 +94,6 @@
       }
           
       public void setText(String s) {
  -        text=s;
  +        text = s;
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to