xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr ContentLayoutManager.java AbstractLayoutManager.java PageSequenceLayoutManager.java LayoutManager.java PageNumberLayoutManager.java
Date Tue, 05 Apr 2005 00:24:33 GMT
gmazza      2005/04/04 17:24:33

  Modified:    src/java/org/apache/fop/layoutmgr Tag:
                        Temp_KnuthStylePageBreaking
                        ContentLayoutManager.java
                        AbstractLayoutManager.java
                        PageSequenceLayoutManager.java LayoutManager.java
                        PageNumberLayoutManager.java
  Log:
  Removed duplication of pageNumber & pageNumberString in PSLM;
  removed LM.getCurrPageString() in favor of already existing
  curPage.getPageString(); switched from LM.getCurrentPageString() to
  LM.getCurrentPageViewport()  (latter giving access to the former.)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.24.2.3  +2 -2      xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java
  
  Index: ContentLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java,v
  retrieving revision 1.24.2.2
  retrieving revision 1.24.2.3
  diff -u -r1.24.2.2 -r1.24.2.3
  --- ContentLayoutManager.java	4 Apr 2005 23:10:30 -0000	1.24.2.2
  +++ ContentLayoutManager.java	5 Apr 2005 00:24:33 -0000	1.24.2.3
  @@ -251,8 +251,8 @@
               Position bp2) { }
   
       /** @see org.apache.fop.layoutmgr.LayoutManager */
  -    public String getCurrentPageNumberString() {
  -        return parentLM.getCurrentPageNumberString();
  +    public PageViewport getCurrentPageViewport() {
  +        return parentLM.getCurrentPageViewport();
       }
   
       /** @see org.apache.fop.layoutmgr.LayoutManager */
  
  
  
  1.41.2.3  +3 -3      xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
  
  Index: AbstractLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
  retrieving revision 1.41.2.2
  retrieving revision 1.41.2.3
  diff -u -r1.41.2.2 -r1.41.2.3
  --- AbstractLayoutManager.java	4 Apr 2005 23:10:30 -0000	1.41.2.2
  +++ AbstractLayoutManager.java	5 Apr 2005 00:24:33 -0000	1.41.2.3
  @@ -347,12 +347,12 @@
       }
   
       /**
  -     * Delegate getting the current page number to the parent layout manager.
  +     * Delegate getting the current page viewport to the parent layout manager.
        *
        * @see org.apache.fop.layoutmgr.LayoutManager
        */
  -    public String getCurrentPageNumberString() {
  -        return parentLM.getCurrentPageNumberString();
  +    public PageViewport getCurrentPageViewport() {
  +        return parentLM.getCurrentPageViewport();
       }
   
       /**
  
  
  
  1.50.2.12 +2 -15     xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
  
  Index: PageSequenceLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java,v
  retrieving revision 1.50.2.11
  retrieving revision 1.50.2.12
  diff -u -r1.50.2.11 -r1.50.2.12
  --- PageSequenceLayoutManager.java	4 Apr 2005 23:10:30 -0000	1.50.2.11
  +++ PageSequenceLayoutManager.java	5 Apr 2005 00:24:33 -0000	1.50.2.12
  @@ -64,7 +64,6 @@
   
       private int startPageNum = 0;
       private int currentPageNum = 0;
  -    private String pageNumberString;
   
       /** Current page being worked on. */
       private PageViewport curPage = null;
  @@ -129,7 +128,6 @@
       public void activateLayout() {
           startPageNum = pageSeq.getStartingPageNumber();
           currentPageNum = startPageNum - 1;
  -        pageNumberString = pageSeq.makeFormattedPageNumber(currentPageNum);
   
           LineArea title = null;
   
  @@ -269,16 +267,6 @@
       }
   
       /**
  -     * Get the current page number string.
  -     * This returns the formatted string for the current page.
  -     *
  -     * @return the formatted page number string
  -     */
  -    public String getCurrentPageNumberString() {
  -        return pageNumberString;
  -    }
  -    
  -    /**
        * Provides access to the current page.
        * @return the current PageViewport
        */
  @@ -415,7 +403,7 @@
           }
   
           currentPageNum++;
  -        pageNumberString = pageSeq.makeFormattedPageNumber(currentPageNum);
  +        String pageNumberString = pageSeq.makeFormattedPageNumber(currentPageNum);
   
           try {
               // create a new page
  @@ -485,7 +473,6 @@
           MinOptMax range = new MinOptMax(rv.getRegionReference().getIPD());
           lm.doLayout(reg, lm, range);
           
  -        
           /*
           while (!lm.isFinished()) {
               BreakPoss bp = lm.getNextBreakPoss(childLC);
  
  
  
  1.21.2.3  +3 -3      xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java
  
  Index: LayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java,v
  retrieving revision 1.21.2.2
  retrieving revision 1.21.2.3
  diff -u -r1.21.2.2 -r1.21.2.3
  --- LayoutManager.java	4 Apr 2005 23:10:30 -0000	1.21.2.2
  +++ LayoutManager.java	5 Apr 2005 00:24:33 -0000	1.21.2.3
  @@ -168,11 +168,11 @@
       void addAreas(PositionIterator posIter, LayoutContext context);
   
       /**
  -     * Get the string of the current page number.
  +     * Get the PageViewport currently being generated
        *
  -     * @return the string for the current page number
  +     * @return the current PageViewport
        */
  -    String getCurrentPageNumberString();
  +    PageViewport getCurrentPageViewport();
   
       /**
        * Resolve the id reference.
  
  
  
  1.7.2.1   +2 -2      xml-fop/src/java/org/apache/fop/layoutmgr/PageNumberLayoutManager.java
  
  Index: PageNumberLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageNumberLayoutManager.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- PageNumberLayoutManager.java	17 Feb 2005 00:27:54 -0000	1.7
  +++ PageNumberLayoutManager.java	5 Apr 2005 00:24:33 -0000	1.7.2.1
  @@ -46,7 +46,7 @@
       public InlineArea get(LayoutContext context) {
           // get page string from parent, build area
           TextArea inline = new TextArea();
  -        String str = parentLM.getCurrentPageNumberString();
  +        String str = parentLM.getCurrentPageViewport().getPageNumberString();
           int width = 0;
           for (int count = 0; count < str.length(); count++) {
               width += font.getCharWidth(str.charAt(count));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message