This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 24049be  Fixed typos, removed whitespace
24049be is described below

commit 24049bef1e15be3b561ce6dc8cce0cceb3dda1e5
Author: mseidel <[email protected]>
AuthorDate: Thu Nov 26 16:42:03 2020 +0100

    Fixed typos, removed whitespace
    
    (cherry picked from commit 3dd473e4ac4461434a4b21fa5d701c93a7dd66f3)
---
 .../source/xslt/odf2xhtml/export/common/body.xsl   | 176 ++++++++++-----------
 .../converter/xml/sxc/SxcDocumentDeserializer.java | 167 ++++++++++---------
 2 files changed, 171 insertions(+), 172 deletions(-)

diff --git a/main/filter/source/xslt/odf2xhtml/export/common/body.xsl 
b/main/filter/source/xslt/odf2xhtml/export/common/body.xsl
index 3670ece..7e52b03 100644
--- a/main/filter/source/xslt/odf2xhtml/export/common/body.xsl
+++ b/main/filter/source/xslt/odf2xhtml/export/common/body.xsl
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************
- * 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * 
- ***********************************************************-->
-
+<!--***********************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ ***********************************************************-->
+
 
 <!--
-       For further documentation and updates visit 
http://xml.openoffice.org/odf2xhtml
+       For further documentation and updates visit 
https://xml.openoffice.org/odf2xhtml
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xml [...]
 
@@ -70,7 +70,7 @@
        </xsl:template>
 
        <!-- currentSolution: 8 non-breakable-spaces instead of a TAB is an 
approximation.
-                Sometimes less spaces than 8 might be needed and the output 
might be more difficult to read-->
+                Sometimes less spaces than 8 might be needed and the output 
might be more difficult to read -->
        <xsl:template match="text:tab">
                <xsl:param name="globalData"/>
 
@@ -158,7 +158,7 @@
                </xsl:element>
        </xsl:template>
 
-    <xsl:template match="@text:name">
+       <xsl:template match="@text:name">
                <xsl:attribute name="id">
                        <xsl:choose>
                                <xsl:when test="number(substring(.,1,1))">
@@ -170,15 +170,15 @@
                                        <xsl:value-of select="translate(., 
'&#xA;&amp;&lt;&gt;.,;: %()[]/\+', '___________________________')"/>
                                </xsl:otherwise>
                        </xsl:choose>
-        </xsl:attribute>
-    </xsl:template>
-    
+               </xsl:attribute>
+       </xsl:template>
+               
        <xsl:template match="text:sequence">
                <xsl:param name="globalData"/>
 
                <xsl:element namespace="{$namespace}" name="a">
                        <xsl:apply-templates select="@*" />
-                       <xsl:attribute name="id">                       
+                       <xsl:attribute name="id">
                                <xsl:choose>
                                        <xsl:when 
test="number(substring(@text:ref-name,1,1))">
                                        <!-- Heuristic: If the first character 
is a number a 'a_' will be set
@@ -188,7 +188,7 @@
                                        <xsl:otherwise>
                                                <xsl:value-of 
select="translate(@text:ref-name, '&#xA;&amp;&lt;&gt;.,;: %()[]/\+', 
'___________________________')"/>
                                        </xsl:otherwise>
-                               </xsl:choose>                   
+                               </xsl:choose>
                        </xsl:attribute>
                </xsl:element>
 
@@ -212,7 +212,7 @@
                                        <xsl:otherwise>
                                                <xsl:value-of 
select="translate(@text:name, '&#xA;&amp;&lt;&gt;.,;: %()[]/\+', 
'___________________________')"/>
                                        </xsl:otherwise>
-                               </xsl:choose>                                   
+                               </xsl:choose>
                        </xsl:attribute>
                </xsl:element>
 
@@ -258,60 +258,60 @@
                <xsl:apply-templates/>
        </xsl:template>
 
