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]