You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by fo...@apache.org on 2001/02/02 00:04:23 UTC
cvs commit: xml-fop/src/org/apache/fop/layout LineArea.java
fotis 01/02/01 15:04:22
Modified: src/org/apache/fop/layout LineArea.java
Log:
fixed: leader didn't fill line in content table
Revision Changes Path
1.32 +10 -6 xml-fop/src/org/apache/fop/layout/LineArea.java
Index: LineArea.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/LineArea.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- LineArea.java 2001/02/01 21:38:05 1.31
+++ LineArea.java 2001/02/01 23:04:20 1.32
@@ -1,4 +1,4 @@
-/*-- $Id: LineArea.java,v 1.31 2001/02/01 21:38:05 klease Exp $ --
+/*-- $Id: LineArea.java,v 1.32 2001/02/01 23:04:20 fotis Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -487,14 +487,18 @@
int ruleStyle, int ruleThickness, int leaderPatternWidth,
int leaderAlignment) {
WordArea leaderPatternArea;
- int leaderLength;
+ int leaderLength = 0;
int remainingWidth =
this.getContentWidth() - this.getCurrentXPosition();
- //checks whether leaderLenghtOptimum fits into rest of line;
- //should never overflow, asit has been checked already in BlockArea
- if (remainingWidth < leaderLengthOptimum) {
+ /** checks whether leaderLenghtOptimum fits into rest of line;
+ * should never overflow, as it has been checked already in BlockArea
+ * first check: use remaining width if it smaller than optimum oder maximum
+ * */
+ if ((remainingWidth <= leaderLengthOptimum) || (remainingWidth <= leaderLengthMaximum)) {
leaderLength = remainingWidth;
- } else {
+ } else if ((remainingWidth > leaderLengthOptimum) && ( remainingWidth > leaderLengthMaximum)) {
+ leaderLength = leaderLengthMaximum;
+ } else if ((leaderLengthOptimum > leaderLengthMaximum) && (leaderLengthOptimum < remainingWidth)) {
leaderLength = leaderLengthOptimum;
}
switch (leaderPattern) {