-   
-    <xsl:template match="office:annotation">
-        <xsl:element name="span">
-            <xsl:attribute name="title">annotation</xsl:attribute>       
-            <xsl:attribute 
name="class">annotation_style_by_filter</xsl:attribute>                    
-            <xsl:apply-templates select="@*" />
-            <br/>            
-            <xsl:text>[ANNOTATION:</xsl:text>
-            <br/>
-            <xsl:apply-templates select="*" mode="annotation"/>
-            <xsl:text>]</xsl:text>           
-        </xsl:element>
-    </xsl:template>
-    
-    <xsl:template match="text:p" mode="annotation">
-        <br/>    
-        <xsl:element name="span">
-            <xsl:text>NOTE: '</xsl:text>            
-            <xsl:apply-templates />
-            <xsl:text>'</xsl:text>                        
-        </xsl:element>
-    </xsl:template>
-        
-    <xsl:template match="dc:creator" mode="annotation">
-        <br/>     
-        <xsl:element name="span">
-            <xsl:attribute name="title">dc:creator</xsl:attribute>  
-            <xsl:text>BY '</xsl:text>            
-            <xsl:apply-templates />
-            <xsl:text>'</xsl:text>
-        </xsl:element>   
-    </xsl:template>
-    
-    <xsl:template match="dc:date" mode="annotation">  
-        <br/>     
-        <xsl:element name="span">
-            <xsl:attribute name="title">dc:date</xsl:attribute>
-            <xsl:text>ON '</xsl:text>                    
-            <xsl:apply-templates />
-            <xsl:text>'</xsl:text>
-        </xsl:element>       
-    </xsl:template>    
-    
-    <xsl:template match="meta:date-string" mode="annotation">
-        <br/>    
-        <xsl:element name="span">
-            <xsl:attribute name="title">meta-date-string</xsl:attribute>  
-            <xsl:text>META DATE '</xsl:text>                            
-            <xsl:apply-templates />
-            <xsl:text>'</xsl:text>            
-        </xsl:element>           
-    </xsl:template>    
-        
-    
+
+       <xsl:template match="office:annotation">
+               <xsl:element name="span">
+                       <xsl:attribute name="title">annotation</xsl:attribute>
+                       <xsl:attribute 
name="class">annotation_style_by_filter</xsl:attribute>
+                       <xsl:apply-templates select="@*" />
+                       <br/>
+                       <xsl:text>[ANNOTATION:</xsl:text>
+                       <br/>
+                       <xsl:apply-templates select="*" mode="annotation"/>
+                       <xsl:text>]</xsl:text>
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template match="text:p" mode="annotation">
+               <br/>
+               <xsl:element name="span">
+                       <xsl:text>NOTE: '</xsl:text>
+                       <xsl:apply-templates />
+                       <xsl:text>'</xsl:text>
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template match="dc:creator" mode="annotation">
+               <br/>
+               <xsl:element name="span">
+                       <xsl:attribute name="title">dc:creator</xsl:attribute>
+                       <xsl:text>BY '</xsl:text>
+                       <xsl:apply-templates />
+                       <xsl:text>'</xsl:text>
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template match="dc:date" mode="annotation">
+               <br/>
+               <xsl:element name="span">
+                       <xsl:attribute name="title">dc:date</xsl:attribute>
+                       <xsl:text>ON '</xsl:text>
+                       <xsl:apply-templates />
+                       <xsl:text>'</xsl:text>
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template match="meta:date-string" mode="annotation">
+               <br/>
+               <xsl:element name="span">
+                       <xsl:attribute 
name="title">meta-date-string</xsl:attribute>
+                       <xsl:text>META DATE '</xsl:text>
+                       <xsl:apply-templates />
+                       <xsl:text>'</xsl:text>
+               </xsl:element>
+       </xsl:template>
+
+
        <!-- *************** -->
        <!-- *** HELPER  *** -->
        <!-- *************** -->
@@ -321,7 +321,7 @@
                <xsl:param name="href"/>
 
                <xsl:choose>
-                       <!-- internal OOo URL used in content tables -->
+                       <!-- internal AOO URL used in content tables -->
                        <xsl:when test="contains($href, '%7Coutline')">
                                <!-- the simple workaround for content tables 
in a single document is to create create an anchor from every heading element
                                         work-around downside: Multiple 
identical headings won't refer always to the first.
@@ -338,10 +338,10 @@
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:choose>
-                                        <!-- in case of packed open office 
document -->
+                                        <!-- in case of packed OpenOffice 
document -->
                                        <xsl:when 
test="starts-with($sourceBaseURL, 'jar:') or $isPackageFormat">
                                                <xsl:choose>
-                                                        <!-- for images 
relative to open office document -->
+                                                        <!-- for images 
relative to OpenOffice document -->
                                                        <xsl:when 
test="starts-with($href, '../')">
                                                                <!-- creating 
an absolute http URL to the packed image file (removing the '.')-->
                                                                <xsl:value-of 
