pietsch     2003/07/20 12:53:34

  Modified:    src/org/apache/fop/layout Tag: fop-0_20_2-maintain
                        LineArea.java
               src/org/apache/fop/layout/inline Tag: fop-0_20_2-maintain
                        PageNumberInlineArea.java
  Log:
  Fixed text setting and width recalculation for forward page
  number references.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.53.2.20 +3 -4      xml-fop/src/org/apache/fop/layout/Attic/LineArea.java
  
  Index: LineArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Attic/LineArea.java,v
  retrieving revision 1.53.2.19
  retrieving revision 1.53.2.20
  diff -u -r1.53.2.19 -r1.53.2.20
  --- LineArea.java     6 Jun 2003 07:27:59 -0000       1.53.2.19
  +++ LineArea.java     20 Jul 2003 19:53:34 -0000      1.53.2.20
  @@ -378,10 +378,9 @@
                   Object o = children.get(i);
                   if ( o instanceof PageNumberInlineArea) {
                       PageNumberInlineArea pia = (PageNumberInlineArea)o;
  -                    FontState piaFontState = pia.getFontState();
  -                    finalWidth-=piaFontState.getWordWidth(pia.getText());
  +                    finalWidth-=pia.getContentWidth();
                       pia.resolve(idReferences);
  -                    finalWidth+=piaFontState.getWordWidth(pia.getText());
  +                    finalWidth+=pia.getContentWidth();
                   }
               }
           }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.3   +3 -2      
xml-fop/src/org/apache/fop/layout/inline/Attic/PageNumberInlineArea.java
  
  Index: PageNumberInlineArea.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/layout/inline/Attic/PageNumberInlineArea.java,v
  retrieving revision 1.3.2.2
  retrieving revision 1.3.2.3
  diff -u -r1.3.2.2 -r1.3.2.3
  --- PageNumberInlineArea.java 2 Mar 2003 16:55:16 -0000       1.3.2.2
  +++ PageNumberInlineArea.java 20 Jul 2003 19:53:34 -0000      1.3.2.3
  @@ -59,7 +59,7 @@
   
       public PageNumberInlineArea(FontState fontState, float red, float green,
                                   float blue, String refid, int width) {
  -        super(fontState, red, green, blue, "?", width);
  +        super(fontState, red, green, blue, "   ", width);
           this.pageNumberId = refid;
       }
   
  @@ -68,5 +68,6 @@
           if (text == null) {
               text = "";
           }
  +        contentRectangleWidth = getFontState().getWordWidth(text);
       }
   }
  
  
  

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

Reply via email to