]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
white-space and line-ending fixes
authorWilliam Victor Mote <vmote@apache.org>
Fri, 29 Nov 2002 23:18:59 +0000 (23:18 +0000)
committerWilliam Victor Mote <vmote@apache.org>
Fri, 29 Nov 2002 23:18:59 +0000 (23:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195677 13f79535-47bb-0310-9956-ffa450edef68

72 files changed:
src/codegen/Symbol.xml
src/codegen/ZapfDingbats.xml
src/codegen/charlist.xml
src/codegen/enumgen.xsl
src/codegen/font-file.xsl
src/codegen/foproperties.xml
src/codegen/properties.dtd
src/codegen/properties.xsl
src/codegen/propinc.xsl
src/codegen/propmaker.xsl
src/codegen/propmap.xsl
src/codegen/t1font-file.xsl
src/codegen/ttffontfile.xsl
src/org/apache/fop/apps/Driver.java
src/org/apache/fop/apps/PrintStarter.java
src/org/apache/fop/area/Area.java
src/org/apache/fop/area/AreaTree.java
src/org/apache/fop/area/CachedRenderPagesModel.java
src/org/apache/fop/area/PageViewport.java
src/org/apache/fop/area/RegionReference.java
src/org/apache/fop/area/Trait.java
src/org/apache/fop/fo/AbstractCharIterator.java
src/org/apache/fop/fo/OneCharIterator.java
src/org/apache/fop/fo/flow/Inline.java
src/org/apache/fop/fo/flow/ListBlock.java
src/org/apache/fop/fo/flow/ListItem.java
src/org/apache/fop/fo/flow/TableCell.java
src/org/apache/fop/fo/flow/TableRow.java
src/org/apache/fop/fo/pagination/LayoutMasterSet.java
src/org/apache/fop/fonts/FontFileReader.java
src/org/apache/fop/fonts/Glyphs.java
src/org/apache/fop/fonts/TTFCmapEntry.java
src/org/apache/fop/fonts/TTFDirTabEntry.java
src/org/apache/fop/fonts/TTFFile.java
src/org/apache/fop/fonts/TTFMtxEntry.java
src/org/apache/fop/fonts/TTFSubSetFile.java
src/org/apache/fop/fonts/apps/FontPostProcess.xsl
src/org/apache/fop/fonts/apps/FontPostProcessSort.xsl
src/org/apache/fop/image/AbstractFopImage.java
src/org/apache/fop/image/ImageFactory.java
src/org/apache/fop/layoutmgr/AbstractLayoutManager.java
src/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
src/org/apache/fop/layoutmgr/BlockLayoutManager.java
src/org/apache/fop/layoutmgr/FlowLayoutManager.java
src/org/apache/fop/layoutmgr/LineLayoutManager.java
src/org/apache/fop/layoutmgr/PageLayoutManager.java
src/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
src/org/apache/fop/layoutmgr/list/Item.java
src/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
src/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
src/org/apache/fop/layoutmgr/table/Row.java
src/org/apache/fop/layoutmgr/table/TableLayoutManager.java
src/org/apache/fop/mif/MIFHandler.java
src/org/apache/fop/pdf/DCTFilter.java
src/org/apache/fop/pdf/PDFColorSpace.java
src/org/apache/fop/pdf/PDFDocument.java
src/org/apache/fop/pdf/PDFFunction.java
src/org/apache/fop/pdf/PDFICCStream.java
src/org/apache/fop/pdf/PDFOutline.java
src/org/apache/fop/pdf/PDFPage.java
src/org/apache/fop/pdf/PDFResourceContext.java
src/org/apache/fop/render/pdf/FontSetup.java
src/org/apache/fop/render/pdf/FopPDFImage.java
src/org/apache/fop/render/pdf/PDFRenderer.java
src/org/apache/fop/render/pdf/fonts/LazyFont.java
src/org/apache/fop/rtf/renderer/RTFHandler.java
src/org/apache/fop/svg/PDFANode.java
src/org/apache/fop/svg/PDFDocumentGraphics2D.java
src/org/apache/fop/svg/PDFGraphics2D.java
src/org/apache/fop/viewer/GoToPageDialog.java
src/org/apache/fop/viewer/PreviewDialog.java
src/org/apache/fop/viewer/Translator.java

index 0776bee014d7e667844a1216de53eb1badde2594..d3f52c363c0a232cf70946281de737b2ef62b536 100644 (file)
@@ -2,7 +2,7 @@
   <font-name>Symbol</font-name>
   <class-name>Symbol</class-name>
   <encoding>SymbolEncoding</encoding>
-  <cap-height>1010</cap-height> 
+  <cap-height>1010</cap-height>
   <x-height>520</x-height>
   <ascender>1010</ascender>
   <descender>-293</descender>
index 25b61871c55b2f05786d9bf889c75fea5be9c651..39fbb71415320bf34acab7d5957d87fa60d73af9 100644 (file)
@@ -2,7 +2,7 @@
   <font-name>ZapfDingbats</font-name>
   <class-name>ZapfDingbats</class-name>
   <encoding>ZapfDingbatsEncoding</encoding>
-  <cap-height>820</cap-height> 
+  <cap-height>820</cap-height>
   <x-height>426</x-height>
   <ascender>820</ascender>
   <descender>-143</descender>
index 9c9854a7eb64119bbdae4bd01becf44239fcfd8b..691d2f6d71112fffc38c602b7944c6033de78a4d 100644 (file)
    <map adobe-name="a189" win-ansi="0x00FC" unicode="0x27BC" unicodeName="WEDGE-TAILED RIGHTWARDS ARROW"/>
    <map adobe-name="a190" win-ansi="0x00FD" unicode="0x27BD" unicodeName="HEAVY WEDGE-TAILED RIGHTWARDS ARROW"/>
    <map adobe-name="a191" win-ansi="0x00FE" unicode="0x27BE" unicodeName="OPEN-OUTLINED RIGHTWARDS ARROW"/>
-   <!-- the following mappings are used for the Symbol font 
+   <!-- the following mappings are used for the Symbol font
     TBD: remove doublettes  -->
    <map adobe-name="universal" win-ansi="0x22" unicode="0x2200"/>
    <map adobe-name="existential" win-ansi="0x24" unicode="0x2203"/>
 </font-mappings>
 <!--  I couldn't find the following characters in the unicode tables -->
 <!--
-   <map adobe-name="center" win-ansi="-1" unicode=""/> 
-   <map adobe-name="dectab" win-ansi="-1" unicode=""/> 
-   <map adobe-name="down" win-ansi="-1" unicode=""/> 
-   <map adobe-name="format" win-ansi="-1" unicode=""/> 
-   <map adobe-name="graybox" win-ansi="-1" unicode=""/> 
-   <map adobe-name="indent" win-ansi="-1" unicode=""/> 
-   <map adobe-name="largebullet" win-ansi="-1" unicode=""/> 
-   <map adobe-name="left" win-ansi="-1" unicode=""/>   
-   <map adobe-name="ll" win-ansi="-1" unicode=""/>  
-   <map adobe-name="LL" win-ansi="-1" unicode=""/> 
-   <map adobe-name="merge" win-ansi="-1" unicode=""/> 
-   <map adobe-name="notegraphic" win-ansi="-1" unicode=""/> 
-   <map adobe-name="overscore" win-ansi="-1" unicode=""/> 
-   <map adobe-name="prescription" win-ansi="-1" unicode=""/> 
-   <map adobe-name="return" win-ansi="-1" unicode=""/> 
+   <map adobe-name="center" win-ansi="-1" unicode=""/>
+   <map adobe-name="dectab" win-ansi="-1" unicode=""/>
+   <map adobe-name="down" win-ansi="-1" unicode=""/>
+   <map adobe-name="format" win-ansi="-1" unicode=""/>
+   <map adobe-name="graybox" win-ansi="-1" unicode=""/>
+   <map adobe-name="indent" win-ansi="-1" unicode=""/>
+   <map adobe-name="largebullet" win-ansi="-1" unicode=""/>
+   <map adobe-name="left" win-ansi="-1" unicode=""/>
+   <map adobe-name="ll" win-ansi="-1" unicode=""/>
+   <map adobe-name="LL" win-ansi="-1" unicode=""/>
+   <map adobe-name="merge" win-ansi="-1" unicode=""/>
+   <map adobe-name="notegraphic" win-ansi="-1" unicode=""/>
+   <map adobe-name="overscore" win-ansi="-1" unicode=""/>
+   <map adobe-name="prescription" win-ansi="-1" unicode=""/>
+   <map adobe-name="return" win-ansi="-1" unicode=""/>
    <map adobe-name="square" win-ansi="-1" unicode=""/>
    <map adobe-name="stop" win-ansi="-1" unicode=""/>
    <map adobe-name="tab" win-ansi="-1" unicode=""/>
index 6a538e590461c4efa2c3938daa71af348549b689..a9898f551197b3d2b33bbe780e996e21d8ee7cc5 100644 (file)
   </xsl:choose>
   </xsl:variable>
    <xsl:variable name="bEnum">
-       <xsl:call-template name="hasEnum"/>
+  <xsl:call-template name="hasEnum"/>
    </xsl:variable>
    <xsl:variable name="bSubpropEnum">
-       <xsl:call-template name="hasSubpropEnum"/>
+  <xsl:call-template name="hasSubpropEnum"/>
    </xsl:variable>
 
    <xsl:if test="$bEnum='true' or contains($bSubpropEnum, 'true')">
@@ -38,7 +38,7 @@ package org.apache.fop.fo.properties;
 <!-- Handle enumeration values -->
     public interface <xsl:value-of select="$classname"/>
     <xsl:if test="use-generic and $bEnum='true'">
-       extends  <xsl:value-of select="use-generic"/>.Enums
+  extends  <xsl:value-of select="use-generic"/>.Enums
     </xsl:if>{
    <xsl:for-each select="enumeration/value">
      public final static int <xsl:value-of select="@const"/> = Constants.<xsl:value-of select="@const"/>;
@@ -69,18 +69,18 @@ package org.apache.fop.fo.properties;
       </xsl:call-template>
     </xsl:when>
     <xsl:when test="$prop/compound/subproperty/use-generic">
-       <!-- generate "interface <subprop> extends <gensubprop>.Enums" -->
-       <xsl:for-each select="$prop/compound/subproperty[use-generic]">
-         <xsl:variable name="bSpEnum">
-           <xsl:call-template name="hasEnum">
-             <xsl:with-param name="prop"
-               select="key('genericref', use-generic)"/>
+  <!-- generate "interface <subprop> extends <gensubprop>.Enums" -->
+  <xsl:for-each select="$prop/compound/subproperty[use-generic]">
+    <xsl:variable name="bSpEnum">
+      <xsl:call-template name="hasEnum">
+        <xsl:with-param name="prop"
+       select="key('genericref', use-generic)"/>
             </xsl:call-template>
-         </xsl:variable>
-         <xsl:if test="$bSpEnum='true'">
-         public interface  <xsl:value-of select="name"/> extends  <xsl:value-of select="use-generic"/>.Enums { }
-         </xsl:if>
-       </xsl:for-each>
+    </xsl:variable>
+    <xsl:if test="$bSpEnum='true'">
+    public interface  <xsl:value-of select="name"/> extends  <xsl:value-of select="use-generic"/>.Enums { }
+    </xsl:if>
+  </xsl:for-each>
     </xsl:when>
     <xsl:otherwise>false</xsl:otherwise>
   </xsl:choose>
@@ -100,7 +100,7 @@ package org.apache.fop.fo.properties;
     </xsl:otherwise>
   </xsl:choose>
       </xsl:variable>
-       <!-- generate "interface <subprop> extends <genprop>.<subprop>" -->
+  <!-- generate "interface <subprop> extends <genprop>.<subprop>" -->
       <xsl:for-each select="$prop/compound/subproperty[enumeration]">
       <xsl:variable name="spname">
         <xsl:call-template name="makeClassName">
@@ -110,7 +110,7 @@ package org.apache.fop.fo.properties;
       public interface <xsl:value-of select="$spname"/> extends <xsl:value-of select="$generic_name"/>.Enums.<xsl:value-of select="$spname"/> {
       }
       </xsl:for-each>
-      
+
     <xsl:if test="$prop/use-generic">
       <xsl:call-template name="inhspenums">
          <xsl:with-param name="prop" select="key('genericref', $prop/use-generic)"/>
index 7167c5b54ec48f3eba19b8c0aa2764f1a48f91c5..f1bb6b16050639f698b12f7e8cb4073dcd11972d 100644 (file)
@@ -11,7 +11,7 @@
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
   <xsl:output method="text"/>
-  
+
   <xsl:param name="encoding" select="/font-metrics/encoding"/>
   <xsl:variable name="native-encoding" select="/font-metrics/encoding"/>
   <xsl:variable name="glyphs" select="document('encodings.xml')/encoding-set/encoding[@id=$encoding]/glyph"/>
@@ -43,7 +43,7 @@ public class <xsl:value-of select="class-name"/> extends Font {
     public String encoding() {
         return encoding;
     }
-    
+
     public String fontName() {
         return fontName;
     }
@@ -85,10 +85,10 @@ public class <xsl:value-of select="class-name"/> extends Font {
 
     public char mapChar(char c) {
         char d = mapping.mapChar(c);
-       if(d != 0)
+  if(d != 0)
             return d;
         else
-           return '#';
+      return '#';
     }
 
 }
index e66297968d16de514db07c2a7d4c5c7ca7494fa1..6888627279a3b12fd090a880e201c1a9100172ab 100644 (file)
 <?xml version="1.0" standalone="yes" ?>
 <property-list family="FO">
  <generic-property-list>
-       <property type="generic">
-               <name>generic-color</name>
-               <class-name>GenericColor</class-name>
-               <datatype>ColorType</datatype>
-               <extfile href="colorkw.xml"/>
+  <property type="generic">
+    <name>generic-color</name>
+    <class-name>GenericColor</class-name>
+    <datatype>ColorType</datatype>
+    <extfile href="colorkw.xml"/>
 <!--
-               <datatype-conversion from-type="String" varname="strval">
-                        new ColorType(strval)</datatype-conversion>
+    <datatype-conversion from-type="String" varname="strval">
+       new ColorType(strval)</datatype-conversion>
 -->
-       </property>
-       <property type="generic">
-               <name>generic-boolean</name>
-               <class-name>GenericBoolean</class-name>
-               <datatype>Enum</datatype>
-                       <enumeration>
-                               <value const="TRUE">true</value>
-                               <value const="FALSE">false</value>
-                       </enumeration>
-       </property>
-       <property type="generic">
-               <name>generic-keep</name>
-               <class-name>GenericKeep</class-name>
-               <datatype>Keep</datatype> <!-- CompoundDatatype -->
-               <compound>
-                       <subproperty set-by-shorthand="true">
-                               <name>within-page</name>
-               <datatype>Number</datatype>
-               <default>auto</default>
-                       <enumeration>
-                               <value const="AUTO">auto</value>
-                               <value const="ALWAYS">always</value>
-                       </enumeration>
-                       </subproperty>
-                       <subproperty set-by-shorthand="true">
-                               <name>within-line</name>
-               <datatype>Number</datatype>
-               <default>auto</default>
-                       <enumeration>
-                               <value const="AUTO">auto</value>
-                               <value const="ALWAYS">always</value>
-                       </enumeration>
-                       </subproperty>
-                       <subproperty set-by-shorthand="true">
-                               <name>within-column</name>
-               <datatype>Number</datatype>
-               <default>auto</default>
-                       <enumeration>
-                               <value const="AUTO">auto</value>
-                               <value const="ALWAYS">always</value>
-                       </enumeration>
-                       </subproperty>
-               </compound>
-       </property>
-       <property type="generic">
-               <name>conditional-length-template</name>
-               <class-name>GenericCondLength</class-name>
-               <datatype>CondLength</datatype>
-               <compound>
-                       <subproperty set-by-shorthand="true">
-                               <name>length</name>
-                               <datatype>Length</datatype>
-                       </subproperty>
-                       <subproperty>
-                               <name>conditionality</name>
-                               <datatype>Enum</datatype>
-                               <enumeration>
-                                       <value const="DISCARD">discard</value>
-                                       <value const="RETAIN">retain</value>
-                               </enumeration>
-                       </subproperty>
-               </compound>
-       </property>
-       <property type="generic">
-               <name>padding-template</name>
-               <class-name>GenericCondPadding</class-name>
-               <use-generic>GenericCondLength</use-generic>
-               <inherited>false</inherited>
-               <default subproperty="length">0pt</default>
-       </property>
-       <property type="generic">
-               <name>padding-template</name>
-               <class-name>GenericPadding</class-name>
-               <datatype>Length</datatype>
-               <inherited>false</inherited>
-               <default>0pt</default>
+  </property>
+  <property type="generic">
+    <name>generic-boolean</name>
+    <class-name>GenericBoolean</class-name>
+    <datatype>Enum</datatype>
+      <enumeration>
+        <value const="TRUE">true</value>
+        <value const="FALSE">false</value>
+      </enumeration>
+  </property>
+  <property type="generic">
+    <name>generic-keep</name>
+    <class-name>GenericKeep</class-name>
+    <datatype>Keep</datatype> <!-- CompoundDatatype -->
+    <compound>
+      <subproperty set-by-shorthand="true">
+        <name>within-page</name>
+    <datatype>Number</datatype>
+    <default>auto</default>
+      <enumeration>
+        <value const="AUTO">auto</value>
+        <value const="ALWAYS">always</value>
+      </enumeration>
+      </subproperty>
+      <subproperty set-by-shorthand="true">
+        <name>within-line</name>
+    <datatype>Number</datatype>
+    <default>auto</default>
+      <enumeration>
+        <value const="AUTO">auto</value>
+        <value const="ALWAYS">always</value>
+      </enumeration>
+      </subproperty>
+      <subproperty set-by-shorthand="true">
+        <name>within-column</name>
+    <datatype>Number</datatype>
+    <default>auto</default>
+      <enumeration>
+        <value const="AUTO">auto</value>
+        <value const="ALWAYS">always</value>
+      </enumeration>
+      </subproperty>
+    </compound>
+  </property>
+  <property type="generic">
+    <name>conditional-length-template</name>
+    <class-name>GenericCondLength</class-name>
+    <datatype>CondLength</datatype>
+    <compound>
+      <subproperty set-by-shorthand="true">
+        <name>length</name>
+        <datatype>Length</datatype>
+      </subproperty>
+      <subproperty>
+        <name>conditionality</name>
+        <datatype>Enum</datatype>
+        <enumeration>
+          <value const="DISCARD">discard</value>
+          <value const="RETAIN">retain</value>
+        </enumeration>
+      </subproperty>
+    </compound>
+  </property>
+  <property type="generic">
+    <name>padding-template</name>
+    <class-name>GenericCondPadding</class-name>
+    <use-generic>GenericCondLength</use-generic>
+    <inherited>false</inherited>
+    <default subproperty="length">0pt</default>
+  </property>
+  <property type="generic">
+    <name>padding-template</name>
+    <class-name>GenericPadding</class-name>
+    <datatype>Length</datatype>
+    <inherited>false</inherited>
+    <default>0pt</default>
                 <shorthand>padding</shorthand>
-       </property>
+  </property>
 
 <!-- Before, After, Start, End border width props -->
 <!-- CondLength, but adds keyword values both to the "shorthand" setting
-                and to the length component. So we redefine the components here,
-                rather than doing a "use-generic" on GenericCondLength.
+     and to the length component. So we redefine the components here,
+     rather than doing a "use-generic" on GenericCondLength.
 -->
-       <property type="generic">
-               <name>border-cond-width-template</name>
-               <class-name>GenericCondBorderWidth</class-name>
-               <keyword-equiv match="thin">0.5pt</keyword-equiv>
-               <keyword-equiv match="medium">1pt</keyword-equiv>
-               <keyword-equiv match="thick">2pt</keyword-equiv>
-               <inherited>false</inherited>
-               <datatype>CondLength</datatype>
-               <compound>
-                       <subproperty set-by-shorthand="true">
-                               <name>length</name>
-                               <datatype>Length</datatype>
-                               <keyword-equiv match="thin">0.5pt</keyword-equiv>
-                               <keyword-equiv match="medium">1pt</keyword-equiv>
-                               <keyword-equiv match="thick">2pt</keyword-equiv>
-                               <default>medium</default>
-                       </subproperty>
-                       <subproperty>
-                               <datatype>Enum</datatype>
-                               <name>conditionality</name>
-                               <enumeration>
-                                       <value const="DISCARD">discard</value>
-                                       <value const="RETAIN">retain</value>
-                               </enumeration>
-                       </subproperty>
-               </compound>
-       </property>
+  <property type="generic">
+    <name>border-cond-width-template</name>
+    <class-name>GenericCondBorderWidth</class-name>
+    <keyword-equiv match="thin">0.5pt</keyword-equiv>
+    <keyword-equiv match="medium">1pt</keyword-equiv>
+    <keyword-equiv match="thick">2pt</keyword-equiv>
+    <inherited>false</inherited>
+    <datatype>CondLength</datatype>
+    <compound>
+      <subproperty set-by-shorthand="true">
+        <name>length</name>
+        <datatype>Length</datatype>
+        <keyword-equiv match="thin">0.5pt</keyword-equiv>
+        <keyword-equiv match="medium">1pt</keyword-equiv>
+        <keyword-equiv match="thick">2pt</keyword-equiv>
+        <default>medium</default>
+      </subproperty>
+      <subproperty>
+        <datatype>Enum</datatype>
+        <name>conditionality</name>
+        <enumeration>
+          <value const="DISCARD">discard</value>
+          <value const="RETAIN">retain</value>
+        </enumeration>
+      </subproperty>
+    </compound>
+  </property>
 <!-- Left, Right, Top, Bottom borderwidth props -->
-       <property type="generic">
-               <name>border-width-template</name>
-               <class-name>GenericBorderWidth</class-name>
-               <datatype>Length</datatype>
-               <keyword-equiv match="thin">0.5pt</keyword-equiv>
-               <keyword-equiv match="medium">1pt</keyword-equiv>
-               <keyword-equiv match="thick">2pt</keyword-equiv>
-               <inherited>false</inherited>
-               <default>0pt</default>
-               <shorthand>border-width</shorthand>
-       </property>
-       <property type="generic">
-               <name>border-style-template</name>
-               <class-name>GenericBorderStyle</class-name>
-               <inherited>false</inherited>
-               <datatype>Enum</datatype>
-                       <enumeration>
-                               <value const="NONE">none</value>
-                               <value const="HIDDEN">hidden</value>
-                               <value const="DOTTED">dotted</value>
-                               <value const="DASHED">dashed</value>
-                               <value const="SOLID">solid</value>
-                               <value const="DOUBLE">double</value>
-                               <value const="GROOVE">groove</value>
-                               <value const="RIDGE">ridge</value>
-                               <value const="INSET">inset</value>
-                               <value const="OUTSET">outset</value>
-                       </enumeration>
-               <default>none</default>
-               <shorthand>border-style</shorthand>
-       </property>
-       <property type="generic">
-               <name>break-template</name>
-               <class-name>GenericBreak</class-name>
-               <inherited>false</inherited>
-               <datatype>Enum</datatype>
-                       <enumeration>
-                               <value const="AUTO">auto</value>
-                               <value const="COLUMN">column</value>
-                               <value const="PAGE">page</value>
-                               <value const="EVEN_PAGE">even-page</value>
-                               <value const="ODD_PAGE">odd-page</value>
-                       </enumeration>
-               <default>auto</default>
-       </property>
-       <property type="generic">
-               <name>generic-space</name>
-               <class-name>GenericSpace</class-name>
-               <inherited>false</inherited>
-               <datatype>Space</datatype>
-               <compound>
-                       <subproperty set-by-shorthand="true">
-                               <name>minimum</name>
-                               <datatype>Length</datatype>
-                               <default>0pt</default>
-                       </subproperty>
-                       <subproperty set-by-shorthand="true">
-                               <name>optimum</name>
-                               <datatype>Length</datatype>
-                               <default>0pt</default>
-                       </subproperty>
-                       <subproperty set-by-shorthand="true">
-                               <name>maximum</name>
-                               <datatype>Length</datatype>
-                               <default>0pt</default>
-                       </subproperty>
-                       <subproperty>
-                               <name>precedence</name>
-                               <datatype>Number</datatype>
-                               <enumeration>
-                                       <value const="FORCE">force</value>
-                               </enumeration>
-                               <default>0</default>
-                       </subproperty>
-                       <subproperty>
-                               <name>conditionality</name>
-                               <datatype>Enum</datatype>
-                               <enumeration>
-                                       <value const="DISCARD">discard</value>
-                                       <value const="RETAIN">retain</value>
-                               </enumeration>
-                               <default>discard</default>
-                       </subproperty>
-               </compound>
-       </property>
+  <property type="generic">
+    <name>border-width-template</name>
+    <class-name>GenericBorderWidth</class-name>
+    <datatype>Length</datatype>
+    <keyword-equiv match="thin">0.5pt</keyword-equiv>
+    <keyword-equiv match="medium">1pt</keyword-equiv>
+    <keyword-equiv match="thick">2pt</keyword-equiv>
+    <inherited>false</inherited>
+    <default>0pt</default>
+    <shorthand>border-width</shorthand>
+  </property>
+  <property type="generic">
+    <name>border-style-template</name>
+    <class-name>GenericBorderStyle</class-name>
+    <inherited>false</inherited>
+    <datatype>Enum</datatype>
+      <enumeration>
+        <value const="NONE">none</value>
+        <value const="HIDDEN">hidden</value>
+        <value const="DOTTED">dotted</value>
+        <value const="DASHED">dashed</value>
+        <value const="SOLID">solid</value>
+        <value const="DOUBLE">double</value>
+        <value const="GROOVE">groove</value>
+        <value const="RIDGE">ridge</value>
+        <value const="INSET">inset</value>
+        <value const="OUTSET">outset</value>
+      </enumeration>
+    <default>none</default>
+    <shorthand>border-style</shorthand>
+  </property>
+  <property type="generic">
+    <name>break-template</name>
+    <class-name>GenericBreak</class-name>
+    <inherited>false</inherited>
+    <datatype>Enum</datatype>
+      <enumeration>
+        <value const="AUTO">auto</value>
+        <value const="COLUMN">column</value>
+        <value const="PAGE">page</value>
+        <value const="EVEN_PAGE">even-page</value>
+        <value const="ODD_PAGE">odd-page</value>
+      </enumeration>
+    <default>auto</default>
+  </property>
+  <property type="generic">
+    <name>generic-space</name>
+    <class-name>GenericSpace</class-name>
+    <inherited>false</inherited>
+    <datatype>Space</datatype>
+    <compound>
+      <subproperty set-by-shorthand="true">
+        <name>minimum</name>
+        <datatype>Length</datatype>
+        <default>0pt</default>
+      </subproperty>
+      <subproperty set-by-shorthand="true">
+        <name>optimum</name>
+        <datatype>Length</datatype>
+        <default>0pt</default>
+      </subproperty>
+      <subproperty set-by-shorthand="true">
+        <name>maximum</name>
+        <datatype>Length</datatype>
+        <default>0pt</default>
+      </subproperty>
+      <subproperty>
+        <name>precedence</name>
+        <datatype>Number</datatype>
+        <enumeration>
+          <value const="FORCE">force</value>
+        </enumeration>
+        <default>0</default>
+      </subproperty>
+      <subproperty>
+        <name>conditionality</name>
+        <datatype>Enum</datatype>
+        <enumeration>
+          <value const="DISCARD">discard</value>
+          <value const="RETAIN">retain</value>
+        </enumeration>
+        <default>discard</default>
+      </subproperty>
+    </compound>
+  </property>
 
 <!-- Common Accessibility Properties -->
 
index a8a6a9d79ebc4c24cb2f8c764cd935ef63c18d93..fdb1af6a2d29dd8c87b9a58009831880fb2e693a 100644 (file)
@@ -3,15 +3,15 @@
 DTD for foproperties.xml and svgproperties.xml
 -->
 
-<!DOCTYPE property-list [   
+<!DOCTYPE property-list [
 <!ELEMENT property-list (generic-property-list?,  element-property-list*) >
-     
+
 <!-- This defines properties which are generic: meaning they are valid for
      any formatting object in the namespace associated with this properties
      file.
 -->
 <!ELEMENT generic-property-list (property+) >
-   
+
 <!-- This defines properties which are specific to a particular element.
      The elements are specified in one or more localname elements. This
      will generate code which can be used to set up element-specific
@@ -19,12 +19,12 @@ DTD for foproperties.xml and svgproperties.xml
 -->
 <!ELEMENT element-property-list (localname+, property+) >
 <!ELEMENT localname (#PCDATA) >
-     
+
 <!-- Define a single property in the current namespace -->
 <!ELEMENT property (name, (use-generic | datatype), class-name?, inherited?,
-        default?, enumeration?, datatype-conversion*, compound?,
-        keyword-equiv*, percent-ok?, auto-ok?, derive?, corresponding? ) >
-     
+   default?, enumeration?, datatype-conversion*, compound?,
+   keyword-equiv*, percent-ok?, auto-ok?, derive?, corresponding? ) >
+
 <!-- If type is set to "ref", then this is not a new property definition,
      but rather a reference to a property allready defined (should be in
      another namespace). The "family" attribute then indicates in which
@@ -43,18 +43,18 @@ DTD for foproperties.xml and svgproperties.xml
 <!-- Sub-elements of property. -->
 <!-- This gives the name of the attribute used to specify values for this
      property in input FO or SVG files. It MUST be specified.
--->     
+-->
 <!ELEMENT name (#PCDATA) >
-     
+
 <!-- This gives the class name of the Java class which will be created to
      represent values for this property. It doesn't need to be specified if
      it can be deduced from the "name". The rule is that the first letter
      of the property name and any name following a "-" are capitalized and
      the "-" characters are removed. If you want to force a name, use the
      class-name sub-element.
--->     
+-->
 <!ELEMENT class-name (#PCDATA) >
-     
+
 <!-- This indicates that this property is based on a generic property
      datatype. This may be one hand-coded, such as SVGLengthProperty, or it
      may be one which is created by a generic property definition in the
@@ -69,10 +69,10 @@ DTD for foproperties.xml and svgproperties.xml
      only used for the SVG properties, because they don't have a
      rule-based relationship between the actual Property class name
      and the name of the datatype stored by objects of that class.
--->     
+-->
 <!ELEMENT use-generic (#PCDATA) >
 <!ATTLIST use-generic
-       ispropclass (true | false ) "false"
+  ispropclass (true | false ) "false"
 >
 
 <!-- This indicates whether the property is inherited or not. Use the value
@@ -81,12 +81,12 @@ DTD for foproperties.xml and svgproperties.xml
      value of the property is inherited. An example is line-height, which
      if specified using relative units or a percent, is recalculated
      relative to the FONTSIZE of the current FO.
--->     
+-->
 <!ELEMENT inherited (#PCDATA) >
 <!ATTLIST inherited
-       type    (specified | computed) "computed"
+  type  (specified | computed) "computed"
 >
-     
+
 <!-- This gives the datatype of the stored property values. It shouldn't be
      specified if the property has a use-generic element. The value of this
      element should be the name of either a basic Java class (String,
@@ -94,7 +94,7 @@ DTD for foproperties.xml and svgproperties.xml
      NOTE: the value "Enum" is special and indicates an enumerated
      datatype, stored as a Java "int". There is an EnumProperty class, but
      no corresponding Enum class.
--->     
+-->
 <!ELEMENT datatype (#PCDATA) >
 
 <!-- This element is used to specify the allowable values for enumerated
@@ -103,13 +103,13 @@ DTD for foproperties.xml and svgproperties.xml
      each value is used to generate a public static constant value in the
      class which can be referenced in code to test the property value. It
      must be a legal Java identifier. By convention, use all caps.
--->     
+-->
 <!ELEMENT enumeration (value+) >
 <!ELEMENT value (#PCDATA) >
-<!ATTLIST value 
-       const   CDATA   #REQUIRED
+<!ATTLIST value
+  const  CDATA  #REQUIRED
 >
-          
+
 <!-- This gives the default value for a property if it is not specified on
      a given FO. (The spec calls this the "initial" value.)
 
@@ -133,13 +133,13 @@ DTD for foproperties.xml and svgproperties.xml
      for a particular component. For example, the border-end-width property
      is based on GenericCondBorderWidth and specifies a specific default
      for the "conditionality" component.
--->     
+-->
 <!ELEMENT default (#PCDATA) >
 <!ATTLIST default
-       contextdep      (true | false) "false"
-       subproperty     CDATA #IMPLIED
+  contextdep  (true | false) "false"
+  subproperty  CDATA #IMPLIED
 >
-       
+
 
 <!-- The datatype-conversion element(s) specify how to handle property
      values which can be specified in several ways. For example, the
@@ -184,7 +184,7 @@ DTD for foproperties.xml and svgproperties.xml
      An example is space-before.
 -->
 <!ELEMENT compound (subproperty+) >
-     
+
 <!-- Describe one component of a compound property. Only the name and the
      datatype should be specified. For example, in the space-before
      property, the optimum component has the name optimum and the datatype
@@ -210,8 +210,8 @@ DTD for foproperties.xml and svgproperties.xml
 -->
 <!ELEMENT keyword-equiv (#PCDATA) >
 <!ATTLIST keyword-equiv
-       match   CDATA   #REQUIRED
-       eval    (true|false) "true"
+  match  CDATA   #REQUIRED
+  eval  (true|false) "true"
 >
 
 <!-- This element if present indicates that percent specifications are
@@ -231,7 +231,7 @@ DTD for foproperties.xml and svgproperties.xml
 -->
 <!ELEMENT   percent-ok (#PCDATA) >
 <!ATTLIST   percent-ok
-        base   (FONTSIZE | INH-FONTSIZE | CONTAINING-BOX) #IMPLIED
+   base  (FONTSIZE | INH-FONTSIZE | CONTAINING-BOX) #IMPLIED
 >
 
 <!-- This element if present indicates that a value of "auto" for a Length
@@ -239,7 +239,7 @@ DTD for foproperties.xml and svgproperties.xml
      is created which holds a Length object of type "AUTO".
 -->
 <!ELEMENT   auto-ok EMPTY >
-     
+
 <!-- This element if present indicates that the value of the property may
      be computed (derived) from other properties if it isn't specified. It
      assumes that the property is an Enum datatype. (Currently only used
@@ -253,11 +253,11 @@ DTD for foproperties.xml and svgproperties.xml
 -->
 <!ELEMENT   derive (if+) >
 <!ATTLIST   derive
-       from    CDATA   #REQUIRED
+  from  CDATA  #REQUIRED
 >
 <!ELEMENT   if (#PCDATA) >
 <!ATTLIST   if
-       match   CDATA   #REQUIRED
+  match  CDATA  #REQUIRED
 >
 
 <!-- This element indicates that the value of the property is the same as
@@ -300,7 +300,7 @@ DTD for foproperties.xml and svgproperties.xml
 <!ELEMENT   propval (wmrel2abs | wmabs2rel | #PCDATA)+ >
 
 <!ELEMENT   wmrel2abs EMPTY>
-<!ATTLIST   wmrel2abs 
+<!ATTLIST   wmrel2abs
   dir (BEFORE | AFTER | START | END | BLOCKPROGDIM | INLINEPROGDIM)
   #REQUIRED
 >
index fb7e65be098649974027c5f710b4e06872595e59..35a5d7b66c14264e1a6c9486e0116bfb3fa3ad17 100644 (file)
     public PercentBase getPercentBase(final FObj fo, final PropertyList propertyList) {
      <xsl:choose>
        <xsl:when test="@base">
-       return new LengthBase(fo, propertyList, LengthBase.<xsl:value-of select="@base"/>);
+  return new LengthBase(fo, propertyList, LengthBase.<xsl:value-of select="@base"/>);
        </xsl:when>
        <xsl:otherwise>
-       return (new LengthBase(fo, propertyList, LengthBase.CUSTOM_BASE ) {
-         public int getBaseLength() {
-           return (<xsl:value-of select="."/>);
+  return (new LengthBase(fo, propertyList, LengthBase.CUSTOM_BASE ) {
+     public int getBaseLength() {
+      return (<xsl:value-of select="."/>);
           }
-       });
+  });
       </xsl:otherwise>
     </xsl:choose>
     }
@@ -48,7 +48,7 @@
           <xsl:with-param name="specvals" select="concat(.,' ')"/>
       </xsl:call-template>
     </xsl:for-each>
-       return super.checkEnumValues(value);
+  return super.checkEnumValues(value);
     }
 </xsl:template>
 
     // Initialize hashtable of keywords
     static HashMap s_htKeywords;
     static {
-       s_htKeywords = new HashMap(<xsl:value-of select="count(../keyword-equiv)"/>);
+  s_htKeywords = new HashMap(<xsl:value-of select="count(../keyword-equiv)"/>);
   <xsl:for-each select="../keyword-equiv">
-       s_htKeywords.put("<xsl:value-of select="@match"/>", "<xsl:value-of select="."/>");
+        s_htKeywords.put("<xsl:value-of select="@match"/>", "<xsl:value-of select="."/>");
   </xsl:for-each>
     }
     protected String checkValueKeywords(String keyword) {
       String value = (String)s_htKeywords.get(keyword);
       if (value == null) {
-       return super.checkValueKeywords(keyword);
+  return super.checkValueKeywords(keyword);
       }
       else return value;
     }
@@ -81,7 +81,7 @@
       <xsl:when test="../compound">
         <xsl:call-template name="propclass">
           <xsl:with-param name="prop"
-               select="../compound/subproperty[@set-by-shorthand]"/>
+    select="../compound/subproperty[@set-by-shorthand]"/>
         </xsl:call-template>
       </xsl:when><xsl:otherwise>
         <xsl:call-template name="propclass">
   </xsl:variable>
     // See if other value types are acceptable
     protected Property convertPropertyDatatype(Property p,
-       PropertyList propertyList, FObj fo) {
+  PropertyList propertyList, FObj fo) {
       <xsl:for-each select="../datatype-conversion">
       {
         <xsl:variable name="dtc">
           <xsl:choose>
-           <xsl:when test="@vartype">
-              <xsl:value-of select="@vartype"/>
-           </xsl:when><xsl:otherwise>
-             <xsl:value-of select="@from-type"/>
-           </xsl:otherwise>
-         </xsl:choose>
-       </xsl:variable>
-       <xsl:value-of select="$dtc"/><xsl:text> </xsl:text> <xsl:value-of select="@varname"/> =
-               p.get<xsl:value-of select="@from-type"/>();
-       if (<xsl:value-of select="@varname"/> != null) {
-           return new <xsl:value-of select="$propclass"/>(
-                   <xsl:value-of select='.'/>);
+      <xsl:when test="@vartype">
+         <xsl:value-of select="@vartype"/>
+      </xsl:when><xsl:otherwise>
+        <xsl:value-of select="@from-type"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:value-of select="$dtc"/><xsl:text> </xsl:text> <xsl:value-of select="@varname"/> =
+    p.get<xsl:value-of select="@from-type"/>();
+  if (<xsl:value-of select="@varname"/> != null) {
+      return new <xsl:value-of select="$propclass"/>(
+        <xsl:value-of select='.'/>);
         }
       }
       </xsl:for-each>
 <!-- generate getDefaultForXXX for property components -->
 <xsl:template match="default[@subproperty]" priority="2">
       <xsl:variable name="spname">
-       <xsl:call-template name="makeClassName">
-         <xsl:with-param name="propstr" select="@subproperty"/>
-       </xsl:call-template>
+  <xsl:call-template name="makeClassName">
+    <xsl:with-param name="propstr" select="@subproperty"/>
+  </xsl:call-template>
       </xsl:variable>
     protected String getDefaultFor<xsl:value-of  select='$spname'/>() {
-       return "<xsl:value-of  select='.'/>";
+  return "<xsl:value-of  select='.'/>";
     }
 </xsl:template>
 
     public Property make(PropertyList propertyList) throws FOPException {
       <xsl:choose><xsl:when test='@contextdep="true"'>
         return make(propertyList, "<xsl:value-of select='.'/>", propertyList.getParentFObj());
-       </xsl:when><xsl:otherwise>
+  </xsl:when><xsl:otherwise>
         if (m_defaultProp == null) {
             m_defaultProp=make(propertyList, "<xsl:value-of select='.'/>", propertyList.getParentFObj());
-       }
+  }
         return m_defaultProp;
-       </xsl:otherwise></xsl:choose>
+  </xsl:otherwise></xsl:choose>
     }
 </xsl:template>
 
@@ -223,7 +223,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
 </xsl:for-each>
 <xsl:for-each select="compound/subproperty[enumeration]">
        <xsl:variable name="spname">
-       <xsl:call-template name="makeClassName">
+  <xsl:call-template name="makeClassName">
           <xsl:with-param name="propstr" select="name"/>
         </xsl:call-template>
       </xsl:variable>
@@ -253,7 +253,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
       </xsl:variable>
     <xsl:for-each select="compound/subproperty">
       <xsl:variable name="spname">
-       <xsl:call-template name="makeClassName">
+  <xsl:call-template name="makeClassName">
           <xsl:with-param name="propstr" select="name"/>
         </xsl:call-template>
       </xsl:variable>
@@ -271,36 +271,36 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
       <xsl:choose>
         <xsl:when test='*[local-name(.)!="name" and local-name(.)!="datatype" and local-name(.)!="use-generic" and local-name(.)!="default"]'>
     static private class SP_<xsl:value-of select="$spname"/>Maker
-       extends <xsl:value-of select="$sp_superclass"/>
+  extends <xsl:value-of select="$sp_superclass"/>
 <xsl:if test="enumeration"> implements <xsl:value-of select="$enumclass"/>.<xsl:value-of select="$spname"/></xsl:if> {
-       SP_<xsl:value-of select="$spname"/>Maker(String sPropName) {
-            super(sPropName);
+  SP_<xsl:value-of select="$spname"/>Maker(String sPropName) {
+       super(sPropName);
         }
 <xsl:for-each select="enumeration/value">
        protected final static EnumProperty s_prop<xsl:value-of select="@const"/> = new EnumProperty(<xsl:value-of select="@const"/>);
 </xsl:for-each>
 
-       <xsl:apply-templates select="percent-ok|auto-ok|keyword-equiv|datatype-conversion|enumeration"/>
+  <xsl:apply-templates select="percent-ok|auto-ok|keyword-equiv|datatype-conversion|enumeration"/>
     }
     final private static Property.Maker s_<xsl:value-of select="$spname"/>Maker =
-       new SP_<xsl:value-of select="$spname"/>Maker(
-            "<xsl:value-of select='../../name'/>.<xsl:value-of select='name'/>");
+  new SP_<xsl:value-of select="$spname"/>Maker(
+       "<xsl:value-of select='../../name'/>.<xsl:value-of select='name'/>");
         </xsl:when>
         <xsl:otherwise>
     final private static Property.Maker s_<xsl:value-of select="$spname"/>Maker =
-       new <xsl:value-of select="$sp_superclass"/>(
-            "<xsl:value-of select='../../name'/>.<xsl:value-of select='name'/>");
-       </xsl:otherwise>
+  new <xsl:value-of select="$sp_superclass"/>(
+       "<xsl:value-of select='../../name'/>.<xsl:value-of select='name'/>");
+  </xsl:otherwise>
       </xsl:choose>
     </xsl:for-each>
 </xsl:if>
 
     static public Property.Maker maker(String propName) {
-       return new <xsl:value-of select="$classname"/>(propName);
+  return new <xsl:value-of select="$classname"/>(propName);
     }
 
     protected <xsl:value-of select="$classname"/>(String name) {
-       super(name);
+  super(name);
 <xsl:if test="compound">
         m_shorthandMaker= getSubpropMaker("<xsl:value-of select='compound/subproperty[@set-by-shorthand="true"]/name'/>");
 </xsl:if>
@@ -310,7 +310,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
     Property.Maker m_shorthandMaker;
 
     public Property checkEnumValues(String value) {
-       return m_shorthandMaker.checkEnumValues(value);
+  return m_shorthandMaker.checkEnumValues(value);
     }
 
     protected boolean isCompoundMaker() {
@@ -320,23 +320,23 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
     protected Property.Maker getSubpropMaker(String subprop) {
     <xsl:for-each select="compound/subproperty">
       <xsl:variable name="spname">
-       <xsl:call-template name="makeClassName">
+  <xsl:call-template name="makeClassName">
           <xsl:with-param name="propstr" select="name"/>
         </xsl:call-template>
       </xsl:variable>
-       if (subprop.equals("<xsl:value-of select='name'/>"))
-         return s_<xsl:value-of select="$spname"/>Maker;
+  if (subprop.equals("<xsl:value-of select='name'/>"))
+    return s_<xsl:value-of select="$spname"/>Maker;
     </xsl:for-each>
-       return super.getSubpropMaker(subprop);
+  return super.getSubpropMaker(subprop);
     }
 
     protected Property setSubprop(Property baseProp, String subpropName,
-       Property subProp) {
+  Property subProp) {
         <xsl:value-of select="datatype"/> val = baseProp.get<xsl:value-of select="datatype"/>();
-       // Do some type checking???
-       // Check if one of our subproperties???
-       val.setComponent(subpropName, subProp, false);
-       return baseProp;
+  // Do some type checking???
+  // Check if one of our subproperties???
+  val.setComponent(subpropName, subProp, false);
+  return baseProp;
     }
 
     public Property getSubpropValue(Property baseProp, String subpropName) {
@@ -355,71 +355,71 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
     public Property make(PropertyList propertyList) throws FOPException {
         if (m_defaultProp == null) {
             m_defaultProp=makeCompound(propertyList, propertyList.getParentFObj());
-       }
+  }
         return m_defaultProp;
     }
 </xsl:otherwise>
 </xsl:choose>
 
     protected Property makeCompound(PropertyList pList, FObj fo) throws FOPException {
-       <xsl:value-of select="datatype"/> p = new <xsl:value-of select="datatype"/>();
-       Property subProp;
+  <xsl:value-of select="datatype"/> p = new <xsl:value-of select="datatype"/>();
+  Property subProp;
     <xsl:for-each select="compound/subproperty/name">
       <xsl:variable name="spname">
-       <xsl:call-template name="makeClassName">
-         <xsl:with-param name="propstr" select="."/>
-       </xsl:call-template>
+  <xsl:call-template name="makeClassName">
+    <xsl:with-param name="propstr" select="."/>
+  </xsl:call-template>
       </xsl:variable>
-        // set default for subprop <xsl:value-of select="."/>
-        subProp = getSubpropMaker("<xsl:value-of select='.'/>").make(pList,
-         getDefaultFor<xsl:value-of select='$spname'/>(), fo);
-         p.setComponent("<xsl:value-of select='.'/>", subProp, true);
+   // set default for subprop <xsl:value-of select="."/>
+   subProp = getSubpropMaker("<xsl:value-of select='.'/>").make(pList,
+    getDefaultFor<xsl:value-of select='$spname'/>(), fo);
+    p.setComponent("<xsl:value-of select='.'/>", subProp, true);
     </xsl:for-each>
-       return new <xsl:value-of select="$propclass"/>(p);
+  return new <xsl:value-of select="$propclass"/>(p);
     }
 
     <!-- generate a "getDefaultForXXX" for each subproperty XXX -->
     <xsl:for-each select="compound/subproperty">
       <xsl:variable name="spname">
-       <xsl:call-template name="makeClassName">
-         <xsl:with-param name="propstr" select="name"/>
-       </xsl:call-template>
+  <xsl:call-template name="makeClassName">
+    <xsl:with-param name="propstr" select="name"/>
+  </xsl:call-template>
       </xsl:variable>
     protected String getDefaultFor<xsl:value-of  select='$spname'/>() {
       <xsl:choose><xsl:when test="default">
-       return "<xsl:value-of  select='default'/>";
+  return "<xsl:value-of  select='default'/>";
         </xsl:when><xsl:when test="use-generic and key('genericref', use-generic)/default">
-       return "<xsl:value-of select='key(&apos;genericref&apos;, use-generic)/default'/>";
+  return "<xsl:value-of select='key(&apos;genericref&apos;, use-generic)/default'/>";
         </xsl:when><xsl:otherwise>
-       return "";
-       </xsl:otherwise>
+  return "";
+  </xsl:otherwise>
       </xsl:choose>
     }
     </xsl:for-each>
 
     /** Set the appropriate components when the "base" property is set. */
     public Property convertProperty(Property p, PropertyList pList,FObj fo)
-       throws FOPException
+  throws FOPException
     {
         if (p instanceof <xsl:value-of select="$propclass"/>) return p;
-       if (! (p instanceof EnumProperty)) {
-         // delegate to the subprop maker to do conversions
-         p = m_shorthandMaker.convertProperty(p,pList,fo);
+  if (! (p instanceof EnumProperty)) {
+    // delegate to the subprop maker to do conversions
+    p = m_shorthandMaker.convertProperty(p,pList,fo);
         }
-       if (p != null) {
-         Property prop = makeCompound(pList, fo);
+  if (p != null) {
+    Property prop = makeCompound(pList, fo);
 
-         <xsl:value-of select="datatype"/> pval = prop.get<xsl:value-of select="datatype"/>();
+    <xsl:value-of select="datatype"/> pval = prop.get<xsl:value-of select="datatype"/>();
 <xsl:for-each select="compound/subproperty[@set-by-shorthand='true']">
-         pval.setComponent("<xsl:value-of select='name'/>", p, false);
+    pval.setComponent("<xsl:value-of select='name'/>", p, false);
 </xsl:for-each>
           return prop;
         }
-       else return null;
+  else return null;
 <!--
         else {
-         // throw some kind of exception!
-         throw new FOPException("Can't convert value to <xsl:value-of select='$spdt'/> type");
+    // throw some kind of exception!
+    throw new FOPException("Can't convert value to <xsl:value-of select='$spdt'/> type");
         }
 -->
     }
@@ -433,7 +433,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
 <!-- the default implementation returns false -->
 <xsl:if test='inherited/@type="specified"'>
    public boolean inheritsSpecified() {
-        return true;
+   return true;
    }
 </xsl:if>
 
@@ -476,7 +476,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
       Property p=null;
       <xsl:choose><xsl:when test="corresponding/propexpr">
       <xsl:apply-templates select="corresponding/propval"/>
-       // Make sure the property is set before calculating it!
+  // Make sure the property is set before calculating it!
       if (propertyList.getExplicitOrShorthand(sbExpr.toString()) == null) return p;
       sbExpr.setLength(0);
       <xsl:apply-templates select="corresponding/propexpr"/>
@@ -497,7 +497,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
       <xsl:choose><xsl:when test="propexpr">
       <xsl:apply-templates select="propexpr"/>
       subprop= getSubpropMaker("<xsl:value-of select='../name'/>").
-               make(propertyList, sbExpr.toString(), parentFO);
+          make(propertyList, sbExpr.toString(), parentFO);
       </xsl:when><xsl:otherwise>
       <xsl:apply-templates select="propval"/>
       subprop= propertyList.getExplicitOrShorthand(sbExpr.toString());
@@ -517,7 +517,7 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
       Property p = null;
       ListProperty listprop;
       <xsl:for-each select="shorthand">
-       <xsl:variable name="shprop" select="."/>
+  <xsl:variable name="shprop" select="."/>
       if (p == null) {
          listprop = (ListProperty)propertyList.getExplicit("<xsl:value-of select='$shprop'/>");
          if (listprop != null) {
@@ -572,12 +572,12 @@ public class <xsl:value-of select="$classname"/> extends  <xsl:value-of select="
     <xsl:param name="dtlist"/>
     <xsl:variable name="dt"><xsl:value-of select='$dtlist[1]'/></xsl:variable>
     <xsl:for-each select="$dtlist">
-       <xsl:if test=". != $dt">
-           <xsl:message>
-               <xsl:text>Conflict between subproperty datatypes: </xsl:text>
-               <xsl:value-of select='.'/> != <xsl:value-of select='$dt'/>
-           </xsl:message>
-       </xsl:if>
+  <xsl:if test=". != $dt">
+      <xsl:message>
+          <xsl:text>Conflict between subproperty datatypes: </xsl:text>
+    <xsl:value-of select='.'/> != <xsl:value-of select='$dt'/>
+      </xsl:message>
+  </xsl:if>
     </xsl:for-each>
     <xsl:value-of select='$dt'/>
 </xsl:template>
index f83945b3d4d54737c41d345e2bf053870df7a810..e97d21cbac40bb4cb77fb005a073ac1283b42f6a 100644 (file)
@@ -9,7 +9,7 @@
   <xsl:variable name="lcletters" select="'abcdefghijklmnopqrstuvwxyz'" />
   <xsl:variable name="ucletters" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
      <xsl:value-of select="concat(translate(substring($str, 1, 1),
-                   $lcletters, $ucletters), substring($str, 2))"/>
+              $lcletters, $ucletters), substring($str, 2))"/>
 </xsl:template>
 
 <xsl:template name="makeClassName">
     <xsl:when test="$prop/use-generic">
       <!-- If no datatype child, then the prop must use the same datatype as
            its template. -->
-       <xsl:call-template name="propclass">
-         <xsl:with-param name="prop"
-          select="key('genericref', $prop/use-generic)"/>
+  <xsl:call-template name="propclass">
+    <xsl:with-param name="prop"
+     select="key('genericref', $prop/use-generic)"/>
         </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
       <!-- ERROR -->
       <xsl:message terminate="yes">
-       No datatype found for property: <xsl:value-of select="$prop/name"/>
+  No datatype found for property: <xsl:value-of select="$prop/name"/>
       </xsl:message>
     </xsl:otherwise>
   </xsl:choose>
@@ -66,9 +66,9 @@
     <xsl:when test="$prop/use-generic">
       <!-- If no datatype child, then the prop must use the same datatype as
            its template. -->
-       <xsl:call-template name="hasEnum">
-         <xsl:with-param name="prop"
-          select="key('genericref', $prop/use-generic)"/>
+  <xsl:call-template name="hasEnum">
+    <xsl:with-param name="prop"
+     select="key('genericref', $prop/use-generic)"/>
         </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>false</xsl:otherwise>
     <xsl:when test="$prop/use-generic">
       <!-- If no datatype child, then the prop must use the same datatype as
            its template. -->
-       <xsl:call-template name="hasSubpropEnum">
-         <xsl:with-param name="prop"
-          select="key('genericref', $prop/use-generic)"/>
+  <xsl:call-template name="hasSubpropEnum">
+    <xsl:with-param name="prop"
+     select="key('genericref', $prop/use-generic)"/>
         </xsl:call-template>
     </xsl:when>
     <xsl:when test="$prop/compound/subproperty/use-generic">
-       <xsl:for-each select="$prop/compound/subproperty[use-generic]">
-         <xsl:call-template name="hasEnum">
-           <xsl:with-param name="prop"
-               select="key('genericref', use-generic)"/>
+  <xsl:for-each select="$prop/compound/subproperty[use-generic]">
+    <xsl:call-template name="hasEnum">
+      <xsl:with-param name="prop"
+       select="key('genericref', use-generic)"/>
           </xsl:call-template>
-       </xsl:for-each>
+  </xsl:for-each>
     </xsl:when>
     <xsl:otherwise>false</xsl:otherwise>
   </xsl:choose>
index 549693b14ad3aeaa9efc16405ceb5d2b82d398f7..88eb04d0447e7f3d07f40a504868e1b402678733 100644 (file)
@@ -21,7 +21,7 @@
 
 <xsl:template match="*//attribute">
   <property>
-       <name><xsl:apply-templates/></name>
+  <name><xsl:apply-templates/></name>
     <use-generic ispropclass="true">SVGStringProperty</use-generic>
   </property>
 </xsl:template>
index 28074223e03086d25727fdd452c2b49a25586b96..ab8b1a7d447cd9eb4dee60b0c4911ae0c9735264 100644 (file)
@@ -98,7 +98,7 @@ public class <xsl:value-of select="@family"/>PropertyMapping {
     </xsl:when>
     <xsl:when test="not(@type)">
       <xsl:call-template name="genmaker">
-         <xsl:with-param name="htname" select="$htname"/>
+    <xsl:with-param name="htname" select="$htname"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise/>
index 7f306fb07012d59ade9765cdf35cad2778ba97d2..af385d17d6e9e063f449e152a805392ca1f3987d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- 
+<!--
 This files writes the class files for the Adobe Type 1 fonts.
 It uses the information in the font description files (Courier.xml, Helvetica.xml) to this
 In these font description files each character is referenced by its adobe name:
@@ -44,7 +44,7 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
     };
     private final static String embedFileName = <xsl:value-of select="embedFile"/>;
     private final static String embedResourceName = <xsl:value-of select="embedResource"/>;
-    private static PDFT1Stream embeddedFont=null; 
+    private static PDFT1Stream embeddedFont=null;
     private final static int flags = <xsl:value-of select="flags"/>;
     private final static int stemV = <xsl:value-of select="stemv"/>;
     private final static int italicAngle = <xsl:value-of select="italicangle"/>;
@@ -77,7 +77,7 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
 
     public PDFStream getFontFile(int i) {
         InputStream instream=null;
-        
+
         // Get file first
         if (embedFileName!=null)
         try {
@@ -85,7 +85,7 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
         } catch (Exception e) {
            System.out.println("Failed to embed fontfile: "+embedFileName);
         }
-   
+
         // Get resource
         if (instream==null &amp;&amp; embedResourceName!=null)
         try {
@@ -93,10 +93,10 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
         } catch (Exception e) {
            System.out.println("Failed to embed fontresource: "+embedResourceName);
         }
-        
+
         if (instream==null)
             return (PDFStream)null;
-        
+
         // Read fontdata
         byte[] file = new byte[128000];
         int fsize = 0;
@@ -104,29 +104,29 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
         try {
           int l = instream.read(file, 0, 128000);
           fsize += l;
-      
+
           if (l==128000) {
                  // More to read - needs to extend
              byte[] tmpbuf;
-         
+
              while (l &gt; 0) {
                  tmpbuf = new byte[file.length + 64000];
                  System.arraycopy(file, 0, tmpbuf, 0, file.length);
                  l=instream.read(tmpbuf, file.length, 64000);
                  fsize += l;
                  file = tmpbuf;
-            
+
                  if (l &lt; 64000) // whole file read. No need to loop again
                     l=0;
              }
           }
-         
+
           embeddedFont=new PDFT1Stream(i, fsize);
           embeddedFont.addFilter("flate");
           embeddedFont.addFilter("ascii-85");
           embeddedFont.setData(file, fsize);
           instream.close();
-        } catch (Exception e) {}  
+        } catch (Exception e) {}
 
         return (PDFStream) embeddedFont;
     }
@@ -134,7 +134,7 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
     public String encoding() {
         return encoding;
     }
-    
+
     public String fontName() {
         return fontName;
     }
index 5842d43dcd30d2d8e46783b55297abe9523e5f15..1dd1b801795535ae3e19c600337b5513a2583c9f 100644 (file)
@@ -1,4 +1,4 @@
-<!-- 
+<!--
 This files writes the class files for the Adobe Type 1 fonts.
 It uses the information in the font description files (Courier.xml, Helvetica.xml) to this
 In these font description files each character is referenced by its adobe name:
@@ -45,7 +45,7 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
 
     private final static String embedFileName = <xsl:value-of select="embedFile"/>;
     private final static String embedResourceName = <xsl:value-of select="embedResource"/>;
-    private static PDFTTFStream embeddedFont=null; 
+    private static PDFTTFStream embeddedFont=null;
     private final static int flags = <xsl:value-of select="flags"/>;
     private final static int stemV = <xsl:value-of select="stemv"/>;
     private final static int italicAngle = <xsl:value-of select="italicangle"/>;
@@ -77,7 +77,7 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
     }
     public PDFStream getFontFile(int i) {
         InputStream instream=null;
-        
+
         // Get file first
         if (embedFileName!=null)
         try {
@@ -85,7 +85,7 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
         } catch (Exception e) {
            System.out.println("Failed to embed fontfile: "+embedFileName);
         }
-   
+
         // Get resource
         if (instream==null &amp;&amp; embedResourceName!=null)
         try {
@@ -93,10 +93,10 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
         } catch (Exception e) {
            System.out.println("Failed to embed fontresource: "+embedResourceName);
         }
-        
+
         if (instream==null)
             return (PDFStream)null;
-        
+
         // Read fontdata
         byte[] file = new byte[128000];
         int fsize = 0;
@@ -104,36 +104,36 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes
         try {
           int l = instream.read(file, 0, 128000);
           fsize += l;
-      
+
           if (l==128000) {
                  // More to read - needs to extend
              byte[] tmpbuf;
-         
+
              while (l &gt; 0) {
                  tmpbuf = new byte[file.length + 64000];
                  System.arraycopy(file, 0, tmpbuf, 0, file.length);
                  l=instream.read(tmpbuf, file.length, 64000);
                  fsize += l;
                  file = tmpbuf;
-            
+
                  if (l &lt; 64000) // whole file read. No need to loop again
                     l=0;
              }
           }
-         
+
           embeddedFont=new PDFTTFStream(i, fsize);
           embeddedFont.addFilter("flate");
           embeddedFont.addFilter("ascii-85");
           embeddedFont.setData(file, fsize);
           instream.close();
-        } catch (Exception e) {}  
+        } catch (Exception e) {}
 
         return (PDFStream) embeddedFont;
     }
     public String encoding() {
         return encoding;
     }
-    
+
     public String fontName() {
         return fontName;
     }
index 010f63a7f9cb3988434d534d14a7ef8f3dd8a4e4..ad50a33d497347de49e488fdddd707ff4bddc159 100644 (file)
@@ -467,10 +467,10 @@ public class Driver implements LogEnabled {
         } else if(_rendererType == RENDER_RTF) {
             structHandler = new org.apache.fop.rtf.renderer.RTFHandler(_stream);
         } else {
-            if (_renderer == null) throw new Error("_renderer not set when using standard structHandler");  
+            if (_renderer == null) throw new Error("_renderer not set when using standard structHandler");
             structHandler = new LayoutHandler(_stream, _renderer, true);
         }
-        
+
         structHandler.enableLogging(getLogger());
 
         _treeBuilder.setUserAgent(getUserAgent());
index a9be6d8531061919416b2245fb4a2d38e446f5b1..7af1541272ac5c43606ff0862f5e0400804c1e70 100644 (file)
@@ -11,9 +11,9 @@ package org.apache.fop.apps;
  * originally contributed by
  * Stanislav Gorkhover: stanislav.gorkhover@jcatalog.com
  * jCatalog Software AG
- * 
+ *
  * Updated by Mark Lillywhite, mark-fop@inomial.com. Modified to
- * handle the print job better, added -Ddialog option, removed 
+ * handle the print job better, added -Ddialog option, removed
  * (apparently) redundant copies code, generally cleaned up, and
  * added interfaces to the new Render API.
  */
index 06b907e7d0a18133a32b7ef6f3b8c91afbf86618..00daf045f5522ba4bf8b1d35a8ce064fa70ef171 100644 (file)
@@ -55,19 +55,19 @@ public class Area implements Serializable {
      * Rotated 90 degrees clockwise
      */
     public static final int ORIENT_90 = 1;
-    
+
     /**
      * Rotate 180 degrees
      */
     public static final int ORIENT_180 = 2;
-    
+
     /**
      * Rotated 270 degrees clockwise
      */
     public static final int ORIENT_270 = 3;
 
     // area class values
-    
+
     /**
      * Normal class
      */
index 58c2a8b332f81426dc7f1dc87173b7ddad2577b6..afb5c72e15514675fae67ec18ce7853d8d33d281 100644 (file)
@@ -488,7 +488,7 @@ public class AreaTree {
                     endDocExt.add(ext);
                 break;
             }
-        }        
+        }
 
         private void renderExtensions(List list) {
             for (int count = 0; count < list.size(); count++) {
index c5afd0f033daa873e434e5a77a230b202afece5f..f18c66967493831499e66deb1b30e50df87073e4 100644 (file)
@@ -101,7 +101,7 @@ public class CachedRenderPagesModel extends AreaTree.RenderPagesModel {
             String fname = "page" + page.toString() + ".ser";
             tempstream = new ObjectOutputStream(new BufferedOutputStream(
                                                 new FileOutputStream(fname)));
-            page.savePage(tempstream); 
+            page.savePage(tempstream);
             tempstream.close();
             pageMap.put(page, fname);
         } catch (Exception e) {
index 0ce0239b9b143d44fddb1b28fa8fd85055d8c54b..74c330824604012e8fb9de740d60a8a736a26483 100644 (file)
@@ -13,7 +13,7 @@ import java.io.ObjectInputStream;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.HashMap; 
+import java.util.HashMap;
 import java.util.Iterator;
 
 /**
index f94d12495aa230a62d67c5a8470580cd6a508fdd..bebd5d30cd6511646a8fd1adcec91760e3707793 100644 (file)
@@ -25,17 +25,17 @@ public class RegionReference extends Area implements Cloneable {
      * The start region.
      */
     public static final int START = 1;
-    
+
     /**
      * The body region.
      */
     public static final int BODY = 2;
-    
+
     /**
      * The end region.
      */
     public static final int END = 3;
-    
+
     /**
      * The after region.
      */
index 62b771a2b379c2638ea65c02af18ed8712e7f7f8..7a688aeba787ff40e545bf149824b4a5699c035e 100644 (file)
@@ -266,7 +266,7 @@ public class Trait implements Serializable {
     /**
      * Make a trait value.
      *
-     * @param oCode 
+     * @param oCode
      */
     public static Object makeTraitValue(Object oCode, String sTraitValue) {
         // Get the code from the name
index 69d342dfd8386b1767eccb6bb6321b1a817e7dc7..d3b1936339857ef10f3c6522b198efaa8416e05d 100644 (file)
@@ -10,7 +10,7 @@ package org.apache.fop.fo;
 // FOP
 import org.apache.fop.apps.FOPException;
 import java.util.NoSuchElementException;
-    
+
 public abstract class AbstractCharIterator implements CharIterator, Cloneable {
 
     public abstract boolean hasNext();
index aea844eaa565441217a7948fbefad79860d3bdae..0f31d3f9f1cf79940f5c306becd1bb40ae41f185 100644 (file)
@@ -10,7 +10,7 @@ package org.apache.fop.fo;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-    
+
 public class OneCharIterator extends AbstractCharIterator {
 
     private boolean bFirst=true;
index 2e6d2f90fc1552dad7e788913465814f8aa420eb..fda2fec032f1c79b06a06ec6508b4fec0196865f 100644 (file)
@@ -40,23 +40,23 @@ public class Inline extends FObjMixed {
 
         // Common Accessibility Properties
         AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
-                    
-        // Common Aural Properties   
+
+        // Common Aural Properties
         AuralProps mAurProps = propMgr.getAuralProps();
 
         // Common Border, Padding, and Background Properties
         BorderAndPadding bap = propMgr.getBorderAndPadding();
         BackgroundProps bProps = propMgr.getBackgroundProps();
-     
+
         // Common Font Properties
         //this.fontState = propMgr.getFontState(area.getFontInfo());
 
         // Common Margin Properties-Inline
         MarginInlineProps mProps = propMgr.getMarginInlineProps();
-            
+
         // Common Relative Position Properties
         RelativePositionProps mRelProps = propMgr.getRelativePositionProps();
-            
+
         // this.properties.get("alignment-adjust");
         // this.properties.get("alignment-baseline");
         // this.properties.get("baseline-shift");
index 638fdcc4ea453a9029ceb5f557fb492d0d0df66f..df2cdf865d45c1d2b2f66df90d2c8ab440b48bfc 100644 (file)
@@ -41,13 +41,13 @@ public class ListBlock extends FObj {
     public void addLayoutManager(List list) {
         ListBlockLayoutManager blm = new ListBlockLayoutManager(this);
         list.add(blm);
-    }       
+    }
 
     public void setup() throws FOPException {
 
             // Common Accessibility Properties
             AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
-        
+
             // Common Aural Properties
             AuralProps mAurProps = propMgr.getAuralProps();
 
index af5db5880848fbe12192597b532cc53d34850ec0..78c4b40a6a59f15904b9760703cdd1d63301e012 100644 (file)
@@ -95,7 +95,7 @@ public class ListItem extends FObj {
         } else {
             // error
         }
-    } 
+    }
 
     public boolean generatesInlineAreas() {
         return false;
index 02a444ad2f00e584ede795753ec0bbc1497b781b..8fbef7eba3acfa19811ee02322b7a48a851074fe 100644 (file)
@@ -75,7 +75,7 @@ public class TableCell extends FObj {
 
     // boolean setup = false;
     boolean bSepBorders = true;
-    
+
     /**
      * Set to true if all content completely laid out.
      */
@@ -295,7 +295,7 @@ public class TableCell extends FObj {
             this.borderHeight = (borderBefore + borderAfter) / 2;
         }
     }
-    
+
     protected boolean containsMarkers() {
         return true;
     }
index 8ee0df005383c3637301753bef8f3a9d938061a6..430416f7372c49dc5d98e1e21bffc879ed5fdba7 100644 (file)
@@ -53,7 +53,7 @@ public class TableRow extends FObj {
 
         // Common Accessibility Properties
         AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
-            
+
         // this.properties.get("block-progression-dimension");
 
         // Common Aural Properties
@@ -67,7 +67,7 @@ public class TableRow extends FObj {
 
         // Common Relative Position Properties
         RelativePositionProps mRelProps = propMgr.getRelativePositionProps();
-                    
+
         // this.properties.get("break-before");
         // this.properties.get("break-after");
         setupID();
index c415b1e4e7b68a0f857131b907e4ce75d3830987..8a072ea6579b32f2e826064bcd1fc58120e819b4 100644 (file)
@@ -92,7 +92,7 @@ public class LayoutMasterSet extends FObj {
 
     /**
      * Get a page sequence master by name.
-     * This is used by the page sequence to get a page master for 
+     * This is used by the page sequence to get a page master for
      * creating pages.
      */
     public PageSequenceMaster getPageSequenceMaster(String masterName) {
index 0790c83b34bf757558fc6add2c28f9664152f0f4..ff205a79ceffff4f17093e384e1dc043e854817a 100644 (file)
@@ -24,7 +24,7 @@ public class FontFileReader {
 
     /**
      * Initializes class and reads stream. Init does not close stream.
-     * 
+     *
      * @param in InputStream to read from new array with size + inc
      * @throws IOException In case of an I/O problem
      */
@@ -52,7 +52,7 @@ public class FontFileReader {
 
     /**
      * Constructor
-     * 
+     *
      * @param fileName filename to read
      * @throws IOException In case of an I/O problem
      */
@@ -69,7 +69,7 @@ public class FontFileReader {
 
     /**
      * Constructor
-     * 
+     *
      * @param in InputStream to read from
      * @throws IOException In case of an I/O problem
      */
@@ -80,7 +80,7 @@ public class FontFileReader {
 
     /**
      * Set current file position to offset
-     * 
+     *
      * @param offset The new offset to set
      * @throws IOException In case of an I/O problem
      */
@@ -94,7 +94,7 @@ public class FontFileReader {
 
     /**
      * Set current file position to offset
-     * 
+     *
      * @param add The number of bytes to advance
      * @throws IOException In case of an I/O problem
      */
@@ -104,7 +104,7 @@ public class FontFileReader {
 
     /**
      * Skip a given number of bytes.
-     * 
+     *
      * @param add The number of bytes to advance
      * @throws IOException In case of an I/O problem
      */
@@ -114,7 +114,7 @@ public class FontFileReader {
 
     /**
      * Returns current file position.
-     * 
+     *
      * @return int The current position.
      */
     public int getCurrentPos() {
@@ -123,7 +123,7 @@ public class FontFileReader {
 
     /**
      * Returns the size of the file.
-     * 
+     *
      * @return int The filesize
      */
     public int getFileSize() {
@@ -132,7 +132,7 @@ public class FontFileReader {
 
     /**
      * Read 1 byte.
-     * 
+     *
      * @return One byte
      * @throws IOException If EOF is reached
      */
@@ -147,7 +147,7 @@ public class FontFileReader {
 
     /**
      * Read 1 signed byte.
-     * 
+     *
      * @return One byte
      * @throws IOException If EOF is reached
      */
@@ -157,7 +157,7 @@ public class FontFileReader {
 
     /**
      * Read 1 unsigned byte.
-     * 
+     *
      * @return One unsigned byte
      * @throws IOException If EOF is reached
      */
@@ -173,7 +173,7 @@ public class FontFileReader {
 
     /**
      * Read 2 bytes signed.
-     * 
+     *
      * @return One signed short
      * @throws IOException If EOF is reached
      */
@@ -185,7 +185,7 @@ public class FontFileReader {
 
     /**
      * Read 2 bytes unsigned.
-     * 
+     *
      * @return One unsigned short
      * @throws IOException If EOF is reached
      */
@@ -196,7 +196,7 @@ public class FontFileReader {
 
     /**
      * Write a USHort at a given position.
-     * 
+     *
      * @param pos The absolute position to write to
      * @param val The value to write
      * @throws IOException If EOF is reached
@@ -213,7 +213,7 @@ public class FontFileReader {
 
     /**
      * Read 2 bytes signed at position pos without changing current position.
-     * 
+     *
      * @param pos The absolute position to read from
      * @return One signed short
      * @throws IOException If EOF is reached
@@ -228,7 +228,7 @@ public class FontFileReader {
 
     /**
      * Read 2 bytes unsigned at position pos without changing current position.
-     * 
+     *
      * @param pos The absolute position to read from
      * @return One unsigned short
      * @throws IOException If EOF is reached
@@ -243,7 +243,7 @@ public class FontFileReader {
 
     /**
      * Read 4 bytes.
-     * 
+     *
      * @return One signed integer
      * @throws IOException If EOF is reached
      */
@@ -258,7 +258,7 @@ public class FontFileReader {
 
     /**
      * Read 4 bytes.
-     * 
+     *
      * @return One unsigned integer
      * @throws IOException If EOF is reached
      */
@@ -273,7 +273,7 @@ public class FontFileReader {
 
     /**
      * Read a NUL terminated ISO-8859-1 string.
-     * 
+     *
      * @return A String
      * @throws IOException If EOF is reached
      */
@@ -294,7 +294,7 @@ public class FontFileReader {
 
     /**
      * Read an ISO-8859-1 string of len bytes.
-     * 
+     *
      * @param len The length of the string to read
      * @return A String
      * @throws IOException If EOF is reached
@@ -312,7 +312,7 @@ public class FontFileReader {
 
     /**
      * Return a copy of the internal array
-     * 
+     *
      * @param offset The absolute offset to start reading from
      * @param length The number of bytes to read
      * @return An array of bytes
index e5944031e101806406816452563c6aba5e2d5c5b..9f5da3b75845e7c093a286f7336e267b37c64ae3 100644 (file)
@@ -154,28 +154,28 @@ public class Glyphs {
         '\u2014',                                       // emdash
         '~', '\u2022',                                  // bullet
         '\u0161', '\u203a', '\u0153', '\u2022', '\u017e', '\u0178', // 0xA0
-             ' ', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5', 
-             '\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab', 
+             ' ', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5',
+             '\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab',
              '\u00ac', '\u00ad',  '\u00ae', '\u00af', // 0xb0
         '\u00b0', '\u00b1', '\u00b2', '\u00b3', '\u00b4',
              '\u00b5',                                  // This is hand-coded, the rest is assumption
         '\u00b6',                                       // and *might* not be correct...
-        '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd', 
+        '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd',
              '\u00be', '\u00bf', // 0xc0
         '\u00c0', '\u00c1', '\u00c2', '\u00c3', '\u00c4', '\u00c5', // Aring
         '\u00c6',                                            // AE
-        '\u00c7', '\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc', 
+        '\u00c7', '\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc',
              '\u00cd', '\u00ce', '\u00cf', // 0xd0
-        '\u00d0', '\u00d1', '\u00d2', '\u00d3', '\u00d4', '\u00d5', 
+        '\u00d0', '\u00d1', '\u00d2', '\u00d3', '\u00d4', '\u00d5',
              '\u00d6', '\u00d7', '\u00d8',    // Oslash
-        '\u00d9', '\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de', 
+        '\u00d9', '\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de',
              '\u00df', // 0xe0
         '\u00e0', '\u00e1', '\u00e2', '\u00e3', '\u00e4', '\u00e5', // aring
         '\u00e6',                                            // ae
-        '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb', '\u00ec', 
+        '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb', '\u00ec',
              '\u00ed', '\u00ee', '\u00ef', // 0xf0
-        '\u00f0', '\u00f1', '\u00f2', '\u00f3', '\u00f4', '\u00f5', 
-             '\u00f6', '\u00f7', '\u00f8', '\u00f9', '\u00fa', '\u00fb', 
+        '\u00f0', '\u00f1', '\u00f2', '\u00f3', '\u00f4', '\u00f5',
+             '\u00f6', '\u00f7', '\u00f8', '\u00f9', '\u00fa', '\u00fb',
              '\u00fc', '\u00fd', '\u00fe', '\u00ff'
     };
 
@@ -1233,7 +1233,7 @@ public class Glyphs {
         "\uF730", "zerooldstyle",
         "\u2070", "zerosuperior",
         "\u03B6", "zeta"
-   
+
     };
 
     /**
index 409cd11b0cd9fcdabff7ab5ba1f71a27703b0e28..d3e900d9fa9e3ab358abb42b8b965be07200db3e 100644 (file)
@@ -12,7 +12,7 @@ package org.apache.fop.fonts;
  * the glyph indexes related to the range
  */
 public class TTFCmapEntry {
-    
+
     private int unicodeStart;
     private int unicodeEnd;
     private int glyphStartIndex;
index 6648832a7a858c5bd0ebd73d0fb12bf6d5c1145d..2c621333619d3eaa5f91ca0082996c4781fb9e9e 100644 (file)
@@ -10,7 +10,7 @@ package org.apache.fop.fonts;
 import java.io.IOException;
 
 class TTFDirTabEntry {
-    
+
     private byte[] tag = new byte[4];
     private int checksum;
     private long offset;
@@ -33,13 +33,13 @@ class TTFDirTabEntry {
         //System.out.println(this.toString());
         return new String(tag, "ISO-8859-1");
     }
-    
-    
+
+
     public String toString() {
-        return "Read dir tab [" 
+        return "Read dir tab ["
             + tag[0] + " " + tag[1] + " " + tag[2] + " " + tag[3] + "]"
             + " offset: " + offset
-            + " length: " + length 
+            + " length: " + length
             + " name: " + tag;
     }
 
index b6a7234800f05f4a67b9f10a516c0c05e8466f1a..d950718a67b46e8575671f89c1cc5ee606a2936e 100644 (file)
@@ -22,25 +22,25 @@ import org.apache.avalon.framework.logger.Logger;
  * Typography site: http://www.microsoft.com/truetype/
  */
 public class TTFFile extends AbstractLogEnabled {
-    
+
     static final byte NTABS = 24;
     static final int NMACGLYPHS = 258;
     static final int MAX_CHAR_CODE = 255;
     static final int ENC_BUF_SIZE = 1024;
 
     private String encoding = "WinAnsiEncoding";    // Default encoding
-    
+
     private short firstChar = 0;
     private boolean isEmbeddable = true;
     private boolean hasSerifs = true;
     /**
      * Table directory
      */
-    protected Map dirTabs;                          
+    protected Map dirTabs;
     private Map kerningTab;                          // for CIDs
     private Map ansiKerningTab;                      // For winAnsiEncoding
     private List cmaps;
-    private List unicodeMapping;                     
+    private List unicodeMapping;
 
     private int upem;                                // unitsPerEm from "head" table
     private int nhmtx;                               // Number of horizontal metrics
@@ -55,7 +55,7 @@ public class TTFFile extends AbstractLogEnabled {
 
     /**
      * Contains glyph data
-     */    
+     */
     protected TTFMtxEntry mtxTab[];                  // Contains glyph data
     private int[] mtxEncoded = null;
 
@@ -144,7 +144,7 @@ public class TTFFile extends AbstractLogEnabled {
             int cmapEID = in.readTTFUShort();
             long cmapOffset = in.readTTFULong();
 
-            getLogger().debug("Platform ID: " + cmapPID 
+            getLogger().debug("Platform ID: " + cmapPID
                 + " Encoding: " + cmapEID);
 
             if (cmapPID == 3 && cmapEID == 1) {
@@ -175,7 +175,7 @@ public class TTFFile extends AbstractLogEnabled {
             getLogger().debug("searchRange  : " + cmapSearchRange);
             getLogger().debug("entrySelector: " + cmapEntrySelector);
             getLogger().debug("rangeShift   : " + cmapRangeShift);
-            
+
 
             int cmapEndCounts[] = new int[cmapSegCountX2 / 2];
             int cmapStartCounts[] = new int[cmapSegCountX2 / 2];
@@ -208,10 +208,10 @@ public class TTFFile extends AbstractLogEnabled {
             // and fill in the cmaps ArrayList
 
             for (int i = 0; i < cmapStartCounts.length; i++) {
-                
-                getLogger().debug(i + ": " + cmapStartCounts[i] 
+
+                getLogger().debug(i + ": " + cmapStartCounts[i]
                     + " - " + cmapEndCounts[i]);
-                 
+
                 for (int j = cmapStartCounts[i]; j <= cmapEndCounts[i]; j++) {
 
                     // Update lastChar
@@ -224,9 +224,9 @@ public class TTFFile extends AbstractLogEnabled {
                         // the last character 65535 = .notdef
                         // may have a range offset
                         if (cmapRangeOffsets[i] != 0 && j != 65535) {
-                            int glyphOffset = glyphIdArrayOffset 
-                                + ((cmapRangeOffsets[i] / 2) 
-                                    + (j - cmapStartCounts[i]) 
+                            int glyphOffset = glyphIdArrayOffset
+                                + ((cmapRangeOffsets[i] / 2)
+                                    + (j - cmapStartCounts[i])
                                     + (i)
                                     - cmapSegCountX2 / 2) * 2;
                             in.seekSet(glyphOffset);
@@ -245,18 +245,18 @@ public class TTFFile extends AbstractLogEnabled {
                                     Integer aIdx = (Integer)e.next();
                                     ansiWidth[aIdx.intValue()] =
                                         mtxTab[glyphIdx].getWx();
-                                    
+
                                     getLogger().debug("Added width "
-                                        + mtxTab[glyphIdx].getWx() 
-                                        + " uni: " + j 
+                                        + mtxTab[glyphIdx].getWx()
+                                        + " uni: " + j
                                         + " ansi: " + aIdx.intValue());
                                 }
                             }
-                            
-                            getLogger().debug("Idx: " 
-                                + glyphIdx 
-                                + " Delta: " + cmapDeltas[i] 
-                                + " Unicode: " + j 
+
+                            getLogger().debug("Idx: "
+                                + glyphIdx
+                                + " Delta: " + cmapDeltas[i]
+                                + " Unicode: " + j
                                 + " name: " + mtxTab[glyphIdx].getName());
                         } else {
                             glyphIdx = (j + cmapDeltas[i]) & 0xffff;
@@ -287,14 +287,14 @@ public class TTFFile extends AbstractLogEnabled {
                                     ansiWidth[aIdx.intValue()] = mtxTab[glyphIdx].getWx();
                                 }
                             }
-                            
+
                             //getLogger().debug("IIdx: " +
                             //    mtxPtr +
                             //    " Delta: " + cmap_deltas[i] +
                             //    " Unicode: " + j +
                             //    " name: " +
                             //    mtxTab[(j+cmap_deltas[i]) & 0xffff].name);
-                            
+
                         }
                         if (glyphIdx < mtxTab.length) {
                             if (mtxTab[glyphIdx].getUnicodeIndex().size() < 2) {
@@ -326,10 +326,10 @@ public class TTFFile extends AbstractLogEnabled {
         getLogger().info("Max: " + max);
     }
 
-    
+
     /**
      * Reads the font using a FontFileReader.
-     * 
+     *
      * @param in The FontFileReader to use
      * @throws IOException In case of an I/O problem
      */
@@ -566,7 +566,7 @@ public class TTFFile extends AbstractLogEnabled {
     }
 
     /**
-     * Returns the index of the last character, but this is for WinAnsiEncoding 
+     * Returns the index of the last character, but this is for WinAnsiEncoding
      * only, so the last char is < 256.
      * @return short Index of the last character (<256)
      */
@@ -724,8 +724,8 @@ public class TTFFile extends AbstractLogEnabled {
         for (int i = 0; i < nhmtx; i++) {
             mtxTab[i].setWx(in.readTTFUShort());
             mtxTab[i].setLsb(in.readTTFUShort());
-            
-            getLogger().debug("   width[" + i + "] = " 
+
+            getLogger().debug("   width[" + i + "] = "
                 + convertTTFUnit2PDFUnit(mtxTab[i].getWx()) + ";");
         }
 
@@ -783,7 +783,7 @@ public class TTFFile extends AbstractLogEnabled {
             }
             // firstChar=minIndex;
             psGlyphsBuffer = new String[numGlyphStrings];
-            getLogger().debug("Reading " + numGlyphStrings 
+            getLogger().debug("Reading " + numGlyphStrings
                 + " glyphnames" + ", was n num glyphs=" + l);
             for (i = 0; i < psGlyphsBuffer.length; i++) {
                 psGlyphsBuffer[i] = in.readTTFString(in.readTTFUByte());
@@ -795,7 +795,7 @@ public class TTFFile extends AbstractLogEnabled {
                 } else {
                     k = mtxTab[i].getIndex() - NMACGLYPHS;
 
-                    getLogger().debug(k + " i=" + i + " mtx=" + mtxTab.length 
+                    getLogger().debug(k + " i=" + i + " mtx=" + mtxTab.length
                         + " ps=" + psGlyphsBuffer.length);
 
                     mtxTab[i].setName(psGlyphsBuffer[k]);
@@ -877,9 +877,9 @@ public class TTFFile extends AbstractLogEnabled {
                 in.seekSet(n + mtxTab[i].getOffset());
                 in.skip(2);
                 final int[] bbox = {
-                    in.readTTFShort(), 
-                    in.readTTFShort(), 
-                    in.readTTFShort(), 
+                    in.readTTFShort(),
+                    in.readTTFShort(),
+                    in.readTTFShort(),
                     in.readTTFShort()};
                 mtxTab[i].setBoundingBox(bbox);
             } else {
@@ -924,7 +924,7 @@ public class TTFFile extends AbstractLogEnabled {
                 // if (k==1 || k==2 || k==0 || k==4 || k==6) {
                 in.seekSet(j + in.readTTFUShort());
                 String txt = in.readTTFString(l);
-                // getLogger().debug(platform_id + " " + encoding_id 
+                // getLogger().debug(platform_id + " " + encoding_id
                 //     + " " + k + " " + txt);
                 switch (k) {
                 case 0:
@@ -943,9 +943,9 @@ public class TTFFile extends AbstractLogEnabled {
                     fontName = txt;
                     break;
                 }
-                if (!notice.equals("") 
+                if (!notice.equals("")
                         && !fullName.equals("")
-                        && !fontName.equals("") 
+                        && !fontName.equals("")
                         && !familyName.equals("")
                         && !subFamilyName.equals("")) {
                     break;
@@ -1220,10 +1220,10 @@ public class TTFFile extends AbstractLogEnabled {
  * Key-value helper class
  */
 class UnicodeMapping {
-    
+
     private int uIdx;
     private int gIdx;
-    
+
     UnicodeMapping(int gIdx, int uIdx) {
         this.uIdx = uIdx;
         this.gIdx = gIdx;
index 1aa11d2d2ae0e737df5c11b4858e8b0cbb143883..747be55f83729b3780b9a5f904bc656b62c2c89d 100644 (file)
@@ -10,7 +10,7 @@ package org.apache.fop.fonts;
 import java.util.List;
 
 class TTFMtxEntry {
-    
+
     private int wx;
     private int lsb;
     private String name = "";
@@ -22,10 +22,10 @@ class TTFMtxEntry {
 
     public String toString(TTFFile t) {
         return "Glyph " + name + " index: " + index + " bbox [ "
-             + t.convertTTFUnit2PDFUnit(boundingBox[0]) + " " 
-             + t.convertTTFUnit2PDFUnit(boundingBox[1]) + " " 
-             + t.convertTTFUnit2PDFUnit(boundingBox[2]) + " " 
-             + t.convertTTFUnit2PDFUnit(boundingBox[3]) + "] wx: " 
+             + t.convertTTFUnit2PDFUnit(boundingBox[0]) + " "
+             + t.convertTTFUnit2PDFUnit(boundingBox[1]) + " "
+             + t.convertTTFUnit2PDFUnit(boundingBox[2]) + " "
+             + t.convertTTFUnit2PDFUnit(boundingBox[3]) + "] wx: "
              + t.convertTTFUnit2PDFUnit(wx);
     }
 
index b790f4426fbf28e2b99c5c25c1b42a230fea7699..7a1a98e956aa9afc5d8d78b95fbc986d9f9f3925 100644 (file)
@@ -21,7 +21,7 @@ import java.util.List;
  * Typography site: http://www.microsoft.com/truetype/
  */
 public class TTFSubSetFile extends TTFFile {
-    
+
     private byte[] output = null;
     private int realSize = 0;
     private int currentPos = 0;
@@ -390,7 +390,7 @@ public class TTFSubSetFile extends TTFFile {
         if (entry != null) {
             pad4();
             //int offset = (int)entry.offset;
-            Iterator e = glyphs.keySet().iterator(); 
+            Iterator e = glyphs.keySet().iterator();
             while (e.hasNext()) {
                 Integer origIndex = (Integer)e.next();
                 Integer subsetIndex = (Integer)glyphs.get(origIndex);
@@ -531,7 +531,7 @@ public class TTFSubSetFile extends TTFFile {
                 // Inefficient to iterate through all glyphs
                 newComposites = new java.util.HashMap();
 
-                Iterator e = glyphs.keySet().iterator(); 
+                Iterator e = glyphs.keySet().iterator();
                 while (e.hasNext()) {
                     Integer origIndex = (Integer)e.next();
 
@@ -583,10 +583,10 @@ public class TTFSubSetFile extends TTFFile {
 
     /**
      * Returns a subset of the original font.
-     * 
+     *
      * @param in FontFileReader to read from
      * @param name Name to be checked for in the font file
-     * @param glyphs Map of glyphs (glyphs has old index as (Integer) key and 
+     * @param glyphs Map of glyphs (glyphs has old index as (Integer) key and
      * new index as (Integer) value)
      * @return A subset of the original font
      * @throws IOException in case of an I/O problem
index 120fd36a37ec20bdcb384b25b43de4dd1005ee5b..624df8092c7bceebddd3ab900b3fb530616db3d1 100644 (file)
@@ -4,24 +4,24 @@
 <xsl:output method="xml"/>
 
 <xsl:template match="@*|node()">
-       <xsl:copy>
-               <xsl:apply-templates select="@*|node()"/>
-       </xsl:copy>
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="widths">
-       <xsl:element name="widths">
-               <xsl:for-each select="char">
-                       <xsl:variable name="char-num" select="@ansichar"/>
-                       <xsl:variable name="char-name" select="document('file:charlist.xml')/font-mappings/map[@win-ansi=$char-num]/@adobe-name"/>
-                       <xsl:if test="$char-name!=''">
-                               <xsl:element name="char">
-                                       <xsl:attribute name="name"><xsl:value-of select="$char-name"/></xsl:attribute>
-                                       <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
-                               </xsl:element>
-                       </xsl:if>
-               </xsl:for-each>
-       </xsl:element>
+  <xsl:element name="widths">
+    <xsl:for-each select="char">
+      <xsl:variable name="char-num" select="@ansichar"/>
+      <xsl:variable name="char-name" select="document('file:charlist.xml')/font-mappings/map[@win-ansi=$char-num]/@adobe-name"/>
+      <xsl:if test="$char-name!=''">
+        <xsl:element name="char">
+          <xsl:attribute name="name"><xsl:value-of select="$char-name"/></xsl:attribute>
+          <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
+        </xsl:element>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:element>
 </xsl:template>
 
 </xsl:stylesheet>
index 63ca434081e218c83455a5885ceb16e841d67aaf..989f665660d82a57342f78c58fd9d644e53ab49d 100644 (file)
@@ -3,17 +3,17 @@
 <xsl:output method="xml"/>
 
 <xsl:template match="@*|node()">
-       <xsl:copy>
-               <xsl:apply-templates select="@*|node()"/>
-       </xsl:copy>
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="widths">
-       <xsl:copy>
-               <xsl:apply-templates select="char">
-                       <xsl:sort select="@name" case-order="upper-first"/>
-               </xsl:apply-templates>
-       </xsl:copy>
+  <xsl:copy>
+    <xsl:apply-templates select="char">
+      <xsl:sort select="@name" case-order="upper-first"/>
+    </xsl:apply-templates>
+  </xsl:copy>
 </xsl:template>
 
 
index e4cc9bbdbe44bb297be461abe98b65f512c93ec0..9646a18d506d3137dc0d66426aebd6c3cd930068 100644 (file)
@@ -158,7 +158,7 @@ public abstract class AbstractFopImage implements FopImage {
      * Load a bitmap array of the image.
      * If the renderer requires a bitmap image then the
      * implementations should override this to load the bitmap.
-     * 
+     *
      * @param ua the user agent
      * @return true if the loading was successful
      */
@@ -169,7 +169,7 @@ public abstract class AbstractFopImage implements FopImage {
     /**
      * Load the original image data.
      * In some cases the original data can be used by the renderer.
-     * This should load the data and any other associated information. 
+     * This should load the data and any other associated information.
      *
      * @param ua the user agent
      * @return true if the loading was successful
index e0e2ef866f7f6e579ffe8b7e87e6c650cc9f4cf9..3ea3a8bc5ce2c90bd18802cabbb0cfde581dc8e4 100644 (file)
@@ -100,7 +100,7 @@ public class ImageFactory {
      * the image.
      * The image should then be put into the weak cache.
      *
-     * @param url the url for the image 
+     * @param url the url for the image
      * @param context the user agent context
      */
     public void releaseImage(String url, FOUserAgent context) {
@@ -112,7 +112,7 @@ public class ImageFactory {
      * @param href image URL as a String
      * @return a new FopImage object
      *
-     * @param href the url for the image 
+     * @param href the url for the image
      * @param baseURL the base url
      * @param ua the user agent context
      * @return the fop image instance
index 9d649b2662ef2c483f28cbed44552ecb566d595a..4099deff60b18082d09457dacdca5171bfa8d2e9 100644 (file)
@@ -141,7 +141,7 @@ public abstract class AbstractLayoutManager implements LayoutManager {
     protected boolean hasMoreLM(LayoutManager prevLM) {
         // prevLM should = curChildLM
         if (prevLM != curChildLM) {
-            //log.debug("AbstractLayoutManager.peekNextLM: " + 
+            //log.debug("AbstractLayoutManager.peekNextLM: " +
             //                   "passed LM is not current child LM!");
             return false;
         }
@@ -158,7 +158,7 @@ public abstract class AbstractLayoutManager implements LayoutManager {
      * If pos is null, then back up to the first child LM.
      */
     protected void reset(Position pos) {
-        //if (lm == null) return; 
+        //if (lm == null) return;
         LayoutManager lm = (pos != null) ? pos.getLM() : null;
         if (curChildLM != lm) {
             // ASSERT curChildLM == (LayoutManager)childLMiter.previous()
@@ -191,7 +191,7 @@ public abstract class AbstractLayoutManager implements LayoutManager {
      * This method provides a hook for a LayoutManager to intialize traits
      * for the areas it will create, based on Properties set on its FO.
      */
-    public void init() { 
+    public void init() {
         if (fobj != null && bInited == false) {
             initProperties(fobj.getPropertyManager());
             bInited = true;
@@ -205,7 +205,7 @@ public abstract class AbstractLayoutManager implements LayoutManager {
     protected void initProperties(PropertyManager pm) {
         //log.debug("AbstractLayoutManager.initProperties");
     }
-    
+
 
     /**
      * Tell whether this LayoutManager has handled all of its content.
@@ -369,7 +369,7 @@ public abstract class AbstractLayoutManager implements LayoutManager {
 
     /**
      * Add background to an area.
-     * Layout managers that create areas with a background can use this to 
+     * Layout managers that create areas with a background can use this to
      * add the background to the area.
      */
     public static void addBackground(Area curBlock, BackgroundProps backProps) {
@@ -386,7 +386,7 @@ public abstract class AbstractLayoutManager implements LayoutManager {
                 back.vertical = backProps.backPosVertical.mvalue();
             }
         }
-    
+
         if(back.color != null || back.url != null) {
             curBlock.addTrait(Trait.BACKGROUND, back);
         }
index 4ccfea572ab475e0ace96c57caec10adb784c044..3446179da5673675ac1c6fa99e69bb35ec10f8a0 100644 (file)
@@ -168,7 +168,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
 
         while ((curLM = getChildLM()) != null) {
             // Make break positions and return blocks!
-            // Set up a LayoutContext 
+            // Set up a LayoutContext
             BreakPoss bp;
 
             LayoutContext childLC = new LayoutContext(0);
index 63e56c613f95857e3f051423c1a838ae749c48c6..7692c8c3be7781b6687f50478f200b272db226ba 100644 (file)
@@ -117,7 +117,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager {
         borderProps = pm.getBorderAndPadding();
         backgroundProps = pm.getBackgroundProps();
     }
-    
+
     public BreakPoss getNextBreakPoss(LayoutContext context) {
         LayoutManager curLM; // currently active LM
 
index 58e57834d7b5e4c223be1294efe047908c7f7e0c..0da033a5b9635991ef1de65eb58eb683e1402873 100644 (file)
@@ -23,7 +23,7 @@ import java.util.List;
  */
 public class FlowLayoutManager extends BlockStackingLayoutManager {
 
-    protected List blockBreaks = new ArrayList();      
+    protected List blockBreaks = new ArrayList();
 
     /** Array of areas currently being filled stored by area class */
     private BlockParent[] currentAreas = new BlockParent[Area.CLASS_MAX];
@@ -103,7 +103,7 @@ public class FlowLayoutManager extends BlockStackingLayoutManager {
             PositionIterator breakPosIter =
               new BreakPossPosIter(blockBreaks, iStartPos,
                                    lfp.getLeafPos() + 1);
-            iStartPos = lfp.getLeafPos() + 1; 
+            iStartPos = lfp.getLeafPos() + 1;
             while ((childLM = breakPosIter.getNextChildLM()) != null) {
                 childLM.addAreas(breakPosIter, lc);
             }
index 88264476497f5995ea4ffbccc99a57b5ef7c1c1a..3b05cb0afa9f675e146ef3451a503a1e86876ef0 100644 (file)
@@ -86,7 +86,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
     private int follow;
 
     // inline start pos when adding areas
-    int iStartPos = 0;    
+    int iStartPos = 0;
 
     /**
      * Create a new Line Layout Manager.
@@ -447,7 +447,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
             BreakPoss bp = (BreakPoss)iter.next();
             if (bp.getLead() > lineLead) {
                 lineLead = bp.getLead();
-            } 
+            }
             if (bp.getTotal() > maxtb) {
                 maxtb = bp.getTotal();
             }
index 9c494fa6138d744faf1206ee89f81ff76f2c5010..0583ae401e1fe94a0c2718cb5b23ecefaa12ea6f 100644 (file)
@@ -70,7 +70,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
     private Flow curFlow;
 
     private int flowBPD = 0;
-    private int flowIPD = 0; 
+    private int flowIPD = 0;
 
     /** Manager which handles a queue of all pages which are completely
      * laid out and ready for rendering, except for resolution of ID
@@ -412,7 +412,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
             }
         }
     }
-  
+
     private void finishPage() {
         if (curPage != null) {
             // Layout static content into the regions
index f7474860b420b1745cc9d1a3df2c3cd76b30e750..56205a2d7171bdbad829fb41762859342025430f 100644 (file)
@@ -24,8 +24,8 @@ import java.util.List;
 public class StaticContentLayoutManager extends BlockStackingLayoutManager {
 
     private RegionReference region;
-    private List blockBreaks = new ArrayList();      
-  
+    private List blockBreaks = new ArrayList();
+
     public StaticContentLayoutManager(FObj fobj) {
         super(fobj);
     }
@@ -33,7 +33,7 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager {
     public void setRegionReference(RegionReference region) {
         this.region = region;
     }
-   
+
     public BreakPoss getNextBreakPoss(LayoutContext context) {
 
         // currently active LM
@@ -73,7 +73,7 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager {
             PositionIterator breakPosIter =
               new BreakPossPosIter(blockBreaks, iStartPos,
                                    lfp.getLeafPos() + 1);
-            iStartPos = lfp.getLeafPos() + 1; 
+            iStartPos = lfp.getLeafPos() + 1;
             while ((childLM = breakPosIter.getNextChildLM()) != null) {
                 childLM.addAreas(breakPosIter, lc);
             }
index d55bd7cf83acc664d9e8c1cde44bded8da98cbcf..bf96d6ab060ee972bcb659e180449e65ba24e207 100644 (file)
@@ -120,7 +120,7 @@ public class Item extends BlockStackingLayoutManager {
             }
             BreakPoss breakPoss = new BreakPoss(
                                     new LeafPosition(this, childBreaks.size() - 1));
-            if (over) { 
+            if (over) {
                 breakPoss.setFlag(BreakPoss.NEXT_OVERFLOWS, true);
             }
             breakPoss.setStackingSize(stackSize);
index 95335b4b16d34224186093abb1c502768b4d0d42..2c4cf060356e3601f23cc625853d24d211ac52e6 100644 (file)
@@ -122,7 +122,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
             }
             BreakPoss breakPoss = new BreakPoss(
                                     new LeafPosition(this, bodyBreaks.size() - 1));
-            if (over) { 
+            if (over) {
                 breakPoss.setFlag(BreakPoss.NEXT_OVERFLOWS, true);
             }
             breakPoss.setStackingSize(stackSize);
@@ -163,7 +163,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
             }
         }
 
-        if(borderProps != null) { 
+        if(borderProps != null) {
             addBorders(curBlockArea, borderProps);
         }
         if(backgroundProps != null) {
@@ -225,7 +225,7 @@ public class ListBlockLayoutManager extends BlockStackingLayoutManager {
             bodyBreaks.clear();
             reset(null);
         } else {
-            
+
         }
     }
 }
index b7a3219be9b38706e102658c505f552cb2c5b96c..6d3efbf3a105c0bc90deb5dd1e318a1964efd4b2 100644 (file)
@@ -177,7 +177,7 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager {
 
         ItemPosition rp = new ItemPosition(this, breakList.size() - 1, breakList);
         BreakPoss breakPoss = new BreakPoss(rp);
-        if (over) { 
+        if (over) {
             breakPoss.setFlag(BreakPoss.NEXT_OVERFLOWS, true);
         }
         breakPoss.setStackingSize(itemSize);
index a7beb6695e74e402f916b542cbf98361836e5e17..c12bbba1166fcbdba0dd620f0e000a76f712bc7a 100644 (file)
@@ -188,7 +188,7 @@ public class Row extends BlockStackingLayoutManager {
             // the optimum is the maximum of all optimums
             if (stackSize.opt > opt) {
                 opt = stackSize.opt;
-            }   
+            }
             // the maximum is the largest maximum
             if (stackSize.max > max) {
                 max = stackSize.max;
@@ -203,7 +203,7 @@ public class Row extends BlockStackingLayoutManager {
         setFinished(true);
         RowPosition rp = new RowPosition(this, breakList.size() - 1, breakList);
         BreakPoss breakPoss = new BreakPoss(rp);
-        if (over) { 
+        if (over) {
             breakPoss.setFlag(BreakPoss.NEXT_OVERFLOWS, true);
         }
         breakPoss.setStackingSize(rowSize);
@@ -217,7 +217,7 @@ public class Row extends BlockStackingLayoutManager {
      * @param pos a Position returned by a child layout manager
      * representing a potential break decision.
      * If pos is null, then back up to the first child LM.
-     */    
+     */
     protected void reset(Position pos) {
         LayoutManager curLM; // currently active LM
         int cellcount = 0;
@@ -249,7 +249,7 @@ public class Row extends BlockStackingLayoutManager {
      */
     public void setYOffset(int off) {
         yoffset = off;
-    } 
+    }
 
     /**
      * Add the areas for the break points.
index db0864afc65ebb98dde26111f4243f1d4c149f32..d968ce23d92a1103488f334157ae9f6341017810 100644 (file)
@@ -287,7 +287,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager {
 
         curBlockArea.setHeight(tableHeight);
 
-        if(borderProps != null) { 
+        if(borderProps != null) {
             addBorders(curBlockArea, borderProps);
         }
         if(backgroundProps != null) {
index 99e4333a3572fff54eeff367b0d80d700bbb685c..1e4c320f46b8b2fc91e45221032b67b54eec429a 100644 (file)
@@ -119,7 +119,7 @@ public class MIFHandler extends StructureHandler {
     }
 
     public void endPageSequence(PageSequence pageSeq) throws FOPException {
-        
+
     }
 
     public void startFlow(Flow fl) {
index 47260b7853195b7fe68756de79c0685a83071ca1..010035fd522864192da46d0566544b9d9c5ca375 100644 (file)
@@ -34,6 +34,6 @@ public class DCTFilter extends PDFFilter {
         StreamUtilities.streamCopy(in, out, length);
         out.close();
     }
-    
+
 }
 
index b8659ef2dcd563cf301278b24df24419ce1c9919..87862115d145086a64f5394d00d14eb1e4972a9d 100644 (file)
@@ -11,10 +11,10 @@ public class PDFColorSpace {
     private boolean hasICCProfile;
     private byte[] iccProfile;
     private int numComponents;
-    
+
     // Ok... so I had some grand purpose for this, but I can't recall.
     // I'm just writing it
-    
+
     public static int DEVICE_UNKNOWN = -1;
     public static int DEVICE_GRAY = 1;
     // what's the *official* spelling?
index fdd8578bde76c727f826d5f225a9b02ba73cf0ae..afbe717069ba426b3614d823c60af1723f7b9008 100644 (file)
@@ -161,28 +161,28 @@ public class PDFDocument {
 
     /**
      * List of Links.
-     */ 
+     */
     protected List links = new ArrayList();
 
     /**
      * List of FileSpecs.
-     */ 
+     */
     protected List filespecs = new ArrayList();
 
     /**
      * List of GoToRemotes.
-     */ 
+     */
     protected List gotoremotes = new ArrayList();
 
     /**
      * List of GoTos.
-     */ 
+     */
     protected List gotos = new ArrayList();
 
 
     /**
      * creates an empty PDF document <p>
-     * 
+     *
      * The constructor creates a /Root and /Pages object to
      * track the document but does not write these objects until
      * the trailer is written. Note that the object ID of the
@@ -1464,8 +1464,8 @@ public class PDFDocument {
     /**
      * Add an annotation list object to the pdf document
      *
-     * @param obj the annotation list to add 
-     */ 
+     * @param obj the annotation list to add
+     */
     public void addAnnotList(PDFAnnotList obj) {
         this.objects.add(obj);
     }
@@ -1536,7 +1536,7 @@ public class PDFDocument {
              * add the position of this object to the list of object
              * locations
              */
-            location.set(object.getNumber() - 1, 
+            location.set(object.getNumber() - 1,
                          new Integer(this.position));
 
             /*
@@ -1586,7 +1586,7 @@ public class PDFDocument {
         output(stream);
         for (int count = 0; count < trailerObjects.size(); count++) {
             PDFObject o = (PDFObject) trailerObjects.get(count);
-            this.location.set(o.getNumber() - 1, 
+            this.location.set(o.getNumber() - 1,
                               new Integer(this.position));
             this.position += o.output(stream);
         }
index 32382b9558bbef667162cc5dca9ec53d7f2fd51d..732d902a8b83c7b44c576177cf3934c514cc9af5 100644 (file)
@@ -699,35 +699,35 @@ public class PDFFunction extends PDFObject {
         }
         if (range != null) {
             if (!range.equals(func.range)) {
-                return false; 
+                return false;
             }
         } else if (func.range != null) {
             return false;
         }
         if (size != null) {
             if (!size.equals(func.size)) {
-                return false; 
+                return false;
             }
         } else if (func.size != null) {
             return false;
         }
         if (encode != null) {
             if (!encode.equals(func.encode)) {
-                return false; 
+                return false;
             }
         } else if (func.encode != null) {
             return false;
         }
         if (decode != null) {
             if (!decode.equals(func.decode)) {
-                return false; 
+                return false;
             }
         } else if (func.decode != null) {
             return false;
         }
         if (functionDataStream != null) {
             if (!functionDataStream.equals(func.functionDataStream)) {
-                return false; 
+                return false;
             }
         } else if (func.functionDataStream != null) {
             return false;
index b3f9c140d8ade0710aaaaadda75d965bcb567e2f..9e61487cfa4e541252e2c137db54b7ac844a5c2b 100644 (file)
@@ -12,7 +12,7 @@ import java.awt.color.ICC_Profile;
 public class PDFICCStream extends PDFStream {
     private int origLength;
     private int len1, len3;
-    
+
     private ICC_Profile cp;
     private PDFColorSpace pdfColorSpace;
 
@@ -20,12 +20,12 @@ public class PDFICCStream extends PDFStream {
         this.cp = cp;
         pdfColorSpace = alt;
     }
-    
+
     public PDFICCStream(int num) {
         super(num);
         cp = null;
     }
-    
+
         // overload the base object method so we don't have to copy
         // byte arrays around so much
     protected int output(java.io.OutputStream stream)
@@ -38,11 +38,11 @@ public class PDFICCStream extends PDFStream {
         StringBuffer pb = new StringBuffer();
         pb.append(this.number).append(" ").append(this.generation).append(" obj\n<< ");
         pb.append("/N ").append(cp.getNumComponents()).append(" ");
-        
+
         if (pdfColorSpace != null) {
             pb.append("/Alternate /").append(pdfColorSpace.getColorSpacePDFString()).append(" ");
         }
-        
+
         pb.append("/Length ").append((_data.getSize() + 1)).append(" ").append(filterEntry);
         pb.append(" >>\n");
         byte[] p = pb.toString().getBytes();
index 48e281b815d25ae1d5f2a35030085ea1ddc29788..c7b3e3b800ade6a233c4e506fca9378308c762eb 100644 (file)
@@ -156,7 +156,7 @@ public class PDFOutline extends PDFObject {
 
             // byte order marker (0xfeff)
             result.append("\\376\\377");
-            
+
             for (int i = 0; i < l; i++) {
                 char ch = s.charAt(i);
                 int high = (ch & 0xff00) >>> 8;
index fa958cce4877bcdf7a565a7a6f601a86603f226a..fb55e8f15de44ef5bd3210ff29fe2fad199a8c0c 100644 (file)
@@ -14,7 +14,7 @@ package org.apache.fop.pdf;
  * specifies the dimensions of the page and references a /Resources
  * object, a contents stream and the page's parent in the page
  * hierarchy.
- * 
+ *
  * Modified by Mark Lillywhite, mark-fop@inomial.com. The Parent
  * object was being referred to by reference, but all that we
  * ever used from the Parent was it's PDF object ID, and according
@@ -95,7 +95,7 @@ public class PDFPage extends PDFResourceContext {
 
     /**
      * set this page contents
-     * 
+     *
      * @param contents the contents of the page
      */
     public void setContents(PDFStream contents) {
index 6819cf18749d84d78f03b996a01c20e34c425f82..89bb83c3e789103218dbcd4490b8f1c718fea455 100644 (file)
@@ -14,7 +14,7 @@ package org.apache.fop.pdf;
  * specifies the dimensions of the page and references a /Resources
  * object, a contents stream and the page's parent in the page
  * hierarchy.
- * 
+ *
  * Modified by Mark Lillywhite, mark-fop@inomial.com. The Parent
  * object was being referred to by reference, but all that we
  * ever used from the Parent was it's PDF object ID, and according
index 21ae5ecedecc091f8905b796c39f430dbf22e039..8d2aa7a0643d948e3d276f30c825b311610d11eb 100644 (file)
@@ -159,7 +159,7 @@ public class FontSetup {
                                                  metricsFile,
                                                  configFontInfo.getKerning());
                     fontInfo.addMetrics(internalName, font);
-                    
+
                     ArrayList triplets = configFontInfo.getFontTriplets();
                     for (int c = 0; c < triplets.size(); c++) {
                         FontTriplet triplet = (FontTriplet)triplets.get(c);
index 256e6af77b67d70d61a4343d5f01626f0cb67d6e..3027122cfffade54c76c22cc959fd8b629ba3153 100644 (file)
@@ -127,9 +127,9 @@ public class FopPDFImage implements PDFImage {
 
     protected PDFStream getPSDataStream() throws IOException {
         int length = 0;
-        int i = 0; 
+        int i = 0;
         EPSImage epsImage = (EPSImage) fopImage;
-        int[] bbox = epsImage.getBBox(); 
+        int[] bbox = epsImage.getBBox();
         int bboxw = bbox[2] - bbox[0];
         int bboxh = bbox[3] - bbox[1];
 
index add3dd45c3939e6630e3333ce932276f394c445b..2a75d2768b2479e138e1fa042d48400336ec7d9e 100644 (file)
@@ -19,12 +19,12 @@ import org.apache.fop.apps.Version;
 import org.apache.fop.fo.properties.RuleStyle;
 import org.apache.fop.fo.properties.BackgroundRepeat;
 import org.apache.fop.pdf.PDFStream;
-import org.apache.fop.pdf.PDFDocument; 
+import org.apache.fop.pdf.PDFDocument;
 import org.apache.fop.pdf.PDFInfo;
 import org.apache.fop.pdf.PDFResources;
 import org.apache.fop.pdf.PDFResourceContext;
 import org.apache.fop.pdf.PDFXObject;
-import org.apache.fop.pdf.PDFPage;        
+import org.apache.fop.pdf.PDFPage;
 import org.apache.fop.pdf.PDFState;
 import org.apache.fop.pdf.PDFLink;
 import org.apache.fop.pdf.PDFOutline;
@@ -34,7 +34,7 @@ import org.apache.fop.extensions.BookmarkData;
 
 import org.apache.fop.area.Trait;
 import org.apache.fop.area.TreeExt;
-import org.apache.fop.area.CTM; 
+import org.apache.fop.area.CTM;
 import org.apache.fop.area.Title;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.Page;
@@ -661,7 +661,7 @@ public class PDFRenderer extends PrintRenderer {
                     closeText();
                     currentStream.add("ET\n");
                 }
-                currentStream.add("q\n"); 
+                currentStream.add("q\n");
                 float x = (float)bv.getXOffset() / 1000f;
                 float y = (float)bv.getYOffset() / 1000f;
                 float width = (float)bv.getWidth() / 1000f;
@@ -677,7 +677,7 @@ public class PDFRenderer extends PrintRenderer {
             if (ctm != null) {
                 endVParea();
             }
-        
+
             if (bv.getClip()) {
                 currentStream.add("Q\n");
                 if (ctm == null) {
index ab99a8b245c3505f33516bfe3f764d9940917463..53ee462cf08fafab59f5843e2fbc04be8bb5a646 100644 (file)
@@ -15,21 +15,21 @@ import java.util.HashMap;
 import org.apache.fop.render.pdf.FontReader;
 
 public class LazyFont extends Font implements FontDescriptor {
-    
+
     private String metricsFileName = null;
     private String fontEmbedPath = null;
     private boolean useKerning = false;
-    
+
     private boolean isMetricsLoaded = false;
     private Font realFont = null;
     private FontDescriptor realFontDescriptor = null;
-    
+
     public LazyFont(String fontEmbedPath, String metricsFileName, boolean useKerning){
         this.metricsFileName = metricsFileName;
         this.fontEmbedPath = fontEmbedPath;
         this.useKerning = useKerning;
     }
-    
+
     private void load(){
         if(! isMetricsLoaded){
             isMetricsLoaded = true;
@@ -52,11 +52,11 @@ public class LazyFont extends Font implements FontDescriptor {
             }
         }
     }
-    
+
     public Font getRealFont(){
         return realFont;
     }
-    
+
     public boolean isMultiByte() {
         return realFont.isMultiByte();
     }
@@ -66,114 +66,114 @@ public class LazyFont extends Font implements FontDescriptor {
         load();
         return realFont.encoding();
     }
-    
+
     public String fontName(){
         load();
         return realFont.fontName();
     }
-    
+
     public byte getSubType(){
         load();
         return realFont.getSubType();
     }
-    
+
     public char mapChar(char c){
         load();
         return realFont.mapChar(c);
     }
-    
+
     // FontMetrics
     public int getAscender(int size){
         load();
         return realFont.getAscender(size);
     }
-    
+
     public int getCapHeight(int size){
         load();
         return realFont.getCapHeight(size);
     }
-    
+
     public int getDescender(int size){
         load();
         return realFont.getDescender(size);
     }
-    
+
     public int getXHeight(int size){
         load();
         return realFont.getXHeight(size);
     }
-    
+
     public int getFirstChar(){
         load();
         return realFont.getFirstChar();
     }
-    
+
     public int getLastChar(){
         load();
         return realFont.getLastChar();
     }
-    
+
     public int width(int i, int size){
         load();
         return realFont.width(i, size);
     }
-    
+
     public int[] getWidths(int size){
         load();
         return realFont.getWidths(size);
     }
-    
+
     // FontDescriptor
     public int getCapHeight(){
         load();
         return realFontDescriptor.getCapHeight();
     }
-    
+
     public int getDescender(){
         load();
         return realFontDescriptor.getDescender();
     }
-    
+
     public int getAscender(){
         load();
         return realFontDescriptor.getAscender();
     }
-    
+
     public int getFlags(){
         load();
         return realFontDescriptor.getFlags();
     }
-    
+
     public int[] getFontBBox(){
         load();
         return realFontDescriptor.getFontBBox();
     }
-    
+
     public int getItalicAngle(){
         load();
         return realFontDescriptor.getItalicAngle();
     }
-    
+
     public int getStemV(){
         load();
         return realFontDescriptor.getStemV();
     }
-        
+
     public boolean hasKerningInfo(){
         load();
         return realFontDescriptor.hasKerningInfo();
     }
-    
+
     public HashMap getKerningInfo(){
         load();
         return realFontDescriptor.getKerningInfo();
     }
-    
+
     public boolean isEmbeddable(){
         load();
         return realFontDescriptor.isEmbeddable();
     }
-    
+
     public PDFStream getFontFile(int objNum){
         load();
         return realFontDescriptor.getFontFile(objNum);
index 921b18b4ec44c404804ee8c9960f9cbd5cb2fb78..0a03d3e0b4030d154bb63bb8ae59b32f0453ed5e 100644 (file)
@@ -43,7 +43,7 @@ import java.io.IOException;
     private RtfDocumentArea _docArea;
     private RtfParagraph _para;
     private boolean _warned = false;
-    
+
     private static final String ALPHA_WARNING = "WARNING: RTF renderer is veryveryalpha at this time, see class org.apache.fop.rtf.renderer.RTFHandler";
 
     public RTFHandler(OutputStream os) {
@@ -58,7 +58,7 @@ import java.io.IOException;
     }
 
     public void startDocument() throws SAXException {
-        // FIXME sections should be created 
+        // FIXME sections should be created
         try {
             _rtfFile = new RtfFile(new OutputStreamWriter(_os));
             _docArea = _rtfFile.startDocumentArea();
index 34426dcdffe6fe540ebcfd71ecd6d4e8142ee0c2..fb93a103a9a6ebef5abb16a19fa023ede083fd8a 100644 (file)
@@ -104,7 +104,7 @@ public class PDFANode extends CompositeGraphicsNode {
                     destination = "" + x + " " + y + " "
                                   + (x + width) + " " + (y + height);
                 }
-                pdfg.addLink(getBounds(), transform, destination, type);           
+                pdfg.addLink(getBounds(), transform, destination, type);
             }
         }
     }
index f31ca91d622b69f5129b3a01b634b1eff5527779..ac59a489e0946cd9cc9f57fe90080a12b5344531 100644 (file)
@@ -56,7 +56,7 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D {
      */
     PDFDocumentGraphics2D(boolean textAsShapes) {
         super(textAsShapes);
-    
+
         if (!textAsShapes) {
             fontInfo = new FontInfo();
             FontSetup.setup(fontInfo, null);
@@ -109,7 +109,7 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D {
      * @param stream the stream that the final document should be written to.
      * @param width the width of the document
      * @param height the height of the document
-     * @throws IOException an io exception if there is a problem 
+     * @throws IOException an io exception if there is a problem
      *         writing to the output stream
      */
     public PDFDocumentGraphics2D(boolean textAsShapes, OutputStream stream,
index 8ac1f78bc5c0f00a65c66454c3000ec88a241b88..35417856501a00db1ea1060b96095e2e22ad25d7 100644 (file)
@@ -361,7 +361,7 @@ public class PDFGraphics2D extends AbstractGraphics2D {
             return false;
         }
 
-        // first we look to see if we've already added this image to 
+        // first we look to see if we've already added this image to
         // the pdf document. If so, we just reuse the reference;
         // otherwise we have to build a FopImage and add it to the pdf
         // document
@@ -610,7 +610,7 @@ public class PDFGraphics2D extends AbstractGraphics2D {
         boolean newTransform = graphicsState.checkTransform(trans)
                                && !trans.isIdentity();
 
-        if (newClip || newTransform) { 
+        if (newClip || newTransform) {
             currentStream.write("q\n");
             graphicsState.push();
             if (newClip) {
@@ -993,7 +993,7 @@ public class PDFGraphics2D extends AbstractGraphics2D {
 
         if (outputStream != null) {
             try {
-                this.pdfDoc.output(outputStream); 
+                this.pdfDoc.output(outputStream);
             } catch (IOException ioe) {
                 // ignore exception, will be thrown again later
             }
@@ -1172,10 +1172,10 @@ public class PDFGraphics2D extends AbstractGraphics2D {
         float size;
         name = fontState.getFontName();
         size = (float)fontState.getFontSize() / 1000f;
-    
+
         if ((!name.equals(this.currentFontName))
                 || (size != this.currentFontSize)) {
-            this.currentFontName = name; 
+            this.currentFontName = name;
             this.currentFontSize = size;
             currentStream.write("/" + name + " " + size + " Tf\n");
 
@@ -1193,7 +1193,7 @@ public class PDFGraphics2D extends AbstractGraphics2D {
             HashMap vals = new HashMap();
             vals.put(PDFGState.ca, new Float(salpha / 255f));
             PDFGState gstate = pdfDoc.makeGState(vals, graphicsState.getGState());
-            resourceContext.addGState(gstate); 
+            resourceContext.addGState(gstate);
             currentStream.write("/" + gstate.getName() + " gs\n");
         }
 
index 39a8bcd02e5a36ce525150f15f1c92227f0571b7..ba6ebcd0d8e89d46146520f0cb8ecb609d0325c4 100644 (file)
@@ -22,7 +22,7 @@ import java.awt.event.ActionListener;
 public class GoToPageDialog extends JDialog {
     private JTextField pgNbField;
     private int pageNumber = -1;
+
     /**
      * Creates modal dialog with a given title, attached to a given frame.
      */
index db813dd5de69711a41b61f8ac6df19a724315662..609e7ce74de772693a3b45f515d825b435650bea 100644 (file)
@@ -4,9 +4,9 @@
  * For details on use and redistribution please refer to the
  * LICENSE file included with these sources.
  */
+
 package org.apache.fop.viewer;
+
 //Java
 import java.awt.*;
 import javax.swing.*;
@@ -499,11 +499,11 @@ public class PreviewDialog extends JFrame {
         String msg = translator.getString("Exception.Occured");
         setStatus(msg);
         JOptionPane.showMessageDialog(
-                   getContentPane(),
+            getContentPane(),
             "<html><b>" + msg + ":</b><br>"
-                    + e.getClass().getName() + "<br>" + e.getMessage() + "</html>", translator.getString("Exception.Error"),
+          + e.getClass().getName() + "<br>" + e.getMessage() + "</html>", translator.getString("Exception.Error"),
              JOptionPane.ERROR_MESSAGE
-               );
+        );
     }
 }
 
index f36c6178948208b9ca01ef24d00e6dcbf279763a..0f9a5cc8ff92f696b89d18b86c2feee1259816ec 100644 (file)
@@ -5,14 +5,14 @@
  * LICENSE file included with these sources.
  */
 
-package org.apache.fop.viewer; 
+package org.apache.fop.viewer;
 
 //Java
-import java.util.ResourceBundle; 
+import java.util.ResourceBundle;
 import java.util.Locale;
 import java.util.MissingResourceException;
 
-/** 
+/**
  * AWT Viewer's localization class, backed up by <code>java.util.ResourceBundle</code>.
  * Originally contributed by:
  * Stanislav.Gorkhover@jCatalog.com
@@ -25,10 +25,10 @@ public class Translator {
      * Default constructor, default <code>Locale</code> is used.
      */
     public Translator() {
-        this(Locale.getDefault()); 
+        this(Locale.getDefault());
     }
-    /** 
+
+    /**
      * Constructor for a given <code>Locale</code>.
      */
     public Translator(Locale locale) {