cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject cvs commit: cocoon-2.1 status.xml
Date Mon, 05 Jul 2004 18:38:03 GMT
tcurdt      2004/07/05 11:38:03

  Modified:    src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements
                        EPCell.java
               .        status.xml
  Log:
  fixes-bug 28015 due to Frank Taffelt (frank.taffelt@interface-business.de)
  POI: cell spanning
  
  Revision  Changes    Path
  1.6       +24 -17    cocoon-2.1/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPCell.java
  
  Index: EPCell.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPCell.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EPCell.java	5 Mar 2004 13:02:03 -0000	1.5
  +++ EPCell.java	5 Jul 2004 18:38:03 -0000	1.6
  @@ -25,7 +25,7 @@
   import org.apache.cocoon.components.elementprocessor.types.NumericConverter;
   import org.apache.cocoon.components.elementprocessor.types.NumericResult;
   import org.apache.cocoon.components.elementprocessor.types.Validator;
  -
  +import org.apache.poi.hssf.util.Region;
   /**
    * Implementation of ElementProcessor to handle the "Cell" tag.
    * This element has several attributes and may contain other elements.
  @@ -129,15 +129,16 @@
        * @exception IOException
        * @exception NullPointerException
        */
  -    public int getColumns() throws IOException, NullPointerException {
  -        if (!_cols_fetched) {
  -            String valueString = getValue(_cols_attribute);
  -            if (valueString != null) {
  -                _cols = NumericConverter.extractPositiveInteger(valueString);
  +     public int getColumns() throws IOException, NullPointerException {
  +       if (!_cols_fetched) {
  +           String valueString = getValue(_cols_attribute);
  +           if (valueString != null) {
  +               _cols = NumericConverter.extractPositiveInteger(valueString);
  +				_cols_fetched = true;
               }
  -            _cols_fetched = true;
  +            
           }
  -        return _cols.intValue();
  +        return _cols_fetched ?_cols.intValue() : -1;
       }
   
       /**
  @@ -146,15 +147,16 @@
        * @exception IOException
        * @exception NullPointerException
        */
  -    public int getRows() throws IOException, NullPointerException {
  -        if (!_rows_fetched) {
  -            String valueString = getValue(_rows_attribute);
  -            if (valueString != null) {
  -                _rows = NumericConverter.extractPositiveInteger(valueString);
  -            }
  -            _rows_fetched = true;
  +     public int getRows() throws IOException, NullPointerException {
  +      if (!_rows_fetched) {
  +           String valueString = getValue(_rows_attribute);
  +           if (valueString != null) {
  +               _rows = NumericConverter.extractPositiveInteger(valueString);
  +			   _rows_fetched = true;
  +           }
  +           
           }
  -        return _rows.intValue();
  +        return _rows_fetched ? _rows.intValue() : -1 ;
       }
   
       /**
  @@ -227,6 +229,11 @@
           if (content != null && !content.trim().equals("")) {
               getCell().setContent(getContent());
           }
  +        
  +        if(getColumns() != -1 && getRows() != -1) {
  +            getSheet().addMergedRegion(new Region(getRow(),(short)getColumn(),getRow()
+ getRows() - 1,(short)(getColumn() + getColumns() - 1)));
  +        }
  +
       }
   
       /**
  
  
  
  1.385     +4 -1      cocoon-2.1/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.384
  retrieving revision 1.385
  diff -u -r1.384 -r1.385
  --- status.xml	4 Jul 2004 20:57:02 -0000	1.384
  +++ status.xml	5 Jul 2004 18:38:03 -0000	1.385
  @@ -204,6 +204,9 @@
   
     <changes>
    <release version="@version@" date="@date@">
  +   <action dev="TC" type="add" fixes-bug="28015" due-to="Frank Taffelt" due-to-email="frank.taffelt@interface-business.de">
  +     POI: cell spanning
  +   </action>
      <action dev="AG" type="fix" fixes-bug="23002" due-to="Viktor Skladovs" due-to-email="skladov@his.de">
        POI: processing of tags "vcenter", "hcenter", "monochrome", "draft", "Header", "Footer"
in "gmr:PrintInformation".
        Initial support for "Margins" ("top", "bottom", "left", "right", "header", "footer").
  
  
  

Mime
View raw message