select="concat(substring-after(substring-before($sourceBaseURL, '!'), 'jar:'), 
'/', $href, $optionalURLSuffix)"/>
@@ -350,7 +350,7 @@
                                                        <xsl:when 
test="contains($href, ':') or starts-with($href, '/')">
                                                                <xsl:value-of 
select="concat($href, $optionalURLSuffix)"/>
                                                        </xsl:when>
-                                                       <!-- for images jared 
in open office document -->
+                                                       <!-- for images jared 
in OpenOffice document -->
                                                        <xsl:otherwise>
                                                                <xsl:value-of 
select="concat($sourceBaseURL, $href, $optionalURLSuffix)"/>
                                                        </xsl:otherwise>
diff --git 
a/main/xmerge/java/xmerge/src/main/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java
 
b/main/xmerge/java/xmerge/src/main/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java
index 8fd0229..5d4b4f8 100644
--- 
a/main/xmerge/java/xmerge/src/main/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java
+++ 
b/main/xmerge/java/xmerge/src/main/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -47,7 +47,7 @@ import org.openoffice.xmerge.util.Debug;
  *  <p>General spreadsheet implementation of <code>DocumentDeserializer</code>
  *  for the {@link
  *  org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory
- *  SxcPluginFactory}.  Used with SXC <code>Document</code> objects.</p>
+ *  SxcPluginFactory}. Used with SXC <code>Document</code> objects.</p>
  *
  *  <p>The <code>deserialize</code> method uses a <code>DocDecoder</code>
  *  to read the device spreadsheet format into a <code>String</code>
@@ -56,45 +56,45 @@ import org.openoffice.xmerge.util.Debug;
  *
  *  @author      Paul Rank
  *  @author      Mark Murnane
- *  @author      Martin Maher 
+ *  @author      Martin Maher
  */
 public abstract class SxcDocumentDeserializer implements OfficeConstants,
