cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements EPStyle.java
Date Sun, 11 May 2003 01:13:30 GMT
vgritsenko    2003/05/10 18:13:30

  Modified:    src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements
                        EPStyle.java
  Log:
  cosmetics
  
  Revision  Changes    Path
  1.3       +22 -26    cocoon-2.1/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyle.java
  
  Index: EPStyle.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPStyle.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EPStyle.java	11 Mar 2003 19:05:01 -0000	1.2
  +++ EPStyle.java	11 May 2003 01:13:30 -0000	1.3
  @@ -140,20 +140,17 @@
        * @param attributes the array of Attribute instances; may be
        *                   empty, will never be null
        * @param parent the parent ElementProcessor; may be null
  -     * @param filesystem the POIFSFileSystem object
        *
        * @exception IOException if anything is wrong
        */
  -
       public void initialize(final Attribute [] attributes,
                              final ElementProcessor parent)
           throws IOException
       {
           super.initialize(attributes, parent);
  -        
  -        
  +
           EPStyleRegion sregion = (EPStyleRegion) parent;
  -        
  +
           if (sregion.isValid()) {
               Hashtable colorhash = sregion.getColorHash();
   
  @@ -163,10 +160,11 @@
               short cnvvalign = convertVAlignment(getVerticalAlignment().getCode());    
       
               style.setVerticalAlignment(cnvvalign);
               style.setFillPattern((short)getShade());
  -            
  - 
  -            if (getShade() == 1) {   //TODO: change to constant when upgrade to new HSSF

  -                                     //solid w/foreground, bg doesn't matter
  +
  +
  +            if (getShade() == 1) {
  +                // TODO: change to constant when upgrade to new HSSF
  +                // solid w/foreground, bg doesn't matter
                   getLogger().debug("shade = 1");
                   HSSFColor color = (HSSFColor) colorhash.get(getBackgroundColor().toString());
                   if (color == null) {
  @@ -196,28 +194,26 @@
               }
               style.setWrapText(getWrapText());
               style.setLocked(true);
  -            
  -            String format = null;
   
  -	    try {
  -		format = getFormat();
  +            String format = null;
  +            try {
  +                format = getFormat();
               } catch (NullPointerException e) {
  -		format = "General";
  +                format = "General";
               }
   
               if (!format.equals("General")) {
                   format = kludgeForGnumericMisformats(format);
                   format = kludgeForGnumericDateDivergence(format);
                   short nformat = org.apache.poi.hssf.usermodel.HSSFDataFormat.getFormat(format);
  -                        getLogger().debug("setting format to "+ nformat);
  +                getLogger().debug("setting format to "+ nformat);
                   style.setDataFormat(nformat);
               }
           } else {
  -            
               invalid = true;
           }
  -    }    
  -    
  +    }
  +
       /**
        * @return true if horizontal alignment general bit is set
        *
  @@ -225,7 +221,7 @@
        */
   
       public boolean isHorizontalGeneral()
  -        throws IOException
  +            throws IOException
       {
           return getHorizontalAlignment().isGeneral();
       }
  @@ -237,7 +233,7 @@
        */
   
       public boolean isHorizontalLeft()
  -        throws IOException
  +            throws IOException
       {
           return getHorizontalAlignment().isLeft();
       }
  @@ -249,7 +245,7 @@
        */
   
       public boolean isHorizontalRight()
  -        throws IOException
  +            throws IOException
       {
           return getHorizontalAlignment().isRight();
       }
  @@ -261,7 +257,7 @@
        */
   
       public boolean isHorizontalCenter()
  -        throws IOException
  +            throws IOException
       {
           return getHorizontalAlignment().isCenter();
       }
  @@ -273,7 +269,7 @@
        */
   
       public boolean isHorizontalFill()
  -        throws IOException
  +            throws IOException
       {
           return getHorizontalAlignment().isFill();
       }
  @@ -285,7 +281,7 @@
        */
   
       public boolean isHorizontalJustify()
  -        throws IOException
  +            throws IOException
       {
           return getHorizontalAlignment().isJustify();
       }
  @@ -298,7 +294,7 @@
        */
   
       public boolean isHorizontalCenterAcrossSelection()
  -        throws IOException
  +            throws IOException
       {
           return getHorizontalAlignment().isCenterAcrossSelection();
       }
  
  
  

Mime
View raw message