[Patch] fo:leader with start indent

2001-10-07 Thread Rainer Garus

It is possible to insert and commit the patch sended on 2001-09-02 to the problem 
described by Ivan Demakov (2001-08-27) to CVS?

Rainer Garus

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




[Patch] fo:leader with start indent

2001-09-02 Thread Rainer Garus

If start-indent <> 0 the computed value of the remaining width of a line area is not 
correct, because the value of getContentWidth contains start-indent and end-indent. I 
have changed the public method getRemainingWidth in LineArea.java but only tested with 
the following fo-file.

Rainer Garus



http://www.w3.org/1999/XSL/Format";
 xmlns:svg="http://www.w3.org/2000/svg";
 font-family="Courier"
 font-size="10pt">
  

  

  
  




start-indent = 0 cm, end-indent = 0 cm





start-indent = 2 cm, end-indent = 0 cm





start-indent = 4 cm, end-indent = 0 cm





start-indent = 0 cm, end-indent = 2 cm





start-indent = 0 cm, end-indent = 4 cm





start-indent = 2 cm, end-indent = 2 cm





start-indent = 4 cm, end-indent = 2 cm





start-indent = 2 cm, end-indent = 4 cm





start-indent = 4 cm, end-indent = 4 cm




  







--- Fop-0.20.1/src/org/apache/fop/layout/LineArea.java  Mon Aug 13 23:28:29 2001
+++ Fop-0.20.1/build/src/org/apache/fop/layout/LineArea.javaSun Sep  2 18:39:01 
+2001
@@ -507,8 +507,7 @@
 int whitespaceWidth =
 currentFontState.width(currentFontState.mapChar(whitespaceIndex));
 
-int remainingWidth = this.getContentWidth()
- - this.getCurrentXPosition();
+int remainingWidth = this.getRemainingWidth();
 
 /**
  * checks whether leaderLenghtOptimum fits into rest of line;
@@ -1008,7 +1007,7 @@
 }
 
 public int getRemainingWidth() {
-return this.getContentWidth() - this.getCurrentXPosition();
+return this.getContentWidth() + startIndent - this.getCurrentXPosition();
 }
 
 public void setLinkSet(LinkSet ls) {}
@@ -1031,8 +1030,7 @@
  */
 public int addCharacter(char data, LinkSet ls, boolean ul) {
 WordArea ia = null;
-int remainingWidth = this.getContentWidth()
- - this.getCurrentXPosition();
+int remainingWidth = this.getRemainingWidth();
 int width =
 this.currentFontState.width(currentFontState.mapChar(data));
 // if it doesn't fit, return

--- Fop-0.20.1/src/org/apache/fop/layout/LineArea.java  Mon Aug 13 23:28:29 2001
+++ Fop-0.20.1/build/src/org/apache/fop/layout/LineArea.javaSun Sep  2 18:39:01 
+2001
@@ -507,8 +507,7 @@
 int whitespaceWidth =
 currentFontState.width(currentFontState.mapChar(whitespaceIndex));
 
-int remainingWidth = this.getContentWidth()
- - this.getCurrentXPosition();
+int remainingWidth = this.getRemainingWidth();
 
 /**
  * checks whether leaderLenghtOptimum fits into rest of line;
@@ -1008,7 +1007,7 @@
 }
 
 public int getRemainingWidth() {
-return this.getContentWidth() - this.getCurrentXPosition();
+return this.getContentWidth() + startIndent - this.getCurrentXPosition();
 }
 
 public void setLinkSet(LinkSet ls) {}
@@ -1031,8 +1030,7 @@
  */
 public int addCharacter(char data, LinkSet ls, boolean ul) {
 WordArea ia = null;
-int remainingWidth = this.getContentWidth()
- - this.getCurrentXPosition();
+int remainingWidth = this.getRemainingWidth();
 int width =
 this.currentFontState.width(currentFontState.mapChar(data));
 // if it doesn't fit, return



http://www.w3.org/1999/XSL/Format";
 xmlns:svg="http://www.w3.org/2000/svg";
 font-family="Courier"
 font-size="10pt">
  

  

  
  






start-indent = 0 cm, end-indent = 0 cm





start-indent = 2 cm, end-indent = 0 cm





start-indent = 4 cm, end-indent = 0 cm





start-indent = 0 cm, end-indent = 2 cm





start-indent = 0 cm, end-indent = 4 cm





start-indent = 2 cm, end-indent = 2 cm





start-indent = 4 cm, end-indent = 2 cm





start-indent = 2 cm, end-indent = 4 cm





start-indent = 4 cm, end-indent = 4 cm




  





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


fo:leader with start-indent

2001-08-26 Thread ivan demakov


i try to get table of content like

   level 1.1
  level 2..2
 level 3...3

with this fo


  
  level 1
   
 
  
  
1
  



  
 level 2
   
 
  
  
2
  



  
 level 3
   
 
  
  
3
  

  



and i get

   level 1..   1
  level 2  2
 level 3.. 3

  (look here   ^^)


-- 
ivan

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