-    DocumentDeserializer {
+       DocumentDeserializer {
 
-    /**
-     *  A <code>SpreadsheetDecoder</code> object for decoding from
-     *  device formats.
-     */
-    private SpreadsheetDecoder decoder = null;
+       /**
+        *  A <code>SpreadsheetDecoder</code> object for decoding from
+        *  device formats.
+        */
+       private SpreadsheetDecoder decoder = null;
+
+       /**  A w3c <code>Document</code>. */
+       private org.w3c.dom.Document settings = null;
 
-    /**  A w3c <code>Document</code>. */
-    private org.w3c.dom.Document settings = null;
+       /**  A w3c <code>Document</code>. */
+       private org.w3c.dom.Document doc = null;
 
-    /**  A w3c <code>Document</code>. */
-    private org.w3c.dom.Document doc = null;
+       /**  An <code>ConvertData</code> object assigned to this object. */
+       private ConvertData cd = null;
 
-    /**  An <code>ConvertData</code> object assigned to this object. */
-    private ConvertData cd = null;
-       
-       /** A style catalog for the workbook  */
+       /** A style catalog for the workbook */
        private StyleCatalog styleCat = null;
 
        private int textStyles = 1;
        private int colStyles = 1;
        private int rowStyles = 1;
-       
-    /**
-     *  Constructor.
-     *
-     *  @param  cd  <code>ConvertData</code> consisting of a
-     *              device content object.
-     */
-    public SxcDocumentDeserializer(ConvertData cd) {
-        this.cd = cd;
-    }
+
+       /**
+        *  Constructor.
+        *
+        *  @param  cd  <code>ConvertData</code> consisting of a
+        *              device content object.
+        */
+       public SxcDocumentDeserializer(ConvertData cd) {
+               this.cd = cd;
+       }
 
 
-    /** 
+    /**
      *  This abstract method will be implemented by concrete subclasses
      *  and will return an application-specific Decoder.
      *
@@ -108,23 +108,23 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
     public abstract SpreadsheetDecoder createDecoder(String workbook, String[] 
worksheetNames, String password)
         throws IOException;
 
-    
+
     /**
      *  <p>This method will return the name of the WorkBook from the
-     *  <code>ConvertData</code>.  Allows for situations where the
+     *  <code>ConvertData</code>. Allows for situations where the
      *  WorkBook name differs from the Device Content name.</p>
      *
      *  <p>Implemented in the Deserializer as the Decoder's constructor 
requires
      *  a name.</p>
      *
-     *  @param  cd  The <code>ConvertData</code> containing the Device 
+     *  @param  cd  The <code>ConvertData</code> containing the Device
      *              content.
      *
      *  @return  The WorkBook name.
      */
     protected abstract String getWorkbookName(ConvertData cd) throws 
IOException;
 
-    
+
     /**
      *  This method will return the name of the WorkSheet from the
      *  <code>ConvertData</code>.
@@ -135,8 +135,8 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
      *  @return  The WorkSheet names.
      */
     protected abstract String[] getWorksheetNames(ConvertData cd) throws 
IOException;
-    
-    
+
+
     /**
      *  <p>Method to convert a set of &quot;Device&quot;
      *  <code>Document</code> objects into a <code>SxcDocument</code>
@@ -166,9 +166,9 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
         sxcDoc.initContentDOM();
         sxcDoc.initSettingsDOM();
 
-               // Default to an initial 5 entries in the catalog.  
+               // Default to an initial 5 entries in the catalog.
         styleCat = new StyleCatalog(5);
-               
+
         doc = sxcDoc.getContentDOM();
                settings = sxcDoc.getSettingsDOM();
                initFontTable();
@@ -177,7 +177,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
 
         // Create a Decoder to decode the DeviceContent to a spreadsheet 
document
         // TODO - we aren't using a password in StarCalc, so we can
-        // use any value for password here.  If StarCalc XML supports
+        // use any value for password here. If StarCalc XML supports
         // passwords in the future, we should try to get the correct
         // password value here.
         //
@@ -200,14 +200,14 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
         *
         */
        private void initFontTable() {
-       
+
                String fontTable[]= new String[] {      "Tahoma", "Tahoma", 
"swiss", "variable",
                                                                                
        "Courier New", "&apos;Courier New&apos;", "modern", "fixed"};
         //  Traverse to the office:body element.
         //  There should only be one.
                NodeList list = doc.getElementsByTagName(TAG_OFFICE_FONT_DECLS);
                Node root = list.item(0);
-       
+
                for(int i=0;i<fontTable.length;) {
 
                        // Create an element node for the table
@@ -258,8 +258,8 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
                 processTable(node);
             }
         }
-               
-               // Add the Defined Name table if there is one 
+
+               // Add the Defined Name table if there is one
                Enumeration nameDefinitionTable = decoder.getNameDefinitions();
                if(nameDefinitionTable.hasMoreElements()) {
                        processNameDefinition(node, nameDefinitionTable);
@@ -267,24 +267,24 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
 
                // add settings
                NodeList settingsList = 
settings.getElementsByTagName(TAG_OFFICE_SETTINGS);
-               Node settingsNode = settingsList.item(0);;              
+               Node settingsNode = settingsList.item(0);;
                processSettings(settingsNode);
 
     }
-       
 
-       
+
+
     /**
      *  This method process the settings portion
-        *  of the <code>Document</code>.  
+        *  of the <code>Document</code>.
         *
      *  @param  root  The root <code>Node</code> of the
-     *                <code>Document</code> we are building.  This
+     *                <code>Document</code> we are building. This
      *                <code>Node</code> should be a TAG_OFFICE_SETTINGS
      *                tag.
      */
     protected void processSettings(Node root) {
-       
+
                Element configItemSetEntry              = (Element) 
settings.createElement(TAG_CONFIG_ITEM_SET);
                configItemSetEntry.setAttribute(ATTRIBUTE_CONFIG_NAME, 
"view-settings");
                Element configItemMapIndexed    = (Element) 
settings.createElement(TAG_CONFIG_ITEM_MAP_INDEXED);
@@ -292,18 +292,18 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
                Element configItemMapEntry              = (Element) 
settings.createElement(TAG_CONFIG_ITEM_MAP_ENTRY);
                BookSettings bs = (BookSettings) decoder.getSettings();
                bs.writeNode(settings, configItemMapEntry);
-       
+
                configItemMapIndexed.appendChild(configItemMapEntry);
                configItemSetEntry.appendChild(configItemMapIndexed);
                root.appendChild(configItemSetEntry);
        }
-       
+
     /**
      *  This method process a Name Definition Table and generates a portion
-     *  of the <code>Document</code>.  
+     *  of the <code>Document</code>.
         *
      *  @param  root  The root <code>Node</code> of the
-     *                <code>Document</code> we are building.  This
+     *                <code>Document</code> we are building. This
      *                <code>Node</code> should be a TAG_OFFICE_BODY
      *                tag.
      *
@@ -325,14 +325,14 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
 
         Debug.log(Debug.TRACE, "</NAMED-EXPRESSIONS>");
     }
-       
+
     /**
      *  This method process a WorkSheet and generates a portion
-     *  of the <code>Document</code>.  A spreadsheet is represented
+     *  of the <code>Document</code>. A spreadsheet is represented
      *  as a table Node in StarOffice XML format.
      *
      *  @param  root  The root <code>Node</code> of the
-     *                <code>Document</code> we are building.  This
+     *                <code>Document</code> we are building. This
      *                <code>Node</code> should be a TAG_OFFICE_BODY
      *                tag.
      *
@@ -362,7 +362,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
 
                // add the various different table-columns
                processColumns(tableElement);
-               
+
         // Get each cell and add to doc
         processCells(tableElement);
 
@@ -378,7 +378,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
      *
      *  @param  root  The <code>Node</code> of the <code>Document</code>
      *                we are building that we will append our cell
-     *                <code>Node</code> objects.  This <code>Node</code>
+     *                <code>Node</code> objects. This <code>Node</code>
      *                should be a TAG_TABLE tag.
      *
      *  @throws  IOException  If any I/O error occurs.
@@ -386,7 +386,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
     protected void processColumns(Node root) throws IOException {
 
                for(Enumeration e = 
decoder.getColumnRowInfos();e.hasMoreElements();) {
-               
+
                        ColumnRowInfo ci = (ColumnRowInfo) e.nextElement();
                        if(ci.isColumn()) {
                                ColumnStyle cStyle = new 
ColumnStyle("Default",SxcConstants.COLUMN_STYLE_FAMILY,
@@ -395,7 +395,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
                                Style result[] = (Style[]) 
styleCat.getMatching(cStyle);
                                String styleName;
                                if(result.length==0) {
-                               
+
                                                cStyle.setName("co" + 
colStyles++);
                                                styleName = cStyle.getName();
                                                Debug.log(Debug.TRACE,"No 
existing style found, adding " + styleName);
@@ -427,7 +427,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
      *
      *  @param  root  The <code>Node</code> of the <code>Document</code>
      *                we are building that we will append our cell
-     *                <code>Node</code> objects.  This <code>Node</code>
+     *                <code>Node</code> objects. This <code>Node</code>
      *                should be a TAG_TABLE tag.
      *
      *  @throws  IOException  If any I/O error occurs.
@@ -450,8 +450,8 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
 
         // The number of columns in the spreadsheet
         int lastColumn = decoder.getNumberOfColumns();
-               
-               // 
+
+               //
                Node autoStylesNode = null;
 
         // Loop over all cells in the spreadsheet
@@ -501,7 +501,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
                                                Style result[] = (Style[]) 
styleCat.getMatching(rStyle);
                                                String styleName;
                                                if(result.length==0) {
-                                       
+
                                                                
rStyle.setName("ro" + rowStyles++);
                                                                styleName = 
rStyle.getName();
                                                                
Debug.log(Debug.TRACE,"No existing style found, adding " + styleName);
@@ -510,12 +510,12 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
                                                                RowStyle 
existingStyle = (RowStyle) result[0];
                                                                styleName = 
existingStyle.getName();
                                                                
Debug.log(Debug.TRACE,"Existing style found : " + styleName);
-                                               }                               
                
+                                               }
                                                
rowElement.setAttribute(ATTRIBUTE_TABLE_STYLE_NAME, styleName);
                                                // For now we will not use the 
repeat column attribute
                                        }
                                }
-               
+
                 // Append the row element to the root node
                 root.appendChild(rowElement);
 
@@ -550,7 +550,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
             // Get the type of the data in the cell
             String cellType = decoder.getCellDataType();
 
-            // Get the cell format 
+            // Get the cell format
             Format fmt = decoder.getCellFormat();
 
             // Create an element node for the cell
@@ -566,14 +566,14 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
                autoStylesNode = doc.createElement(TAG_OFFICE_AUTOMATIC_STYLES);
                doc.insertBefore(autoStylesNode, bodyNode);
                        }
-                       
+
                        CellStyle tStyle = new
                        CellStyle(      
"Default",SxcConstants.TABLE_CELL_STYLE_FAMILY,
                                                SxcConstants.DEFAULT_STYLE, 
fmt, null);
                        String styleName;
                        Style result[] = (Style[]) styleCat.getMatching(tStyle);
                        if(result.length==0) {
-                               
+
                                        tStyle.setName("ce" + textStyles++);
                                        styleName = tStyle.getName();
                                        Debug.log(Debug.TRACE,"No existing 
style found, adding " + styleName);
@@ -583,9 +583,9 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
                                        styleName = existingStyle.getName();
                                        Debug.log(Debug.TRACE,"Existing style 
found : " + styleName);
                        }
-                       
+
             cellElement.setAttribute(ATTRIBUTE_TABLE_STYLE_NAME, styleName);
-                       
+
             // Store the cell data into the appropriate attributes
             processCellData(cellElement, cellType, cellContents);
 
@@ -609,7 +609,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
             int numSkippedCells = lastColumn - col + 1;
             addEmptyCells(numSkippedCells, rowElement);
         }
-               
+
         // Now write the style catalog to the document
                if(autoStylesNode!=null) {
                        Debug.log(Debug.TRACE,"Well the autostyle node was 
found!!!");
@@ -633,12 +633,12 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
      *  It is called when the conversion process encounters
      *  a row (or rows) that do not contain any data in its cells.
      *
-     *  @param  numEmptyRows   The number of empty rows that we 
+     *  @param  numEmptyRows   The number of empty rows that we
      *                         need to add to the <code>Document</code>.
      *  @param  root           The <code>Node</code> of the
      *                         <code>Document</code> we are building
      *                         that we will append our empty row
-     *                         <code>Node</code> objects.  This
+     *                         <code>Node</code> objects. This
      *                         <code>Node</code> should be a TAG_TABLE
      *                         tag.
      *  @param  numEmptyCells  The number of empty cells in the
@@ -660,11 +660,11 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
         // Append the row element to the root node
         root.appendChild(rowElement);
 
-        // Open Office requires the empty row to have an empty cell (or cells)
+        // OpenOffice requires the empty row to have an empty cell (or cells)
         addEmptyCells(numEmptyCells, rowElement);
 
         // Write empty rows to the log
-        for (int i = 0;  i < numEmptyRows; i++) {
+        for (int i = 0; i < numEmptyRows; i++) {
             Debug.log(Debug.TRACE, "<tr />");
         }
 
@@ -681,7 +681,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
      *                           current row.
      *  @param   row             The <code>Node</code> of the
      *                           <code>Document</code> we
-     *                           are building that we will 
+     *                           are building that we will
      *                           append our empty cell
      *                           <code>Node</code> objects.
      *                           This <code>Node</code> should
@@ -709,7 +709,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
         row.appendChild(cellElement);
 
         // Write empty cells to the log
-        for (int i = 0;  i < numColsSkipped; i++) {
+        for (int i = 0; i < numColsSkipped; i++) {
             Debug.log(Debug.TRACE, "<td />");
         }
     }
@@ -720,7 +720,7 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
      *  the appropriate attributes on the cell <code>Element</code>.
      *
      *  @param   cellElement  A TAG_TABLE_CELL <code>Element</code>
-     *                        that we will be adding attributes to 
+     *                        that we will be adding attributes to
      *                        based on the type of data in the cell.
      *  @param   type         The type of data contained in the cell.
      *  @param   contents     The contents of the data contained in
@@ -757,15 +757,15 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
 
             } else if (type.equals(CELLTYPE_BOOLEAN)) {
 
-                // StarOffice XML format requires stored boolean value 
+                // StarOffice XML format requires stored boolean value
                 // to be in lower case
                 cellElement.setAttribute(ATTRIBUTE_TABLE_BOOLEAN_VALUE,
                                          contents.toLowerCase());
 
             } else if (type.equals(CELLTYPE_CURRENCY)) {
                 // TODO - StarOffice XML format requires a correct style to
-                // display currencies correctly.  Need to implement styles.
-                // TODO - USD is for US currencies.  Need to pick up
+                // display currencies correctly. Need to implement styles.
+                // TODO - USD is for US currencies. Need to pick up
                 // the correct currency location from the source file.
                 cellElement.setAttribute(ATTRIBUTE_TABLE_CURRENCY, "USD");
 
@@ -783,6 +783,5 @@ public abstract class SxcDocumentDeserializer implements 
OfficeConstants,
             }
         }
     }
-
 }
 

Reply via email to